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.

CCSv6 CPU jumps to address 0x0004 only in debugger mode

Other Parts Discussed in Thread: MSP430FR5969, ENERGYTRACE

Hello,

I have a MSP430FR5969 platform with a 430BOOST-SHARP69 module. I modified the grlib driver to use the DMA controller to update the display via SPI.  (Clock source SPI is SMCLK ).

The application uses the 2 push buttons on the board to switch to different power modes going from active mode -> LPM0 -> LPM1 -> LPM2 -> LPM3 -> LPM4. Every time a new power mode is entered, the DMA is triggered to update the LCD so that the power mode is printed on the LCD.

The thing is that in "Free run", the LCD gets updated properly, and the application keeps functioning properly (though I cannot confirm in which LPM mode the CPU is since I can't use EnergyTrace++).

When I run in debug mode, I can keep switching between active mode and LPM0 but once I go into a higher LPM mode, things can go wrong. When it goes wrong and I pause the CPU, I see that the instruction pointer is at 0x0004. 

I would like to see the activity of the DMA and the clocks in each mode in the EnergyTrace++ but so far, that is not possible. Is there anything I can do to "debug" my problem, ( = why the CPU jumps to address 0x0004 ).

As I described my setup, am I doing "illegal" things like jumping into a LPM when the DMA/SPI is active?

Thanks in advance.
Sam.

Edit: I just found that DMA11 in the errata list http://www.ti.com/lit/er/slaz473h/slaz473h.pdf might be relevant. But this still doesn't explain correct behaviour in "Free Run" mode...

  • So in the erratasheet is stated that you should either only use active mode or LPM0, or that you should manually trigger the DMA in a modules ISR instead of using the modules DMA trigger. 

    Since I want to be able to go to every power mode, I implemented the second approach and I can confirm that everything works as expected.

  • Thanks for posting the solution.

    If you can ensure that the DMA won’t be triggered within 500ns+1MCLK cycle, you can still go into LPM (well, it doesn’t make much sense anyway to go into LPM when MCLK will be required for DMA within a shorter time than the MCLK wakeup time).
    So if you just triggered the ADC and know that the conversion will take some µs, then I think you can go safely into LPM. However, if an UART RX interrupt can happen every moment, and you can’t know when, then this will be critical and you can’t use DMA at all, as you can handle the RX event in the RX ISR much faster than activating the DMA and waiting for it to do the job. :)

**Attention** This is a public forum