PSOC4:How to deal with UART RX buffer with data 0x00

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

cross mob
Leo_liu1
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

Hi all,

我通过串口向psoc发一组帧,其中包含0x00,但是使用XX_UartGetChar()函数接收,会默认把0x00舍去。

这个接收函数只能接收1-255,把0当做error。

所以,如果要实现接收含有0x00的一组帧,应该怎么处理这种问题,还是说需要参考XX_UartGetChar(),自己写一个函数?

BR,

Leo

0 Likes
1 Solution
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

Have you tried

  XX_UartGetByte()

?

moto

View solution in original post

0 Likes
2 Replies
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

Have you tried

  XX_UartGetByte()

?

moto

0 Likes

Hi Moto,

Thanks!

XX_UartGetByte(),this function is useful,now it works fine and i just need to do some changes.

BR,

leo