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

PSoC™ 6 Forum Discussions

rushikeshmunde
Level 1
Level 1
25 sign-ins 10 sign-ins 5 replies posted

Hello, 

I am using PSoC 6 PROTO kit. I am trying to achieve synchronization in between two cores by using semaphores and sharing single UART port in two cores, CM4 and CM0+.  I am getting a slight issue in the output. I checked with semaphore example provided by cypress then I created a empty project for dual core. With the help of Device Configurator  I initialized the UART port and User LED on the board. 

Same as "Semaphore Example" I am trying to send data to UART from both cores. But the project I created it shows some discrepancy. CM4 UART gets executed twice and CM0+ UART for once8[CM4 CM4, CM0+, CM4 CM4], whereas the output should be [CM4 , CM0+, CM4]. Please refer to attached output image.  

The project I created is same as example project, I checked the clock is also same. but not getting why I am getting expected output. Need your help in understanding.  As far as concept is concerned it is able to synchronize the shared resource,  but not able to understand discrepancy in the output. 

Thanks

Rushikesh  

0 Likes
1 Solution
RodolfoGL
Employee
Employee
250 sign-ins 5 comments on KBA First comment on KBA

That's possible. You have two CPUs competing for the resource. Depending how fast the CPU runs and what else they do in the main loop, you could have one of the CPUs utilizing the resource more than one time before the other gets it.

View solution in original post

0 Likes
1 Reply
RodolfoGL
Employee
Employee
250 sign-ins 5 comments on KBA First comment on KBA

That's possible. You have two CPUs competing for the resource. Depending how fast the CPU runs and what else they do in the main loop, you could have one of the CPUs utilizing the resource more than one time before the other gets it.

0 Likes