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.

TMS320F28388D: Why CM should disable the global interrupt when reading or writing the ESC register?

Part Number: TMS320F28388D


Tool/software:

Recently, I found that data was occasionally lost when debugging UART. Later, I found that it was because the general interrupt was turned off for more than 100 microseconds when reading the ESC register (normally only about 1 microsecond). As a result, my UART interrupt could not be triggered in time, the FIFO was full, and subsequent data was lost.
I noticed that other manufacturers' chips did not turn off the interrupt when reading the ESC register. Why does the CM core turn off the global interrupt in these APIs?

In addition, When I remove the code that turns off the global interrupt, CM has become unstable and has some strange behavior when running.

for example:

ethercat_slave_cm_hal.c

//*****************************************************************************
//
// ESC_readBlock
//
//*****************************************************************************
void ESC_readBlock(ESCMEM_ADDR* pData, uint16_t address, uint16_t len)
{
    //
    // Disables interrupts
    //
    //_disable_IRQ();
    //
    // Perform copy of ESC data to buffer
    //
    ESC_readBlockISR(pData, address, len);

    //
    // Enable interrupts
    //
    //_enable_IRQ();
}