Page 5 of 5

Re: [SOLVED]Interesting problem

Posted: Sat Feb 01, 2020 4:07 pm
by ag123
enableDebugPorts() is
https://github.com/rogerclarkmelbourne/ ... ug.cpp#L39

Code: Select all

void enableDebugPorts(void) {
    afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY);
}
u'd just need to check your connections again ;)
and only the SWD pins are enabled

for the other pins if you want to use them, make sure you set the pinMode() for them or they may just be input pins

Re: [SOLVED]Interesting problem

Posted: Sat Feb 01, 2020 9:26 pm
by miki
Lol!
Looks like my core is old.

I use
void enableDebugPorts(void) {
afio_cfg_debug_ports(AFIO_DEBUG_FULL_SWJ);
}
and working

while.
afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY); is not.
*********************************************************************
edit:
using first

afio_cfg_debug_ports(AFIO_DEBUG_FULL_SWJ);//enableDebugPorts()
and after

afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY);

works well now

Re: [SOLVED]Interesting problem

Posted: Mon Jan 02, 2023 8:34 am
by Ageorgiev86
Hello
I am a newbie and have the following problem. I recently bought STM32F407VET6 and after configuring DFU mode, it was not recognized as STM32 bootloader but as APM32 ISP DFU mode. Is there any way to flash the factory firmware

Best Regards
Anton Georgiev

Re: [SOLVED]Interesting problem

Posted: Mon Jan 02, 2023 10:03 am
by GonzoG
There is no "factory firmware". They come out of factory without any firmware.

The APM32 is not a STM chip and probably won't work with stm32duino.

Re: [SOLVED]Interesting problem

Posted: Mon Jan 02, 2023 3:01 pm
by Ageorgiev86
Works with stm32duino. through a serial port it recognizes it as a stm processor and in a stm32cubeprogrammer. The problem is that when I try to connect via USB, it recognizes it as APM32 ISP DFU mode and cannot be programmed. Is there a chance if I reprogram with slink that something will change?

Re: [SOLVED]Interesting problem

Posted: Mon Jan 02, 2023 3:37 pm
by ag123
just imho, for starters, get a real STM32 board; and chip to start with
there is a list on the stm32duino core repository
https://github.com/stm32duino/Arduino_Core_STM32
the 'preferred'' boards are like STM32F401 Nucleo or F411 Nucleo boards.
They are reasonably priced, has rather generous amount of sram and flash (compared to 'stm32f103c8 blue pills 20k sram 64k flash) and is decently fast - has the 'ART accelerator' and FPU.

The 'clone' chips are for 'advanced' users who is willing to work with possibly undocumented chips.
Technically, you would need to search or request from the APM32 manufacturer for the APM32 reference manuals and specs sheets - pinouts + all other details etc to work with APM32 chips. There is no assurance if any 'clone' chips is after all 'similar' in any way to a stm32, any 'assurance' would need to come from the APM32 manufacturer if you can even find their documents shared publicly.
There are also cases of partial documentation and many parts are undocumented, or in a worse case where documented features and functionality don't match that of a real device. Those things happens.

In all practicality, I'd guess any 3rd party can license ARM IP and design the IO extensions (e.g. gpio, uart, spi, i2c, adc etc ) and make their own ARM based microcontrollers.

Re: [SOLVED]Interesting problem

Posted: Mon Jan 02, 2023 4:38 pm
by GonzoG
Ageorgiev86 wrote: Mon Jan 02, 2023 3:01 pm Works with stm32duino. through a serial port it recognizes it as a stm processor and in a stm32cubeprogrammer. The problem is that when I try to connect via USB, it recognizes it as APM32 ISP DFU mode and cannot be programmed. Is there a chance if I reprogram with slink that something will change?
No, it's not a case of different firmware, it's different hardware.
If you must use USB to flash firmware, you can try HID bootloader.