cancel
Showing results for 
Search instead for 
Did you mean: 

UART is no more working after changing the clock source

AmGo
Associate III

Split from this post.

Hello,

Sorry to bother you again, but it seems that since yesterday (when I enabled the CAN bus), the UART on my Nucleo has stopped working, even though I haven’t touched anything since then.

 

To be precise, I’m monitoring my UART signal and I’m only getting ‘framing errors’, obviously, I’ve checked and the baud rates are the same on both sides.

 

Could activating the HSE clock have disrupted the operation of my UART ?

 

Thank you in advance for your help,

17 REPLIES 17
AmGo
Associate III

I'm trying but as shown in my previous post, I don't get the same thing as you in STM32 Cube Programmer 


@AmGo wrote:

Also, when I open SM32Cube Programmer and click on ‘Firmware Upgrade’, I get this and nothing else;


Please review the article again. I think you are not following the details.

screenshot.png

You need to click "Open update mode" as indicated in the Step 2 shown above.

  • Step 1: Open the STM32CubeProgrammer tool and click the [Firmware upgrade] button.
  • Step 2: A new window is opened. Click on [Refresh device list]. STLINK ID needs to be displayed under the button [Open in update mode]. Then click on this button to let STLINK enter the upgrade mode.
  • Step 3: In the [MCO Output] menu, select the needed frequency and click [Upgrade] button.
  • Step 4: The upgrade will start and the STLINK LED is blinking. Wait until the progress bar reaches 100%. The STLINK firmware is updated.
To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

This shows me the bytes transmitted by my UART and with my problem, instead of 0XBE I receive "Framing Error"


@AmGo wrote:

This shows me the bytes transmitted by my UART and with my problem, instead of 0XBE I receive "Framing Error"


Please stick on the STLINK-MCO output problem for now.. Most probably the MCO output is not set to 5MHz as it should.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
AmGo
Associate III

Sorry, I was just answering to Andrew. 

I've retried the configuration and now I can see MCO Ouput. You were right, I've changed it to HSE/2 to HSE/5. 


@AmGo wrote:

I've retried the configuration and now I can see MCO Ouput. You were right, I've changed it to HSE/2 to HSE/5. 


Does it work after this change?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
AmGo
Associate III

Yes, it looks like. 

Thank you very much. 

 

Can you just explain to me why you chose PLL1Q and not HSE for the FDCAN Clock Mux please ? 


@AmGo wrote:

Yes, it looks like. 

Thank you very much. 


Good.

 


@AmGo wrote:

Can you just explain to me why you chose PLL1Q and not HSE for the FDCAN Clock Mux please ? 


Better to use high frequencies for kernel clock to get better resolution for the CAN bit time so you can fine tune TSEG1/TSEG2 bit segments.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.