| Author |
Message |
GeeWhizz Newbie
 Joined: 20/06/2022 Location: AustraliaPosts: 4 |
| Posted: 01:18pm 21 Jun 2022 |
Copy link to clipboard |
 Print this post |
|
New member, first post. However, I'm a long term programmer who has been working with the PIC32 MicroMite for several years. Also, I've worked with assembler, BASIC and C for over 40 years, so have a few clues in that department.
After building the PicoMite backpack (ILI9488), published in a recent Silicon Chip magazine, I have been migrating a PIC32 MicroMite program to the PicoMite. After debugging and bench-testing the application on the PicoMite, I can save the program to flash slot "1", recall it and run it without any problems being reported.
All is going well until I issue an "OPTION AUTORUN 1" command and power cycle the PicoMite. Then, "Error: Invalid address - resetting" reports, cycling ad nauseum. My only option appears to be: Load Clear_flash.uf2, then Reload PicoMiteV5.07.04.uf2
Am I doing something wrong or just dealing with a bug in the firmware? I've searched The Back Shed's MicroController Forum but can't see any similar threads. Surely, I am not alone!
The results are similar regardless of whether I use MMEdit or TeraTerm/XMODEM. The following is a listing of events to demonstrate the problem.
(----After loading Clear_flash.uf2, then PicoMiteV5.07.04.uf2) (----TeraTerm Reconnects) PicoMite MMBasic Version 5.07.04 Copyright 2011-2021 Geoff Graham Copyright 2016-2021 Peter Mather
> > option list (----no otions listed, so I loaded the following) > OPTION SYSTEM SPI GP18,GP19,GP16 > OPTION SYSTEM I2C GP10,GP11 > OPTION LCDPANEL ILI9488,LANDSCAPE,GP14,GP13,GP12 > OPTION GUI CONTROLS 20 > OPTION TOUCH GP15,GP17 > GUI CALIBRATE 0, 3946, 3899, -1289, -861 > OPTION SDCARD GP21 > option list OPTION SYSTEM SPI GP18,GP19,GP16 OPTION SYSTEM I2C GP10,GP11 OPTION LCDPANEL ILI9488,LANDSCAPE,GP14,GP13,GP12 OPTION GUI CONTROLS 20 OPTION TOUCH GP15,GP17 GUI CALIBRATE 0, 3946, 3899, -1289, -861 OPTION SDCARD GP21 > flash list Slot 1 available Slot 2 available Slot 3 available Slot 4 available Slot 5 available Slot 6 available Slot 7 available > RTC GETTIME > ? Date$, Time$ 21-06-2022 09:42:20
>XMODEM RECEIVE Saved 54478 bytes > list all (----Successful listing) > flash save 1 > flash list Slot 1 in use: "'PRADO-HID_v2.xx.bas" Slot 2 available Slot 3 available Slot 4 available Slot 5 available Slot 6 available Slot 7 available > new > list (----No program listing) > flash load 1 > list all (----Successful listing) > run PicoMite Vers. 5.0704 PRADO-HID v2.00 - It is now: 21-06-2022 09:56:12 Chart colour change at column: 0 ** 21-06-2022 09:56:12 F* Enter (Outer) Main Loop F* CLS and (Re)Draw Chart Frame F* Draw Chart: F* DPF Temperature `C c Ylw F* Plot; Seg-B from 0/0 to 0; Prev Plot Val: 0 F* Plot; Seg-B from 0/0 to 0; Prev Plot Val: 0 F* Draw RH Axis: Enter MainLoop() Port #1 Opened F* Port opened and speed set to 115200 baud F* Enter (Inner) Main Loop Screen Time Out @09:58:12 Screen Touched @09:58:30 X = 210; Y = 136. (----Run was successful, ^c to exit program) > list (----Successful listing) > option autorun 1 > option list OPTION SYSTEM SPI GP18,GP19,GP16 OPTION SYSTEM I2C GP10,GP11 OPTION AUTORUN 1 OPTION LCDPANEL ILI9488, LANDSCAPE,GP14,GP13,GP12 OPTION GUI CONTROLS 20 OPTION TOUCH GP15,GP17 GUI CALIBRATE 0, 3946, 3899, -1289, -861 OPTION SDCARD GP21 > flash list Slot 1 in use: "'PRADO-HID_v2.xx.bas" Slot 2 available Slot 3 available Slot 4 available Slot 5 available Slot 6 available Slot 7 available >(----Disconnect USB lead which disconnects Power Feed) (----Reconnect USB lead which reconnects Power) > Error: Invalid address - resetting Error: Invalid address - resetting Error: Invalid address - resetting Error: Invalid address - resetting Error: Invalid address - resetting (Cycles for ever)
|
| |
matherp Guru
 Joined: 11/12/2012 Location: United KingdomPosts: 10627 |
| Posted: 01:23pm 21 Jun 2022 |
Copy link to clipboard |
 Print this post |
|
Try the latest beta, otherwise you will need to post your code as it works as expected with a simple program |
| |
GeeWhizz Newbie
 Joined: 20/06/2022 Location: AustraliaPosts: 4 |
| Posted: 03:00pm 21 Jun 2022 |
Copy link to clipboard |
 Print this post |
|
Thanks for the quick response Peter. I'll try to reduce its size - currently over 1,000 lines of code. It receives data packets from COM1, saves them to random access files on the SD Card and plots the data in chart/s on the touch screen in real time.
The program works fine when manually downloaded-and-run or copied from flash and run. Just will not 'autorun' at power-up, which is a requirement.
(Another) Peter |
| |
matherp Guru
 Joined: 11/12/2012 Location: United KingdomPosts: 10627 |
| Posted: 05:35pm 21 Jun 2022 |
Copy link to clipboard |
 Print this post |
|
What happens if you just load the program and set "OPTION AUTORUN ON"? This runs the program from the main memory rather than a specific flash slot |
| |
GeeWhizz Newbie
 Joined: 20/06/2022 Location: AustraliaPosts: 4 |
| Posted: 02:39am 22 Jun 2022 |
Copy link to clipboard |
 Print this post |
|
When I tried "OPTION AUTORUN ON", the result is different but still not successful. At least, I didn't have to reload the PM firmware .
I'll try a few things this evening (AWST).
(----At power-up, the code was still present) > option list OPTION SYSTEM SPI GP18,GP19,GP16 OPTION SYSTEM I2C GP10,GP11 OPTION LCDPANEL ILI9488, LANDSCAPE,GP14,GP13,GP12 OPTION GUI CONTROLS 20 OPTION TOUCH GP15,GP17 GUI CALIBRATE 0, 3946, 3899, -1289, -861 OPTION SDCARD GP21 > option autorun on >option list OPTION SYSTEM SPI GP18,GP19,GP16 OPTION SYSTEM I2C GP10,GP11 OPTION AUTORUN ON OPTION LCDPANEL ILI9488, LANDSCAPE,GP14,GP13,GP12 OPTION GUI CONTROLS 20 OPTION TOUCH GP15,GP17 GUI CALIBRATE 0, 3946, 3899, -1289, -861 OPTION SDCARD GP21 (----Unplug USB Cord, disconnecting power) (----Reconnect USB afer about 20 seconds) > Error: Invalid address - resetting PicoMite MMBasic Version 5.07.04 Copyright 2011-2021 Geoff Graham Copyright 2016-2021 Peter Mather
>list > (----Program code has disappeared)
|
| |
panky
 Guru
 Joined: 02/10/2012 Location: AustraliaPosts: 1116 |
| Posted: 03:51am 22 Jun 2022 |
Copy link to clipboard |
 Print this post |
|
Another possible check might be to put in a number of PRINT or END statements to confirm if the program is actually being loaded from flash? Eg. in the first or second line of your program, insert an END command and see if the listing is correct (ie. program isn't corrupt somehow) when trying to AUTORUN from flash.
panky ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
| |
GeeWhizz Newbie
 Joined: 20/06/2022 Location: AustraliaPosts: 4 |
| Posted: 11:54am 22 Jun 2022 |
Copy link to clipboard |
 Print this post |
|
I loaded PicoMiteV5.07.05b11.uf2 this evening and both OPTION AUTORUN ON and OPTION AUTORUN 1 now work for me. An unpublished bug fix, perhaps?
Thanks for suggesting the latest beta version Peter, it solved my problem.
(----After loading V5.07.05b11 and reloading options) > XMODEM RECEIVE Saved 54478 bytes > list all (----Successful listing) > option autorun on >option list OPTION SYSTEM SPI GP18,GP19,GP16 OPTION SYSTEM I2C GP10,GP11 OPTION AUTORUN ON OPTION LCDPANEL ILI9488, LANDSCAPE,GP14,GP13,GP12 OPTION GUI CONTROLS 20 OPTION TOUCH GP15,GP17 GUI CALIBRATE 0, 3946, 3899, -1289, -861 OPTION SDCARD GP21 > (----Unplug USB Cord, disconnecting power) (----Reconnect USB afer about 20 seconds) > PicoMite Vers. 5.070511 PRADO-HID v2.00 - It is now: 22-06-2022 19:16:15 Colour change at column: 0 ** 22-06-2022 19:16:16 F* Enter (Outer) Main Loop F* CLS and (Re)Draw Chart Frame F* Draw Chart: F* DPF Temperature `C c Ylw F* Plot; Seg-B from 0/0 to 0; Prev Plot Val: 0 F* Plot; Seg-B from 0/0 to 0; Prev Plot Val: 0 F* Draw RH Axis: Enter MainLoop() Port #1 Opened F* Port opened and speed set to 115200 baud F* Enter (Inner) Main Loop (----Run was successful, ^c to exit program) > flash save 1 > flash list Slot 1 in use: "'PRADO-HID_v2.xx.bas" Slot 2 available Slot 3 available Slot 4 available Slot 5 available Slot 6 available Slot 7 available > option autorun off > option autorun 1 > option list OPTION SYSTEM SPI GP18,GP19,GP16 OPTION SYSTEM I2C GP10,GP11 OPTION AUTORUN 1 OPTION LCDPANEL ILI9488, LANDSCAPE,GP14,GP13,GP12 OPTION GUI CONTROLS 20 OPTION TOUCH GP15,GP17 GUI CALIBRATE 0, 3946, 3899, -1289, -861 OPTION SDCARD GP21 > (----Unplug USB Cord, disconnecting power) (----Reconnect USB afer about 20 seconds) > PicoMite Vers. 5.070511 PRADO-HID v2.00 - It is now: 22-06-2022 19:19:41 Colour change at column: 0 ** 22-06-2022 19:19:42 F* Enter (Outer) Main Loop F* CLS and (Re)Draw Chart Frame F* Draw Chart: F* DPF Temperature `C c Ylw F* Plot; Seg-B from 0/0 to 0; Prev Plot Val: 0 F* Plot; Seg-B from 0/0 to 0; Prev Plot Val: 0 F* Draw RH Axis: Enter MainLoop() Port #1 Opened F* Port opened and speed set to 115200 baud F* Enter (Inner) Main Loop Screen Time Out @19:21:41 Edited 2022-06-23 01:59 by GeeWhizz |
| |