work in progress hip9011 integration
- AndreyB
- Site Admin
- Posts: 14331
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: hip9011 integration
Non-hip9011 implementation forked into https://rusefi.com/forum/viewtopic.php?f=5&t=1469
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- md_sanci
- Posts: 69
- Joined: Thu May 30, 2019 6:13 am
- Location: Romania
- Github Username: shadowm60
- Slack: Alex M
- Contact:
Re: hip9011 integration
Hello all,
I have made today a new addon pcb for Frankestein with HIP9011. I made the circuit as on frankenso.
From console i have the following output:
2019-07-08 09_41: EngineState: confirmation_hipinfo:7
2019-07-08 09_41: EngineState: spi 1=No/2=Yes/3=Yes
2019-07-08 09_41: EngineState: enabled=Yes state=READY_TO_INTEGRATE bore=76.50mm freq=7.48kHz PaSDO=6
2019-07-08 09_41: EngineState: band_index=42 gain 1.00/index=-1 output=PC0
2019-07-08 09_41: EngineState: integrator index=-1 knockVThreshold=4.00 knockCount=0 maxKnockSubDeg=20.00
2019-07-08 09_41: EngineState: spi=SPI_DEVICE_2 IntHold@PB11/2 response count=2 incorrect response=1 NOT GOOD
2019-07-08 09_41: EngineState: CS@PB0 updateCount=0
2019-07-08 09_41: EngineState: hip 0.00v/last=1.03@PC0/max=0.00 adv=0
2019-07-08 09_41: EngineState: mosi=PB15
2019-07-08 09_41: EngineState: miso=PB14
2019-07-08 09_41: EngineState: sck=PB13
2019-07-08 09_41: EngineState: start 35.00 end 135.00
2019-07-08 09_41: EngineState: knock now=No/ever=No
2019-07-08 09_42: EngineState: WARNING: unrealistic IAT -273.14
2019-07-08 09_42: EngineState: WARNING: unrealistic IAT -273.14
Is it normal that it will not respond for the first request? i even placed the capacitorbetween CS and XTAL, it is stated DNP put for a quick test i paced a 24pF one
I have made today a new addon pcb for Frankestein with HIP9011. I made the circuit as on frankenso.
From console i have the following output:
2019-07-08 09_41: EngineState: confirmation_hipinfo:7
2019-07-08 09_41: EngineState: spi 1=No/2=Yes/3=Yes
2019-07-08 09_41: EngineState: enabled=Yes state=READY_TO_INTEGRATE bore=76.50mm freq=7.48kHz PaSDO=6
2019-07-08 09_41: EngineState: band_index=42 gain 1.00/index=-1 output=PC0
2019-07-08 09_41: EngineState: integrator index=-1 knockVThreshold=4.00 knockCount=0 maxKnockSubDeg=20.00
2019-07-08 09_41: EngineState: spi=SPI_DEVICE_2 IntHold@PB11/2 response count=2 incorrect response=1 NOT GOOD
2019-07-08 09_41: EngineState: CS@PB0 updateCount=0
2019-07-08 09_41: EngineState: hip 0.00v/last=1.03@PC0/max=0.00 adv=0
2019-07-08 09_41: EngineState: mosi=PB15
2019-07-08 09_41: EngineState: miso=PB14
2019-07-08 09_41: EngineState: sck=PB13
2019-07-08 09_41: EngineState: start 35.00 end 135.00
2019-07-08 09_41: EngineState: knock now=No/ever=No
2019-07-08 09_42: EngineState: WARNING: unrealistic IAT -273.14
2019-07-08 09_42: EngineState: WARNING: unrealistic IAT -273.14
Is it normal that it will not respond for the first request? i even placed the capacitorbetween CS and XTAL, it is stated DNP put for a quick test i paced a 24pF one
- AndreyB
- Site Admin
- Posts: 14331
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: hip9011 integration
Not good is well... Not good. Also not normal. Also bad. Also a very bad sign.
If you go over this thread you will see multiple level of hell we had with this chip, it could be your turn to take the lead
Do you have a log analyzer? Do you have an oscilloscope? Both would be nice to hook up here - looking at analog output signal gives you a clear idea if hip9011 has started or not.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- md_sanci
- Posts: 69
- Joined: Thu May 30, 2019 6:13 am
- Location: Romania
- Github Username: shadowm60
- Slack: Alex M
- Contact:
Re: hip9011 integration
So what i did, rusefi console, execute a reboot, and then i have 3 out of 3.russian wrote: ↑Mon Jul 08, 2019 7:21 amNot good is well... Not good. Also not normal. Also bad. Also a very bad sign.
If you go over this thread you will see multiple level of hell we had with this chip, it could be your turn to take the lead
Do you have a log analyzer? Do you have an oscilloscope? Both would be nice to hook up here - looking at analog output signal gives you a clear idea if hip9011 has started or not.
Basically, if i have stable 5v and time for the ic to start, it looks like it is working, if i can go with this forward tunning the car, i will come back later to this topic, to see if it is an issue of XTAL or we should allow the ic a bit more time to start. Maybe a mechanism to restart if it is not responding... i promise i will look into this For now i have to get a logical analyzer since my usb oscope is way to slow
Re: hip9011 integration
TPIC or HIP chip?
We had many issues getting the XTAL to start clicking away. I believe the chip we happened to use desires a driven signal from an MCU, instead of an XTAL. Once the XTAL starts, often by simply touching it, then it was working OK, but it was difficult to get it to start clocking away.
We had many issues getting the XTAL to start clicking away. I believe the chip we happened to use desires a driven signal from an MCU, instead of an XTAL. Once the XTAL starts, often by simply touching it, then it was working OK, but it was difficult to get it to start clocking away.
Welcome to the friendlier side of internet crazy
- md_sanci
- Posts: 69
- Joined: Thu May 30, 2019 6:13 am
- Location: Romania
- Github Username: shadowm60
- Slack: Alex M
- Contact:
Re: hip9011 integration
So i have tried last night a simple thing and went wrooooongkb1gtt wrote: ↑Mon Jul 08, 2019 5:06 pmTPIC or HIP chip?
We had many issues getting the XTAL to start clicking away. I believe the chip we happened to use desires a driven signal from an MCU, instead of an XTAL. Once the XTAL starts, often by simply touching it, then it was working OK, but it was difficult to get it to start clocking away.
First spi command if no reply, then repeat it. after 2 attempt, the response from the HIP was ok, but the chip did not functioned, i had a lot of errors. So i would say i have the XTAL issue as well, what i missed to place on the PCB is the 2M resistor that is in the schematic, maybe that would help?
So i will go like before, start up the ECU, then execute a reboot command. It looks ok after that, it is working correctly.
- md_sanci
- Posts: 69
- Joined: Thu May 30, 2019 6:13 am
- Location: Romania
- Github Username: shadowm60
- Slack: Alex M
- Contact:
Re: hip9011 integration
I have built the circuit as in the frankenso schematic, did somebody tried the schematic from the datasheet?kb1gtt wrote: ↑Mon Jul 08, 2019 5:06 pmTPIC or HIP chip?
We had many issues getting the XTAL to start clicking away. I believe the chip we happened to use desires a driven signal from an MCU, instead of an XTAL. Once the XTAL starts, often by simply touching it, then it was working OK, but it was difficult to get it to start clocking away.
- 4Mhz XTAL
- 2x 20pF
- 1M resistor?
Is it more stable like this? i plan to try it today.
Re: hip9011 integration
We tried many configurations, many were even scabbed on hacks that were never published. This has been a huge problem.
Welcome to the friendlier side of internet crazy
Re: hip9011 integration
Here's the "normal" behavior of HIP9011 on Prometheus board (no XTAL issues whatsoever):
Code: Select all
enabled=Yes state=1 bore=87.50mm freq=6.54kHz PaSDO=6
band_index=39 gain 1.00/index=-1 output=PC0
integrator index=-1 knockVThreshold=4.00 knockCount=0 maxKnockSubDeg=20.00
spi=SPI_DEVICE_3 IntHold@PC14/2 response count=3 incorrect response=0 ok
CS@PD1 updateCount=0
hip 0.00v/last=2.26@PC0/max=0.00 adv=0
Re: hip9011 integration
I believe our issue is with the TPIC8101, which is based on the HIP9011. I suspect the TPIC removed or changed some things, which is causing it to fail to start.
My theory on this is all chicken bones and voodoo. No real evidence, just gut feel.
My theory on this is all chicken bones and voodoo. No real evidence, just gut feel.
Welcome to the friendlier side of internet crazy
Re: hip9011 integration
The Frankenso is also the TPIC8101DW G4. We have about a 20% failure to start rate. Some of the crystals will start, others will not. Typically we can make it start by a very light touch. AKA that's enough of an upset to get the crystal oscillating.
- Attachments
-
- Frankenso_TPIC_close_up-gimp-exported.jpg (4.23 MiB) Viewed 18054 times
Welcome to the friendlier side of internet crazy
- md_sanci
- Posts: 69
- Joined: Thu May 30, 2019 6:13 am
- Location: Romania
- Github Username: shadowm60
- Slack: Alex M
- Contact:
Re: hip9011 integration
I do not have hw knowladge, but i see the reference schematic from hip is using 4Mhz quartz and 20 pF capacitors, this is used in phrometeus as well only with 8Mhz if i remember correctly. In Frankenso it has a resistor in series with XTAL and different capacitor values?
Would this be the case why it has trouble starting? to low voltage to excite the Quartz?
Would this be the case why it has trouble starting? to low voltage to excite the Quartz?
Re: hip9011 integration
Part of our headaches did include trying 4MHz and 20pF caps. If we could find the HIP chip, I suspect we would find no problems. The TPIC specifically shows this driven by an MCU not an XTAL. So far I think the best hack was to add a coupling cap to a near by trace. This seemed to smack it sum and get it started. However it's a really crazy garbage way to make it comply.
Welcome to the friendlier side of internet crazy
-
- running engine in first post
- Posts: 1494
- Joined: Mon Jan 30, 2017 2:05 am
- Location: Seattle-ish
Re: hip9011 integration
Why not just drive it from the MCU? The STM32 has one or two MCO (master clock out) pin(s) that output a clock divided off of the core clock, which would work great for this application.
Re: hip9011 integration
Which discovery pin should be connected? Can we try it by scabbing a wire in there? Once we see it work with a wire, then I could run a trace.
Welcome to the friendlier side of internet crazy
Re: hip9011 integration
I looked around for other implementations of the HIP9011/TPIC8101 ICs and from what I can see no one is using a crystal for clock. They all seem to use external clock from the CPU. Both chips are clones of each other and they both support xtal, ceramic resonators and external clocks as their clock input according to their datasheets. Maybe there is a flaw with the design of the xtal driver in the chip but no one cared to redesign because everyone is using external clock or maybe these ICs are particularly picky about the xtal used. An 8MHz xtal from one manufacturer doesn't have the same characteristics with one from another manufacturer. I don't know if the discovery board can output a clock signal but if it can it will solve this problem once and for all and it's worth a shot.
- Fonzie
- Posts: 13
- Joined: Sun Jan 28, 2018 3:06 pm
- Location: 39000 Lons-le-Saunier, France
- Github Username: duparq
- Contact:
Re: hip9011 integration
According to the STM32F411xC/E datasheets (RM0383, DM00115249), PA8 can be configured as alternate function MCO_1 (Microcontroller Clock Output) and PC9 can be configured as alternate function MCO_2.
* MCO_1 can be generated from HSI, LSE, HSE, PLL through a 1 to 5 prescaler;
* MCO_2 can be generated from HSE, PLL, SYSCLK, PLLI2S through a 1 to 5 prescaler.
* MCO_1 can be generated from HSI, LSE, HSE, PLL through a 1 to 5 prescaler;
* MCO_2 can be generated from HSE, PLL, SYSCLK, PLLI2S through a 1 to 5 prescaler.
Re: hip9011 integration
Can someone scab in a wire from one of these STM pins, then setup the circuit as noted below. You should have some pads at the XTAL circuit, you would just need to add a wire to get the STM signal over to the clock area.
- Attachments
-
- TPIC_Clock_Circuit.PNG (14.58 KiB) Viewed 17944 times
Welcome to the friendlier side of internet crazy
- md_sanci
- Posts: 69
- Joined: Thu May 30, 2019 6:13 am
- Location: Romania
- Github Username: shadowm60
- Slack: Alex M
- Contact:
Re: hip9011 integration
Can you point out to what pin should i connect? i can rewire it tomorrow, but it would be faster if the code is modified and i just flash a nightbuild.
- AndreyB
- Site Admin
- Posts: 14331
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: hip9011 integration
i have no idea what would need to be modified in the code for this. this is low priority for me unfortunatelly, i would be happy to meege your high quality pull requests if any but thats all i can help with here
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Re: hip9011 integration
Per the above post from @Fonzie, PA8 or PC9. I think the firmware could be a fairly minimal change. I'm not sure who could make the change. I'd bet ChibiOS has a function or similar which would set this, but I do not know exactly what.
Welcome to the friendlier side of internet crazy
- Dron_Gus
- contributor
- Posts: 455
- Joined: Wed Nov 13, 2013 1:11 pm
- Location: S-Pb
- Github Username: dron0gus
Re: hip9011 integration
On my version of ECU 9011 is clocked from STM32 this way. But I did not try 9011 yet.
Decided to save some $$ and clock 9011 from clock out of STM32.
Re: hip9011 integration
-- Did your version follow the above posted schematic?
-- How did you wire the clock signal?
-- Did it work?
-- Most important, how did the software get changed to generate the clock signal?
-- How did you wire the clock signal?
-- Did it work?
-- Most important, how did the software get changed to generate the clock signal?
Welcome to the friendlier side of internet crazy
- Dron_Gus
- contributor
- Posts: 455
- Joined: Wed Nov 13, 2013 1:11 pm
- Location: S-Pb
- Github Username: dron0gus
Re: hip9011 integration
Yes.
PA8 to input of posted schematic. PA8 has alternative function MCO1. On STM32F7 4 different internal clocks can be routed to MCO1. With dividers from 1/1 to 1/5.
I did not try access 9011 over SPI yet. But I checked clock signal with oscilloscope.
Set proper clock source and divider:
https://github.com/rusefi/rusefi/blob/master/firmware/config/stm32f4ems/mcuconf.h#L96
and correct Alternative Function for pin:
https://github.com/rusefi/rusefi/blob/master/firmware/config/boards/subaru-ej20gn/board.h#L126
https://github.com/rusefi/rusefi/blob/master/firmware/config/boards/subaru-ej20gn/board.h#L193
- md_sanci
- Posts: 69
- Joined: Thu May 30, 2019 6:13 am
- Location: Romania
- Github Username: shadowm60
- Slack: Alex M
- Contact:
Re: hip9011 integration
Hello all, i did tried it and for some reason it is not working. Keep in mind i have a proto pcb on top of stm32 discovery, i will do more checking but the mco1 signal looks ok on my cheap oscope.
Will look into it more next days.
Will look into it more next days.
- Attachments
-
- IMG_20190726_192803_3.jpg (4.61 MiB) Viewed 17802 times
- AndreyB
- Site Admin
- Posts: 14331
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: hip9011 integration
As of April 2020 we have no idea if that's real knock data we got from HIP9011 or weather on Mars. As of April 2020 a convincing experiment was not yet performed.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute