AccelStepper with F407

Discussions about the STM32generic core
FiveO
Posts: 27
Joined: Mon Oct 16, 2017 6:41 am

Re: AccelStepper with F407

Post by FiveO » Wed Jan 24, 2018 5:38 pm

zmemw16 wrote:
Wed Jan 24, 2018 3:38 pm
how are you downloading to target ? if st-link or jtag, pretty sure the low bits of PB and a couple in PA get messed with.

use disableDebugPorts(); // in setup
use enableDebugPorts(); // in the code that terminates execution maybe on a button press ... ... ...

if its HAL you may need to check which mode debug is set to ? i use CubeMX and then in the sys device i select the debug mode, generate code & report to see the values and masks etc

usual questions btw
os, version, arduino version, which core, from where & when, download method & target is f407ve ?

stephen
Downloading with ST-Link V2. On f103 it works. Other thing like relays, i2c ,serial with bluetooth works normal on f407 after ST-Link.

That debug and HAL is new to me. For now I'l skip that part.

Win10, Arduino 1.8.5, STM32Generic, Today, ST-Link v2, STM32F407VE.
Same way and code works with F103 bluebill and Arduino Mega.

FiveO
Posts: 27
Joined: Mon Oct 16, 2017 6:41 am

Re: AccelStepper with F407

Post by FiveO » Fri Jan 26, 2018 10:17 am

Ok. I tested my stepper with this code:

Code: Select all

void setup() {                
  pinMode(PE14, OUTPUT); // Direction
  pinMode(PE15, OUTPUT); // Step
  digitalWrite(PE14, LOW); // Direction
  digitalWrite(PE15, LOW); // Step
}

void loop() {
  digitalWrite(PE15, HIGH);
  delay(1);          
  digitalWrite(PE15, LOW); 
  delay(1);          
}
And it works! But I haven't tried that Accelstepper lib again, so I don't know whether it was my problem or not.

Post Reply