- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello I'm using psoc6 WIFI-BT Pioneer Kit
I'm implementing "UART_DMA", but I don't know where to place the callback.
What I want is, for example, when all five pieces of data are received, a callback is called and the result value is returned.
Should I use "Cy_SCB_UART_RegisterCallback()" as the existing UART method?
When implementing "UART_DMA", I would appreciate it if you could register "Callback" or let me know the location.
Thankyou for your reply.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @psoc_student ,
I have attached here a firmware developed for the 062-Wifi-Bt kit where the Rx of UART is interfaced with DMA such that after receiving 7 characters as user input , the DMA Callback is triggered and the received data is displayed.
Few points to note:
1. The Number of elements that is to be received to trigger the DMA interrupt is fixed and set in the device configurator as shown
2. Callbacks do not usually return any data.
3. The callback for DMA is done as shown below:
Hope this helps
Warm Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @psoc_student ,
>> What I want is, for example, when all five pieces of data are received, a callback is called and the result value is returned
Can you please describe what you meant by 'all five pieces of data are received' and also the 'result value' ? Do you mean to say 5 bytes of data received over UART , then a callback should be triggered?
Warm Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @AlenAn14
"all five pieces of data are received" means the data received by mcu when data is sent from a terminal tool, for example, "teratterm".
For example, if the tool sends five pieces of data, the MCU will store all five pieces of data.
At this time, when all five have been received, we want a structure to call "Callback".
And the meaning of 'result value' is the return value of 'callback'.
Additionally, all transmissions are via UART.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
'teratterm' is a typo in 'tera_term'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @psoc_student ,
I have attached here a firmware developed for the 062-Wifi-Bt kit where the Rx of UART is interfaced with DMA such that after receiving 7 characters as user input , the DMA Callback is triggered and the received data is displayed.
Few points to note:
1. The Number of elements that is to be received to trigger the DMA interrupt is fixed and set in the device configurator as shown
2. Callbacks do not usually return any data.
3. The callback for DMA is done as shown below:
Hope this helps
Warm Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @psoc_student ,
Glad your query is resolved!
Please feel free to post any queries or issues you may have on Infineon products in the community and we will be happy to help/
Warm Regards
Alen