cancel
Showing results for 
Search instead for 
Did you mean: 

STM8S001The UART Of Alternate function after remap,Unable to receive

su shaowu
Associate
Posted on February 08, 2018 at 04:19

Chip:STM8S001J3

The UART Of Alternate function after remap

RX is in PIN1?TX is in PIN5

The program has never been interrupted, RXNE has been 0.

What is the reason why you want to ask?

My configuration is as follows:

OPTION  BYTES?

                                AFR0?Alternate Active

                                 AFR1?Alternate Active

                                  AFR2?Alternate Active

Code?

            UART1_Init((uint32_t)9600, UART1_WORDLENGTH_8D,UART1_STOPBITS_1, UART1_PARITY_NO,

                   UART1_SYNCMODE_CLOCK_DISABLE, UART1_MODE_TXRX_ENABLE);

            UART1_ITConfig(UART1_IT_RXNE_OR, ENABLE);

             UART1_Cmd(ENABLE);

#the-program-has-never-been-interrupted #the-uart-of-alternate-function-after-remap #stm8s001j3
2 REPLIES 2
Emilio P.G. Ficara
Associate II
Posted on April 13, 2018 at 09:24

Look here:

https://community.st.com/0D50X00009XkX5uSAF

. The question is the same and the answer is: no answer. Not a valid solution has been presented. I made many attempts with interrupt, polling and various tricks, but nothing happened. Without the remapping, all works fine. It would be nice if some technician from ST would clarify the question. The STM8S001 component is good and cheap, but the 'swim' pin common to the UART TX is a strange / dangerous mapping arrangement.

Igor Cesko
ST Employee
Posted on June 29, 2018 at 10:15

 I confirm this mistake in documentation - it will be corrected in new datasheet (very soon). See the answer here

:

https://community.st.com/0D50X00009XkX5uSAF

 .