View Single Post
Old 05-07-2015, 10:18 AM   #1844 (permalink)
thingstodo
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Quote:
Originally Posted by Astro View Post
Maybe the code needs echo some progress messages to the serial port?

Would have to move the InitUART2(); to earlier in the main()

Then have TransmitString() send output to the serial port before and after each event of significance in the main().

Something like this.

Moving EEPROM data to RAM...
EEPROM data moved.
Initialise timers...
Timers initialised.
High pedal lockout check...
Pedal checked OK.
Precharging...
Precharge complete.
Closing main contactor.
Opening Precharge contactor.
PWM interrupt enabled.
Resetting any faults.
Clear Receive Buffer.
Starting Menu...

It would likely go past to quickly to be seen but if you had a fault then it would stop somewhere giving you a clue as to the cause. Or at least an area to look at.
Good idea! This can be left in the code and I think RTD explorer will ignore it .. but I'm not sure. Perhaps this can be my debugging version.

I looked back through the posts - apparently I did not do a good job of posting progress!!

Where I left off testing, when Paul had started working on MPLAB X, the contactors pull in, I can get to the menu. I can change the PID parameters. When I run 'run-pi-test' ... nothing happens. The motor does not rotate, or hum, no current from the battery pack ...

So I sat and stared at it for a while and decided it was time to get to the point where I can build the code and use the debugger to step through and figure out what it's waiting for.

Adding print statements to the serial will help, I'm sure.
  Reply With Quote