Lexus GS450H VCU V3 STM32 Software Development

Topics concerning the Toyota and Lexus inverter drop in boards
User avatar
johu
Site Admin
Posts: 5769
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1010 times
Contact:

Re: Lexus GS450H VCU V3 STM32 Software Development

Post 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 :)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Lexus GS450H VCU V3 STM32 Software Development

Post by Jack Bauer »

Thanks Johannes:)
I'm going to need a hacksaw
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: Lexus GS450H VCU V3 STM32 Software Development

Post 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.
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: Lexus GS450H VCU V3 STM32 Software Development

Post 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.
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Lexus GS450H VCU V3 STM32 Software Development

Post 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.
I'm going to need a hacksaw
User avatar
johu
Site Admin
Posts: 5769
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1010 times
Contact:

Re: Lexus GS450H VCU V3 STM32 Software Development

Post 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
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
xp677
Posts: 436
Joined: Sat Jul 27, 2019 10:53 am
Location: UK
Has thanked: 1 time
Been thanked: 13 times

Re: Lexus GS450H VCU V3 STM32 Software Development

Post 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.
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: Lexus GS450H VCU V3 STM32 Software Development

Post 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.
User avatar
mdrobnak
Posts: 692
Joined: Thu Mar 05, 2020 5:08 pm
Location: Colorado, United States
Has thanked: 1 time
Been thanked: 5 times

Re: Lexus GS450H VCU V3 STM32 Software Development

Post by mdrobnak »

Awesome! Nice work. :)
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Lexus GS450H VCU V3 STM32 Software Development

Post by Jack Bauer »

Great work:)
I'm going to need a hacksaw
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: Lexus GS450H VCU V3 STM32 Software Development

Post 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.
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Lexus GS450H VCU V3 STM32 Software Development

Post 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.
I'm going to need a hacksaw
User avatar
slanceley
Posts: 44
Joined: Wed Nov 06, 2019 5:13 pm
Has thanked: 6 times

Re: Lexus GS450H VCU V3 STM32 Software Development

Post 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!
User avatar
steveknox
Posts: 85
Joined: Mon Mar 11, 2019 9:36 am
Location: Bormley, UK
Has thanked: 15 times
Been thanked: 5 times
Contact:

Re: Lexus GS450H VCU V3 STM32 Software Development

Post by steveknox »

Much has happened in this space. Take a look at this thread:
viewtopic.php?f=3&t=1277
Post Reply