Modustoolbox - UART example for custom board

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
stratuscent_mtl
Level 1
Level 1
First like received 10 sign-ins 5 replies posted
Hello,
 
I'm trying to create an application to test the UART communication for my own hardware device (CY8C6247BZI-D54). I used the UART-Transmit and Receive example for the CY8CKIT-062-WIFI-BT, it works well on that board, but NOT with my own setup.
 
I changed the pins from the given example and assigned to the right values on my device (P1_0 for RX, P1_1 for TX), as well as enabled an SCB to handle the pins. Please refer to the attached files for details. I also included the whole source code here.
 
My device was working well with PSoc Creator, we're now struggling to port the existing firmware to Modustoolbox, since the D54 may not be available soon, and the new chips provide huge memory which will help us for the future development.
 
Any help will be much appreciated.
 
Thanks in advance.
 
GP
0 Likes
1 Solution
AlenAn14
Moderator
Moderator
Moderator
500 replies posted 100 solutions authored 250 replies posted

Hi @stratuscent_mtl ,

If you are using the HAL libraries (like retargetIO library and also API's that start with cyhal), then please do not enable the pins or peripherals (like UART) used with the HAL API's in the device configurator as this is automatically done for you by the HAL API's.

I see from the firmware you have shared that you are using the HAL libraries. So please uncheck the UART pins P1_0 and P1_1 and the UART SCB component as well from the device configurator as the device configurator makes use of PDL API's so enabling these components in device configurator will cause a conflict with the HAL API's.

Warm Regards
Alen

View solution in original post

0 Likes
4 Replies
AlenAn14
Moderator
Moderator
Moderator
500 replies posted 100 solutions authored 250 replies posted

Hi @stratuscent_mtl ,

If you are using the HAL libraries (like retargetIO library and also API's that start with cyhal), then please do not enable the pins or peripherals (like UART) used with the HAL API's in the device configurator as this is automatically done for you by the HAL API's.

I see from the firmware you have shared that you are using the HAL libraries. So please uncheck the UART pins P1_0 and P1_1 and the UART SCB component as well from the device configurator as the device configurator makes use of PDL API's so enabling these components in device configurator will cause a conflict with the HAL API's.

Warm Regards
Alen

0 Likes
lock attach
Attachments are accessible only for community members.

Thank you very much for your response quickly. 

I disable the UART pins P1_0, P1_1 and the UART SCB component in the Device Configuration, so how can I identify the pins in my setup for the HAL libs? Because my setup has different pins settings compared to the Dev Kit.

I also changed the value of CYBSP_DEBUG_UART_RX/CYBSP_DEBUG_UART_TX to the match with my settings (please refer to the attachment), but it still doesn't work.

 

Regards,

GP

 

0 Likes

Hi,

I just wanted to give you an update on the above issue. I finally got it worked by disabling the SCB and related pins as you suggested. Then changed the generated source code to match with my setup.

Thanks for the short but helpful explanation.

GP.

 

0 Likes

Hi @stratuscent_mtl ,

Glad your issue is resolved.
Please feel free to post any queries or issues you may find on Infineon products in the future as well in the community and we will be happy to help.

Warm Regards
Alen

0 Likes