I've been having some issues with a project I am working on and figured somebody here might be able to provide some insight. The project I am working on is using the TI RM44L520 and I am currently trying to configure a 4-20ma chip over SPI. As I am using FreeRTOS for this project I need to implement a hardware timer to facilitate communication over SPI. Below I have posted the function used by FreeRTOS to configure the RTI used for the system clock and the code I have added to configure the second RTI compare on channel 1:
Next, I created the following hardware delay function using the new RTI compare:
After running this I did not get the expected behaviour so I placed a function that turned on some on-board LEDs to troubleshoot. What I found is that if I put the LED on function at the end of the hardware delay function all of the LEDs turn on as expected. If I place the LED on function under the hpiTimer_DelayInMicroSeconds() function call the LEDs do not turn on. I thought that this may be due to some error with the new RTI channel causing continuous interrupts so I tried disabling the interrupts on channel 1 at the end of hpiTimer_DelayInMicroSeconds() but the same error remained. If anyone has any ideas at all that would be a huge help.