2011-10-17 11:07 AM
Hello,
I use STM32 for several years, but know I dont know how to solve this problem. When I start my STM32int main(void) { RCC_Configuration(); NVIC_Configuration(); GPIO_Configuration(); ADC_Configuration(); GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE); // Disable JTAG/SWD so pins are availble UART_Configuration(); if (SysTick_Config(SystemFrequency / 1000)) { while (1) {;} } // Pins Off GPIOA->BRR = (GPIO_Pin_8 | GPIO_Pin_14 | GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_15); GPIOB->BRR = (GPIO_Pin_4 | GPIO_Pin_5);
I have to remap JTMS/SWDIO Pins. Later I put all Pins to Off. But it is too late. PA13 has Main-Function ''JTMS/SWDIO'' and PA15 ''JTCK/SWCLK'', PA13 always starts with On, for a secound. This makes problems with additional electronic.... Does anybody know, how to start up a STM32, without active ''JTMS/SWDIO'' and ''JTCK/SWCLK'' Pin? Thank you very mutch. Best Regards Simon2011-10-19 02:37 PM
Sounds like you're missing an include file. You could add a call to RCCPreInit() in the startup.s file before it calls SystemInit(). Or you could leave the code in your main.c file and call it from SystemInit() thus:
extern void RCCPreInit(); void SystemInit (void) { RCCPreInit(); .. I don't think you need to go back to a 2.x library, you just have to understand the start up flow of the 3.x code, and observe there are things the C-runtime, and platform initialization do before calling main(). I'm not sure I like the ''man behind the curtain'' approach that CMSIS brings, and it means I'm more likely to customize the library code rather than use it as-is which kind of reduces the value of abstracting it there in the first place.2011-10-20 03:09 AM
Dear Clive1,
thank you very mutch for excellent help. I think I have now only a few millisecounds with Pin On, I think this should work :) Best Regards Simon