Other Parts Discussed in Thread: HALCOGEN
Tool/software: Code Composer Studio
HALCogen 04.07.00
CCS 8.2.0.7
SPI2 writes 256 16bits to SPI4 as master to slave.
DMA set up on SPI4 with a frame count of 256 and element count of 1.5633.CAN_1_2.zip
I send 256 16 bits then set up RTI for 1ms and go into endless loop.
To get RTI to work I call _enable_interrupts_ from sys_core.h.
I added a long delay before the RTI initialisation. I put a breakpoint at rtiInit();
Without the line _enable_interrupts and stopping at rtiInit() the DMA is successful.
With the line _enable_interrupts and stopping at rtiInit() the DMA is not - or at least it shows zeroes.
This seems a weird kind of pre-emptive error. This is the end of the sys_main.c code:
for (k=0;k<100;k++) delay();
rtiInit();
rtiEnableNotification(1); // just enable Compare 0 notification
rtiStartCounter(0);
_enable_interrupt_(); // with this included even if the code is stopped at rtiInit() the
// DMA of data received on SPI4 shows nothing received. Removing this
// and stopping at the same place shows data DMA'd ok.
/* USER CODE END */
while(1);
}