This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F2800157: How to de-init the Peripherals

Part Number: TMS320F2800157

Hi team,

I ask this for my customer.

My customer project includes APP and bootloader

1.when bootloader finish, before it jump to app, is it need to de-init all the module used in bootloader(include all the Peripherals and SP...) and then jump to app and init the modules that used in app? if they don't de-init before jump to app, and init the module directly(module may be used in bootloader also), what may happen?

2. In our MCAN_init(), after it finishes the init, it isn't check the CCCR.INIT(means the initlization finished), is it need to check the CCCR.INIT to confirm the initlization finished?

BRs

Shuqing

  • Hello Shuqing,

    1.when bootloader finish, before it jump to app, is it need to de-init all the module used in bootloader(include all the Peripherals and SP...) and then jump to app and init the modules that used in app? if they don't de-init before jump to app, and init the module directly(module may be used in bootloader also), what may happen?

    JC: There is no specific or standard module initialization routine in driverlib.  The customer maybe using its own module initialization function and this really depends on what the customer does and what registers are being written to.  That said, there is no direct answer to this.  The rule of thumb in module initialization is that registers will be set to a default value after module is reset by software.  This also depends on which register is being set in the initialization routine.  There are registers that are only reset by hardware and there are ones that are only reset by software so not doing a module reset may retain the original register settings from a prior operation in bootrom.   To be sure, it wiil be good to force reset a peripheral using API function call SysCtl_ResetPeripheral(module) to intitialize the registers that are affected by SW reset, then proceed with setting the other registers for that peripheral.

    2. In our MCAN_init(), after it finishes the init, it isn't check the CCCR.INIT(means the initlization finished), is it need to check the CCCR.INIT to confirm the initlization finished?

    JC: MCAN_init() is a low level API that does not configure the registers MCAN_NBTP, MCAN_DBTP, MCAN_CCCR, MCAN_SIDFC, MCAN_XIDFC, MCAN_RXFxC, MCAN_TXBC and MCAN_TXBAR, so it is not needed in that call.  INIT polling is only needed when writing to those registers mentioned.

    Regards,

    Joseph