Electronics > Microcontrollers

$0.11 PY32F002A: Cortex-M0+ MCU, actually a PY32F030! 32/4KB, 48MHz, PLL, DMA...

<< < (22/27) > >>

Including notes for the bootloader protocol  :)

Long story short, I noticed setting RDP1 disables nRST!
My fault, I was clearly disabling it in the config bits when setting RDP!
Had two weeks, 11h/day thanks to stupid sales/management people, was time for a planned order and they didn't had bought the parts yet, so then it was again our mission to save their as$es.
I had already given it all and struggled with this simple task  :palm:.

Pixie dust:
I checked out the ADC onboard the PY32F003. The converter is quite accurate (jitter of 1 count only). However there is one flaw: If a pin is configured in input mode (not analog) and the voltage of such pin goes beyond the rails (either on the ground side or VDD side) the ADC results of other (analog) pins are messed up. And this while the VDD stays perfectly constant. So the ADC does not strictly convert in the range 0...VDD.

In designs were the onboard protection diodes are used to clamp an input  pin this can be a problem.

Yeah this is a pretty common issue in plenty of mcus.
Relying on the pin clamping diodes is always a bad idea when using analog peripherals and must be thoroughly tested.
Of course the adc works in the 0...VDD range, the problem comes from the clamping diodes, clamping to VDD+0.6V, those extra 0.6V are causing the behaviour.

If the current consumption is low, even 10K could cause VDD to rise slightly.
You can also play with the pulldown resistors, so they make a voltage divider.
I recall they were about 40-50K, so if interfacing 5V, a 22-33K input resistor will do it.

A newly reported bug:
When IWDG is enabled, if RTC or LPTIM interrupt is triggered(to feed the dog) at the same time when MCU is entering stop mode, there is a possibility that the dog feeding fails and then MCU will reset.
(Source: https://www.cnblogs.com/liwen01/p/17850148.html)

In PY32F002B, using option byte IWDG_STOP may avoid this bug. when IWDG_STOP is set, watchdog stops counting in stop mode.


[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod