TMS320F280039: How to define the struct variable is aligned by 4 bytes?

Part Number: TMS320F280039

Hi team,

I ask this for my customer.

Because of RAM space is not enough, so they're optimize the memory allocation.

Orignally, they define a CAN related struct variable in GSRAM, and want to move it to LSRAM.

but after the modification, the CAN communication isn't work and code will run away(CAN related function isn't use DMA or CLA, so in my understanding, this struct variable can be placed in GSRAM and LSRAM)

So i assume may be struct variable is not aligned by 4 bytes. I ask them do below modification:

  1. in cmd, define align(4)
  2. #pragma DATA_ALIGN(canMsgTabPublic,4) to define the canMsgTabPublic

Is above modification is correct?

After did above modification, the cpu can enter ISR periodly, but CAN communication still bad

Do you have any comments for this?

BRs

Shuqing