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.

MSPM0G3507: [MSPM0G] Problem getting UART, ADC & DMA to work.

Part Number: MSPM0G3507
Other Parts Discussed in Thread: SYSCONFIG

Dear all,
I'm currently trying to configure the MSPM0G3507 to work as follows:

- UART (UART0) to transmit/receive using DMA.
- PWM (TIMA1) in center-aligned mode and to trigger ADC0 & ADC1 in the middle of each PWM period.
- ADC (ADC0/1) to convert several channels (sequence mode with FIFO enabled) and transfer data using DMA into the global variables gAdc0Values & gAdc1Values.
  - DMA is configured as "repeat block" and is re-enabled when the DMADONE interrupt is issued by ADC0/1


My test application currently performs the following tasks:
1) Initialize the peripherals using the auto-generated code fom sysconfig (SYSCFG_DL_init() ).
2) Configure DMA for ADC0 & ADC1
3) Configure the DMA for UART0
4.a) Send "Hello\r\n" in an endless loop
4.b) Re-enable ADC0, ADC1 and DMA in the correspondent interrupt service routine when the DMADONE interrupt is issued.


Issue 1) AD values in "gAdc0Values" (resp. "gAdc1Values") are not available in the mainloop.
When I set a breakpoint in the ISR of ADC0 or ADC1, the arrays gAdc0Values/"gAdc1Values contain valid AD values. However, if I set a breakpoint in the mainloop, the whole arrays are set to 0. So it seems as the arrays are overriden at some point but I can't figure out the reason for that.


Issue 2) ADC+DMA seems to block the UART/DMA after some time.
The mainloop sends "Hello\r\n" in an endless loop, thereby waiting for the transmission to finish before starting another one. After 945 bytes send, the function stucks waiting for the DMA channel to finish but that never happens. This issue can be reproduced and always happens after the same amount of bytes send. When ADC is disabled, this issue does not occur, so it seems to be related in some way.

Any help is appreciated.

Kind regards,

Thomas


MSPM0G3507_test.zip