![]() ![]() ↳ STM boards (Discovery, Eval, Nucleo.↳ Let us know a bit about you and your projects.Still hanging, do I need to NULL out the original pin maps? IE the ones i copied from? This assuming the same mappings cant be used on multiple pins? analogWrite(scan2,testpwm) //locks up PB5ĪnalogWrite (scanRED2, testpwm) //locks up PA15Ĭode: Select all extern const stm32_pin_info PIN_MAP =, /* PC15 */ analogWrite(scan1,testpwm) // locks up PB4 The loop function is called in an endless loop ![]() The setup function is called once at startup of the sketch clockĪFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE RCC->APB2ENR |= RCC_APB2ENR_AFIOEN // Enable A.F. Google suggests this but its not working for me. Found out its a Jtag reserved pin, but struggling to find how to disable the jtag to free up the io. When ever i try to use PA15 the pin is stuck high. I need to free up PA15, im using SWD to program but not jtag. And 2 how do I get PWM working on those pins, assuming theres something else im missing? Using the PWM outputs is safe if you dont change the frequency, though. The Arduino uses Timer 0 internally for the millis() and delay() functions, so be warned that changing the frequency of this timer will cause those functions to be erroneous. So firstly how do i set the jtag pins to gpio without breaking SWD as the method already mentioned doesnt work. See the Arduino source file wiring.c for details. Now the diagram listed above says these are PWM pins. Ive had to hotwire a reset line to the reset pin (this isnt currently broken out on my PCB design) and erase the chip from stlink utility to get it back up and running.īut while this did free up those pins, they wouldnt function with PWM controls at all. But im not using JTAG, however i am using SWD Stlink for programming.īellow Mr Burnette mentioned linked me to that forum post to useīut this doesnt work and kills SWD for programming. PA15 and PB4 are normally reserved for JTAG. I need pwm control on these leds as ground sinks. ![]() Updated question heres there more detailed problem please reread. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |