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.

TMS320F28P650DK: SCI freopen conflict with MCAN

Part Number: TMS320F28P650DK


Tool/software:

Customer MCAN could work well independence, however meet problem after add below code from SCI example.

Once below code execute, MCAN will keep INIT bit as 1 and cannot work, need to run MCAN configuration again then restore working. 

Appreciate expert advice what conflict maybe caused by below code to MCAN?

  • HI Terry,

    Has the MCAN module been configured and set to normal mode before calling the init_stdout_and_stdin()? Does your init_stdout_and_stdin() issue any software reset? The MCAN INIT can be set by a software reset. The INIT can also be set when an uncorrected bit error was detected in the Message RAM, or by going Bus_Off state.

  • Hi Qingjun

    The init_stdout_and_stdin() do not cause reset, we debug the firmware it could complete run and SCI work well, just the MCAN has to do initiation configuration again to recovered MCAN working. 

    I would like to know what freopen or setvbuf function in init_stdout_and_stdin() is doing, why they maybe cause ECC error in Message RAM or let MCAN into bus off state 

  • Hi Terry,

    Both SCIB interrupt and MCAN interrupt are allocated in the same PIE group, but SCIB (TX and RX) is at lower channels. The SCIB interrupts (TX or RX) is serviced first.

    If both SCI interrupt and MCAN interrupt are enabled, and SCI interrupt may block MCAN messages' TX and RX. You can try polling mode for SCI TX/RX.