this is the config, seems to work consistently now with the raised phased voltage. Also now have PAS working but it works in both pedal directions.
Using this setup without LCD 3 and it works fine, do you know if the controller is constantly powered.
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>PATH = C:\Program Files (x86)\STMicroelectronics\st_toolset\asm;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Users\controller\AppData\Local\Microsoft\WindowsApps;C:\Program Files\SDCC\bin;C:\Program Files\STMicroelectronics\st_toolset\stvp;C:\Program Files (x86)\STMicroelectronics\st_toolset\stvp;C:\SDCC\usr\local\bin;C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\tools\cygwin\bin
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>del main.hex
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>sdcc --version
SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.7.2 #10526 (MINGW64)
published under GNU General Public License (GPL)
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>make -f Makefile_windows clean
Cleaning files...
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>cd stdperiphlib\src
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.asm
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.rel
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.lk
Could Not Find C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src\*.lk
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.lst
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.rst
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.sym
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.cdb
Could Not Find C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src\*.cdb
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.map
Could Not Find C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src\*.map
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.elf
Could Not Find C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src\*.elf
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.bin
Could Not Find C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src\*.bin
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>cd..
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib>cd..
Could Not Find C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\*.elf
Done.
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>make -f Makefile_windows
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_itc.c StdPeriphLib/src/stm8s_itc.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_clk.c StdPeriphLib/src/stm8s_clk.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_iwdg.c StdPeriphLib/src/stm8s_iwdg.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_gpio.c StdPeriphLib/src/stm8s_gpio.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_exti.c StdPeriphLib/src/stm8s_exti.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_uart2.c StdPeriphLib/src/stm8s_uart2.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_tim1.c StdPeriphLib/src/stm8s_tim1.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_tim2.c StdPeriphLib/src/stm8s_tim2.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_adc1.c StdPeriphLib/src/stm8s_adc1.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_flash.c StdPeriphLib/src/stm8s_flash.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -ogpio.c gpio.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -outils.c utils.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -ocruise_control.c cruise_control.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -ouart.c uart.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oadc.c adc.c
adc.c:76: warning 85: in function adc_init unreferenced local variable : 'ui16_counter'
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -obrake.c brake.c
brake.c:23: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -otimers.c timers.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -opwm.c pwm.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -omotor.c motor.c
motor.c:217: warning 158: overflow in implicit constant conversion
motor.c:231: warning 158: overflow in implicit constant conversion
motor.c:244: warning 158: overflow in implicit constant conversion
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oPAS.c PAS.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oSPEED.c SPEED.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oupdate_setpoint.c update_setpoint.c
update_setpoint.c:253: warning 85: in function update_setpoint unreferenced function argument : 'PAS'
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -odisplay.c display.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -odisplay_kingmeter.c display_kingmeter.c
sdcc -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug main.c StdPeriphLib/src/stm8s_itc.rel StdPeriphLib/src/stm8s_clk.rel StdPeriphLib/src/stm8s_iwdg.rel StdPeriphLib/src/stm8s_gpio.rel StdPeriphLib/src/stm8s_exti.rel StdPeriphLib/src/stm8s_uart2.rel StdPeriphLib/src/stm8s_tim1.rel StdPeriphLib/src/stm8s_tim2.rel StdPeriphLib/src/stm8s_adc1.rel StdPeriphLib/src/stm8s_flash.rel gpio.rel utils.rel cruise_control.rel uart.rel adc.rel brake.rel timers.rel pwm.rel motor.rel PAS.rel SPEED.rel update_setpoint.rel display.rel display_kingmeter.rel
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>ren main.ihx main.hex
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>STVP_CmdLine -BoardName=ST-LINK -ProgMode=SWIM -Port=USB -Device=STM8S105x6 -FileProg=main.hex -verbose -no_loop
STVP_CmdLine version 1.6
Verbose ON
Log activity ON
Display Progress OFF
Message box warning if protect option byte ON
Loop mode OFF
Erase device OFF
Blank check device OFF
Verify device ON
Configuration:
BoardName=ST-LINK ST-LINK_ID=0 Device=STM8S105x6 Port=USB ProgMode=SWIM
>>> Filling PROGRAM MEMORY image in computer with Blank Value
<<< Filling PROGRAM MEMORY image in computer succeeds
>>> Loading file main.hex in PROGRAM MEMORY image in computer
<<< Loading file succeeds
Hit 'Esc' key to abort during communication.
>>> Programming PROGRAM MEMORY
<<< Programming PROGRAM MEMORY succeeds
>>> Verifying PROGRAM MEMORY
<<< Verifying PROGRAM MEMORY succeeds
C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>pause
Press any key to continue . . .
stancecoke said:
reset said:
Hi I'm trying to understand the delay in motor starting, just wondered if anyone has encountered it? thanks
Please tell us, which
commit you have tried and what the content of your
config.h is!
regards
stancecoke