Speeduino is now on Github Sponsors (Rather than Patreon): https://github.com/sponsors/noisymime
Any general discussion around the firmware, what is does, how it does it etc.
By NickZ
im also about to release a stm32f07 complete board, 12 high current outputs, 8 ignition, 4 low current outputs 9 analogue input, DBW, Wideband, Stepper Idle, CAN etc
By Tjeerd
NickZ wrote:
Wed Sep 18, 2019 3:59 am
im also about to release a stm32f07 complete board, 12 high current outputs, 8 ignition, 4 low current outputs 9 analogue input, DBW, Wideband, Stepper Idle, CAN etc
Hi Nick

Hmm we are working on the same things again. I just send out a board for fabrication to China. Proto Nr2 for me that is.
By Tjeerd
NickZ wrote:
Tue Sep 17, 2019 10:12 pm
not sure i understand, why are you needing a battery to keep the tune?
What im currently working with has no trouble without a battery.
Hi Nick

I use the battery backed sram for now to store the tune (this must be changed to use SPI flash or onboard flash of the STM32 in the future). The advantage of that is for development only actually.

1. Sram has no wear when erasing/writing so unlimited number of erase/write cycles without destroying the memory. That also means no wear levelling need to be implemented.
2. It is very fast because it is just the RAM of the CPU
3. No sector size erase things to worry about.

I think you are well aware of the the biggest difficulty for using the Spi eeprom/Flash eeprom implementations. I will explain it here for future reference.

This has to do with hardware limitations. Flash/spi flash have a minimum number of bytes per erase. (256 byte sectors on the SPI windbond flash for example). The last time i checked the implementation of the storage in speeduino does check if a byte is changed and erases->writes if it changed. This does not play well with a erase of minimum 256 bytes per erase/write cycle. The check/update should be made on a 256 byte basis then.

Maybe some sort of wear levelling must be implemented because the number of Flash erases->writes is limited to around 10.000. This is a lot so maybe not needed necessarily.

Have you tackled the sector erase problem with the current per byte basis of writing a tune to memory? Any pointers on the used library/Files in the current code base I can a look at? That would be a step forward for actually using an STM32 for long term in a car.
By dazq
When I was working with vitor on stm32 firmware dev i tried spi Fram and spi eeprom.
Both these worked well .
I actually removed the spi flash chip on my 407 black PCB and refitted a spi eeprom.
Despite much work at the time neither of us made much headway in using spi flash.
By Tjeerd
Hi All

I am up to speed with where i left off a couple of months ago. This is the manual to compile/test the code on a Black stm32F407VE6T board from eBay.

Install tool chain
1. Install the latest arduino IDE (1.8.10)
2. Install the stm32duino core from: https://github.com/stm32duino/Arduino_Core_STM32 (version 1.6.1)
3. install https://www.st.com/content/st_com/en/pr ... eprog.html

Build code
1. Download the speeduino code (master)
2. Open the code in de arduino IDE.
3. In arduino IDE select Tools->Board: GENERIC STM32F4 series
4. In Arduino IDE select Tools->Board part number: "BLACK F407VE"
5. In Arduino IDE select Tools->USART support: Enabled (generic serial)
6. In Arduino IDE select Tools->USB support: CDC (generic serial)
7. Edit the board.txt file located in
--------Windows: C:\Users\%USER%\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.6.1\
--------Linux: ~/.arduino15/packages/STM32/hardware/stm32/1.6.1/boards.txt
8. Replace line 754 with the following: GenF4.build.extra_flags= -DCORE_STM32_OFFICIAL -DSRAM_AS_EEPROM -D{build.product_line} {build.enable_usb} {build.xSerial} {build.bootloader_flags}
9. Open an example with serial port (SerialCallREsponse) en build this project FIRST!
10. If succeeded build the speeduino project.

Building the code should now work:

Hardware modifications
1. Remove the R21 resistor from the board (close to usb port)
2. Put the jumper close to the CPU (BT0) to connect to the 3.3 volt instead of GND (one step up)
3. Reset the board.

1. In Arduino IDE select Programmer: "STM32CubeProgrammer DFU"
2. Upload the code
3. Put the Jumper back in its orginal position.

After all these steps you should be able to connect to the board using the USB cable and connect to it with tuner studio. Tested the compilation in both windows 10 and Linux Ubuntu 18.04.3 LTS

The pin make no sense at the moment, but that is going to be the next step.
By Tjeerd
Added SPI flash on the black ebay boards as EEPROM. I did create a PR in github to incorporate it into the master.
By 960
I am really struggling with compiling this.

I can compile for black_f407ve in PIO, but cant get any response at usb or uart.

In Arduino IDE, I cant compile at all. Currently getting a error in "extern void oneMSIntervalIRQ(stimer_t *Timer)"

Other samples in Arduino (SerialCallREsponse)works just fine..
By Tjeerd
Hi 960

I see ST released a new version of their core. I know a lot will change with respect to the hardwaretimers an probably break compilation. Did you use the latest version? (V1.7) it is possible that does not work. I used version 1.6.1 of the core. I will try and fix this upcoming days for version 1.7

This will also work only for the black stm32 versions of ebay/aliexpress. That is the board i am targeting with this code.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 15
Decoders - What do you want to see?

It is completely possible to just do it though. T[…]

Alrighty, had some time over the weekend and its w[…]

Perhaps post your tune. And a log of it cranking/r[…]

Hi JHolland Thanks for the comment. This gives me[…]

Still can't find what you're looking for?