Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

MSP430F5514: Can I observe whether the memory is overflowing in real time?

Part Number: MSP430F5514

Tool/software:

Hi, Team:

CCS Version: 12.7.1

Chip: MSP430F5514

I'm trying to keep receiving data from UART and processing it.Therefore, I want to be able to check the memory status in real time when debugging to determine if there is an overflow.

how can I monitor the MCU memory usage in real time when debugging?

I'm sorry that my English is not very good.

Thanks and regards,

Chen

  • Hi Chen,

    Got your point. Actually when we use UART to receive package , we will firstly define a buffer (a array of package data), and the data we received could be stored in this buffer. Of course the size of buffer will be within the size of MCU memory. 

    If you want to continuously receive data by UART and stop receive when the memory is full, you could define the buffer making full use of memory size, and use a counter to record the package you received. If the counter reach the max value, then stop receiving or do other operation.

    Best Regards,

    Pengfei

  • Hi Pengfei, 

    I have defined a 200 byte Circular Queue to receive data from the UART, which is able to continuously receive data and process it. When the array is full, the new data will overwrite the processed data, so that the function of constantly receiving data can be realized.

    I want to keep sending data to the MCU and monitor its memory usage in real time while debugging to make sure the code is stable enough to not crash due to memory overflow.

    Thanks and regards,

    Chen

  • HI Chen,

    The memory occupation of UART data has been determined when you defining the 200 Byte queue. I think the thing you need monitor is whether the circular queue is full (by defining a head pointer and a tail pointer), but actually the UART received data memory occupied is always 200Byte. 

    Best Regard,

    Pengfei

**Attention** This is a public forum