reset versus F10 versus F11
bozo
Posts: 70
Hi all,
the behaviour of one of my programs is not consistent between the following 3 events:
(a) manual reset (pushbutton on Resn)
(b) compile and load RAM
(c) compile and load EEPROM
For cases (a) and (b), the behaviour is similar, but for case (c) it is slightly different.
In all cases it is the same code that is either being reset or loaded.
I'm using Brad's spin tool, and the C3.
I have no idea what is going on here. The program works fine when it is kicked off after loading to EEPROM.
It was only when I was testing its behaviour after manual reset that I noticed the discrepancy.
The differences in behaviour are totally repeatable each time.
Does anyone have any clues?
note: for what it's worth, my program is not writing anything into the EEPROM, and the discrepancy I am seeing is related
to using the full duplex serial object
thanks,
the behaviour of one of my programs is not consistent between the following 3 events:
(a) manual reset (pushbutton on Resn)
(b) compile and load RAM
(c) compile and load EEPROM
For cases (a) and (b), the behaviour is similar, but for case (c) it is slightly different.
In all cases it is the same code that is either being reset or loaded.
I'm using Brad's spin tool, and the C3.
I have no idea what is going on here. The program works fine when it is kicked off after loading to EEPROM.
It was only when I was testing its behaviour after manual reset that I noticed the discrepancy.
The differences in behaviour are totally repeatable each time.
Does anyone have any clues?
note: for what it's worth, my program is not writing anything into the EEPROM, and the discrepancy I am seeing is related
to using the full duplex serial object
thanks,
Comments
I did some more testing and noted that if I add a 3-second delay before calling my first cognew(), it makes a difference.
Is there some minimum timing requirement that needs to be observed? I wouldn't have thought so?
the first code to execute is this: (note the 3 second delay here makes all the difference to behaviour at reset)
note here that the LCD and Maths cogs are not in question, they simply drive a LCD display and do some maths
the other cog though handles serial comms to an ECU, this is the problem area ... in here is a call to start up a full duplex serial object (below)
the discrepancy in behaviour I am seeing is related to the serial comms between my prop and my ECU - when I load to EEPROM, the propeller
talks to my ECU perfectly, but when I trigger a manual reset, it fails to 'wake up' the ECU (unless I have the 3-second delay at
the start of my code).
I would have thought that there should be no difference in behaviour of the propeller whether it is coming out of reset from a load to
EEPROM or load to RAM or just a plain manual reset. ??
cheers,
Mark
I'm working on a data acquisition system (propeller, GPS, A/D channels, Wheel speed, rpm, etc) for our
Bonneville sidecar (GSXR1000K6, LCR)
Perhaps we couild compare notes???
Rick Murray
I'm happy to share whatever you like ... all I am doing is using the OBD port and pulling all the sensor values out of my ECU and displaying them on a 16x2 LCD (and later I want to write logged values to the SD card in the C3). So far I can pull out the RPM, throttle position, intake air pressure on each cylinder, water temp, air temp, battery voltage, ignition advance angle, and gear position. All comms are at 10400bps and use KWP2000 (key word protocol 2000).
cheers,
Mark
... unless, ... unless it can't handle being woken up by the 'fast init' process until some sort of timer expires in the ECU - and the load EEPROM time is sufficiently long enough to let that timer expire and allow the ECU to be receptive to another fast init ...
I think that might be it!
Time to re-read the specs on OBD.
Thanks for the thinking aloud. Sometimes it is very helpful!
cheers,
MarkW
These were complied on BST, not that I can see that it would change anything.
One other thing that I found was that some of the pins (p28 & p29) put out some pulses that I didn't expect from a reset.
Let us know what you find.
After I thought a bit, I should ask the question of which Suzuki. The system on a motorcycle and a car are very different. (Bike has no ODC port, even internal access is done by cutting open the magic box.
Rick
I'm now confident that the problem was with my code. i.e. its behaviour on reset assumed that the ECU required a 'fast init' to wake it up ... which is certainly does need if I am loading to EEPROM, since the ECU kills a comms session if there's no activity for a while. The specs suggest a typical value of 5 seconds, but there is no minimum value recommended and I think my ECU must use a value closer to 2 or 3 seconds. Thus the manual reset (and also the load to RAM) scenarios saw my code trying to wake an ECU that was already awake and hence the variation in behaviour.
Sidecar, you are on the money with bike ECUs. I've had to cut open my ECU and soak it acetone in order to get to the internals and pull code out of it. Even though there is no OBD port on the bike, fortunately there is a serial data comms line brought out to a special connector for the dealers to plug into, and that's what I'm using. It's not easy to find retailers who sell automotive connectors. And even when you do find one, there are so many hundreds of different types of connectors it is hard to know which ones to buy. Fortunately I got it right on the second guess, so now I have a few 'dealer-only' connectors to use.
oh, I am playing around with a Suzuki SV1000 (V-twin) - I really like the idea of real time sensor data on the dashboard, and especially the idea of having the intake pressure sensor data on display for when it comes to balancing the throttle bodies ...
cheers,
Mark