Part Number: MSP432P4111
Hello,
The setup:
Versions:
- simplelink_msp432p4_sdk_3_30_00_13
- simplelink_sdk_wifi_plugin_2_40_00_22
- FreeRTOSv10.2.1
- CCS 9.0.1.00004
I have a project that consists of multiple boards communicating with each other using multiprocessor UART.
All of these boards have the MSP432P4111 on them.
FreeRTOS is used as the OS without the posix layer.
Peripherals are used through the driverlib API.
There is 1 main board that sends out various queries to all the other boards sequentially through UART.
Each of the boards are responding through UART one by one.
On the main board (also on the other boards) a DMA channel is used to receive bytes one by one and store it in a StreamBuffer_t (from FreeRTOS)
An interrupt is fired whenever the DMA finishes the 1 byte read.
In this interrupt handler the received byte is sent using the StreamBuffer_t's "xStreamBufferSendFromISR" method, then the DMA is re-enabled with the same settings (to receive 1 byte from UARTRX)
This setup is working fine, without problems.
The problem:
But, I have to add wireless connectivity to it.
I have chosen the CC3135 BOOSTXL board.
By looking at the examples for the MSP432, it seems that they are using the SPI TI Driver to communicate with the CC board.
I have decided to migrate my driverlib implementation to TI Drivers to make the whole application at least a little bit more cross-platform between TI devices, also, I planned on making the application as power efficient as possible using various policies.
My problem is:
As far as I can tell, there is no way to set up UART the way I used it through driverlib:
1. Multiprocessor API is completely missing from TI Drivers implementation
This I have solved by using CS pins to separately enable and open UART on the desired board, then close it when all data exchange is finished.
2. I cant find way to be able to read continuously from UART as I was able to using the DMA, because:
The closest I came is to set up a read callback for UART and prepare it to receive 1 byte and planned to do it every time a byte is received and processed, but the documentation warns that I can not call UART_read() from its own callback function:
* @warning Do not call %UART_read() from its own callback function when in
* #UART_MODE_CALLBACK.
At this point I don't see how I would be able to achieve the same functionality as it was with UART + DMA (receive a byte, process it, prepare for an other byte <- this all in the interrupt handler)
Now, there is a chance, that I just leave the driverlib implementation as is, and don't touch that EUSCI preipheral in the TI Driver setup, but in the long run, I don't want workarounds, and I also know from experience, that using a peripheral through driverlib AND using the TI Driver's power saving functionality (which I plan to) causes problems.
So, what I need is to achieve the same UART functionality with TI Drivers as I did with driverlib
Any help would be appreciated.
NOTE:
I need to read byte by byte from UART, because various requests and responses are of a different length.
The one by one byte read makes sure, that I always receive everything from all boards into the same buffer that will be handled later without and blocking calls and without any timeout handling.
Thank you,
Akos