cancel
Showing results for 
Search instead for 
Did you mean: 

get break frame + stm32f103c8t6

comet_artificial
Associate II
Posted on April 25, 2013 at 04:13

Hi everyone,

I have already had a project about stm32f103c8t6 chip.I used rs485 to transfer data beetwen 2 board via SN751768P IC.I'm sure that all things about schematic are fine.I transfer data without break signal is ok. ex: I send 0xff from sending board (master) and I receive 0xff from getting board (slave).

BUT when I send break frame (USART2->CR1 |= 0x0001;).data of me have change: I send 0xff from master but receive 0x00,0x03 or 0x01, from slave.

I have already read about break frame in USART character description item of STM32F103xB usermanual. I think that stop bit at the end of each of break frame is reason make data error.(I have attached my picture)

please tell me this error.

Thanks and BR,

Vui Nguyen
3 REPLIES 3
Posted on April 25, 2013 at 11:01

I'm not sure I have any specific knowledge here, but take a look at what's going on with the signal with a scope.

From the documentation it's not clear that the usage of USART_SendBreak() is dependent on the state of TC or TXE, or if one should wait before and/or after for those to assert. The latter might be important if you're disabling a transceiver or something.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
comet_artificial
Associate II
Posted on April 26, 2013 at 05:48

Hi,

Thanks for reply.I'm sure that transmit packet is ok.

I have already designed 2 receivers: use 2 difference chips : stm8s and stm32. Also 1 transmitter, I used stm32 chip.

+ with stm8 slave: I use USART interrupt to get 512 bytes of data and detect break signal (to know start of new packet) by UART1_FLAG_FE flag. And it get data is ok.

+ with stm32 slave: I use too. BUT data is error as my above descriptions.

So my problem just forcus on stm32 slave. I think have some differences in USART structure of stm32 make error data.Or may be getting method of mine is not good??

everybody,please help me.

BR,

comet_artificial
Associate II
Posted on May 03, 2013 at 05:58

Hi all,

STM32 have a achilles when you make a project about dmx512 protocol (to control lighting), you just control stm32s together.ex: transmitter is use stm32 chip and receiver is too. that time time of data transfer and break transfer (to start of a packet) is similar. also if you are use diferrence chip for transmitter: getting data is error.

I think that stm32 chip have already a method to overcome that for dmx512 user.

what is solution??