Page 4 of 4

Re: Lexus GS450H VCU V3 STM32 Software Development

Posted: Thu Dec 17, 2020 5:18 pm
by johu
Just became aware of this. So if you don't mind putting it on github I'd chime in occasionally with refactoring or solving hardware problems. I know my way around the stm32 pretty well by now.
But as long as you get along I won't disturb :)

Re: Lexus GS450H VCU V3 STM32 Software Development

Posted: Thu Dec 17, 2020 6:05 pm
by Jack Bauer
Thanks Johannes:)

Re: Lexus GS450H VCU V3 STM32 Software Development

Posted: Thu Dec 17, 2020 10:45 pm
by Dilbert
johu wrote: Thu Dec 17, 2020 5:18 pm Just became aware of this. So if you don't mind putting it on github I'd chime in occasionally with refactoring or solving hardware problems. I know my way around the stm32 pretty well by now.
But as long as you get along I won't disturb :)
Yes sounds good, your in depth knowledge of the stm32 is more than welcome. I want to make sure that my pseudo 500khz transfer clock doesn't move with respect to my tx/rx data. It appears to be in sync when I look on the scope.

I have my source on git, I'll do some tidy up tomorrow and publish a link. I'm using cubemx + gcc/atollic and an f103 demo kit.

I've ported over the v3 of the gs450 firmware, so will bring the inverter to the garage and test with the motor over the next few days.

Re: Lexus GS450H VCU V3 STM32 Software Development

Posted: Fri Dec 18, 2020 8:40 am
by Dilbert
The code is quite simple at the moment and is for the f103C8T processor i have available here.

https://github.com/dpowelltu/ToyotaHybridx1

Setup code done in cubemx and atollic used to compile the application.

Re: Lexus GS450H VCU V3 STM32 Software Development

Posted: Fri Dec 18, 2020 11:24 am
by Jack Bauer
Excellent. I'll have hardware early next week and will send one to you and do some testing here on the E65.

Re: Lexus GS450H VCU V3 STM32 Software Development

Posted: Fri Dec 18, 2020 4:58 pm
by johu
Just remembered: the 2 kb page size must also be accounted for when saving parameters and CAN map. So in hwdefs.h change

Code: Select all

#define FLASH_PAGE_SIZE 1024
#define PARAM_ADDRESS 0x0801FC00
#define PARAM_BLKSIZE FLASH_PAGE_SIZE
#define CANMAP_ADDRESS 0x0801F800
to

Code: Select all

#define FLASH_PAGE_SIZE 2048
#define PARAM_ADDRESS 0x0801F800
#define PARAM_BLKSIZE FLASH_PAGE_SIZE
#define CANMAP_ADDRESS 0x0801F000

Re: Lexus GS450H VCU V3 STM32 Software Development

Posted: Fri Dec 18, 2020 7:47 pm
by xp677
FYI, this:

Code: Select all

  //checksum for setup data!
  htm_checksum=0;
  for(int i=0;i<78;i++)htm_checksum+=htm_data_setup[i];
  htm_data_setup[78]=htm_checksum&0xFF;
  htm_data_setup[79]=htm_checksum>>8;
The results are already be in the htm_data_setup array. Since that array never changes, there's no reason to calculate this. In fact I missed a trick here, this array could have been a const.

Re: Lexus GS450H VCU V3 STM32 Software Development

Posted: Sat Dec 19, 2020 4:27 pm
by Dilbert
Connected the motor up today and controlled it from my stm32 demo board. My power supply wasn't able to spin it very fast, I think that's due to the low temp and the oil being cold. But I could run forward / back no problem.

Re: Lexus GS450H VCU V3 STM32 Software Development

Posted: Sat Dec 19, 2020 4:46 pm
by mdrobnak
Awesome! Nice work. :)

Re: Lexus GS450H VCU V3 STM32 Software Development

Posted: Sat Dec 19, 2020 4:48 pm
by Jack Bauer
Great work:)

Re: Lexus GS450H VCU V3 STM32 Software Development

Posted: Sat Dec 19, 2020 5:33 pm
by Dilbert
I've also made a state based version which can be called from a 1ms task or interrupt.

Hopefully we can use common clock settings for stm32-car code, I'll post my clock settings from cubemx.

Re: Lexus GS450H VCU V3 STM32 Software Development

Posted: Mon Dec 21, 2020 9:17 am
by Jack Bauer
Full kit on the way to Dilbert today to assist with the GS450H module development.

Don't forget I am offering two more full kits totally free of charge inc worldwide delivery to those who assist in this project.

Re: Lexus GS450H VCU V3 STM32 Software Development

Posted: Fri Jan 15, 2021 2:27 pm
by slanceley
I am clueless about all this but willing to contribute to crowd funding if that's still required. If not, I'll shut up and let you smart folks carry on!

Re: Lexus GS450H VCU V3 STM32 Software Development

Posted: Fri Jan 15, 2021 3:32 pm
by steveknox
Much has happened in this space. Take a look at this thread:
viewtopic.php?f=3&t=1277