fixed bugs in multistepper: eeprom in flash + adc, tested on TMC2130, but don't work on TMC2230

This commit is contained in:
Edward Emelianov
2023-02-24 23:29:34 +03:00
parent 1a8345d4f0
commit 59d8f8f515
18 changed files with 172 additions and 130 deletions

View File

@@ -22,6 +22,7 @@
#include "flash.h"
#include "hardware.h"
#include "proto.h"
#include "steppers.h"
#include "usb.h"
#define MAXSTRLEN RBINSZ
@@ -40,9 +41,10 @@ int main(void){
StartHSI();
SysTick_Config((uint32_t)48000); // 1ms
}
//flashstorage_init();
hw_setup(); // GPIO, ADC, timers, watchdog etc.
USBPU_OFF(); // make a reconnection
flashstorage_init();
hw_setup(); // GPIO, ADC, timers, watchdog etc.
init_steppers();
USB_setup();
CAN_setup(the_conf.CANspeed);
adc_setup();
@@ -57,6 +59,7 @@ int main(void){
}
CAN_proc();
USB_proc();
process_steppers();
if(CAN_get_status() == CAN_FIFO_OVERRUN){
USB_sendstr("CAN bus fifo overrun occured!\n");
}