2018-10-30 08:37 PM
We use STM32F042G6U6 to communicate USB and RS485,and control 4 LEDs,when Ta>50℃,communication stop.And we use HSI 48MHz.
2018-10-30 09:07 PM
Does it Hard Fault? Do you have a routine there outputting some kind of useful diagnostic information? Or just the while(1) loop?
Can you measuring the HSI48 clock via MCO pin in the failing condition?
Tried increasing the flash wait states?
I'd recommend discussing with the FAE supporting your account to see if they have any specific experience with the issue, or suggestions/ideas for you.
2018-10-30 10:27 PM
1,only use PA9 and PA10 for USB; PA1~PA3 for RS485; PA15,PB3~PB5 to control 4 LEDs.
2,STM32F042G6U6 (UFQFPN28) have no PA8(MCO) pin.
3,what means to increase the flash wait status? please show more.
4,FAE have no efficient advice for me, just ask me change his samples to test again.
2018-10-30 11:16 PM
The ambient temperature is one thing - what are the Tj in this circumstances ?
Any analog circuitry involved, with parameters drifting away at higher temperatures ?
Opto couplers for example stop to function at about 90°C.
Flash settings already on the limit ?
Try to increase wait states, as Clive suggested.
2018-10-31 01:48 AM
> USB and RS485
Which communication stops? What does this exactly mean, what are the symptoms? Isn't it just that the UART's baudrate changes due to temperature-dependent HSI frequency so that it falls outside the allowable tolerance (cca 5% if the other party is precise)?
JW
2018-10-31 03:07 AM
MCU cannot receive and send data fromUSB. That is to say USB communication stop.I do not know why,and i guess HSI48 frequency falls outside the allowable tolerance,but i do not know how to check.Also i do not know how to resolve the issue.
2018-10-31 03:25 AM
Seems you are in trouble, then. Quartz do as well drift with temperature. Or you are using HSI ?
For a check, you can put the clock to MCO, and measure at Ta above 50°C.
You could try the RF oscillator design trick: keep the oscillator (the quartz) at a constant temperature with insulation and heating.
Or switch to a more tolerant communication interface.
2018-10-31 06:28 PM
1,STM32F042G6U6 (UFQFPN28) have no PA8(MCO) pin,please check the datasheet,
2,Our design use the MCU to communicate USB and RS485,we can not change other communication interface.
3,now we plan to use external oscillator (the quartz),but first we need confirm whether the issue results from the HSI48 accuracy falling outside with tempareture.how to check and confirm?
2018-10-31 06:30 PM
2018-10-31 07:27 PM
Then you're in a lot of trouble.
If you have no MCO pin, you'll need to find another TIMx_CHx you can use to quantify the stability/accuracy of the internal clocking. ie via SYSCLK, APBx, to TIMxCLK
For diagnostic output, find a USARTx_TX pin for any available USART so you can emit so kind of realtime telemetry to understand what's actually happening internally. Otherwise you're going to be blind with no idea what's actually going wrong.
Perhaps one of the SWDIO/SWCLK pins maps to a USART, or you have some other GPIO with a LED or some other non-essential/secondary function that you can repurpose for debug/diagnostic testing. Usually these are things you'd think about at the design stage so you don't paint yourself into a corner.