![]() |
Forum Index : Microcontroller and PC projects : OPTION TOUCH crashes MM+?
Author | Message | ||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Hi folks. 1) Program firmware B37 2) Cycle power 3) Connect USB console 4) Issue: OPTION LCDPANEL SSD1963_7,L,4 5) Restart MM as requested(cycle power) 6) Connect USB console 7) Issue: OPTION TOUCH 22,21,45 8) Restart MM as requested(cycle power) MM+ dies. LCD backlight blinks off and on at 1 second intervals, just a short "on" blink. USB console dead, native console dead. You have to reflash the chip to get the console back. Does anyone know why that should be? I also tried leaving off the pin45 reference on the touch command, but the same thing happened - continuous attempt to initialize the LCD that the MM cannot get out of. Images of the track layout: (Relevant track in each image is highlighted in pink) ![]() ![]() ![]() ![]() ![]() Everything looks just fine to me, so I don't understand why as soon as you run the touch command, the MM+ falls over. ![]() ![]() ![]() Can anyone else throw any light on what might be going on? Smoke makes things work. When the smoke gets out, it stops! |
||||
jman![]() Guru ![]() Joined: 12/06/2011 Location: New ZealandPosts: 711 |
Silly question I you leave off the Option Touch completely does the LCD work ? Jman |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
YES - LCD works just fine, UNTIL you issue the OPTION TOUCH command, then it all falls over. GUI TEST LCDPANEL works just fine to test the display(while it is working!) I have another LCD, so I might swap them and see if I have any more luck - PERHAPS I have a crook touch controller or something on this LCD. EDIT: It's not the LCD - the exact same thing happens on a known-good one. I will now setup a MM+ unit and connect up the LCD to it, to see what happens with the exact same pin choices. Smoke makes things work. When the smoke gets out, it stops! |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
OK, I have wired up the LCD to an external MM+ module, and it does EXACTLY the same thing - it dies when I try to assign the touch using OPTION TOUCH 22,21,45 or even just OPTION TOUCH 22,21. Bug? Is there a more up to date beta then B37 for the MM+ module? ...I can't remember.... I will now try a couple of other pins for CS and IRQ. EDIT: Reflashed the firmware(still B37), setup the LCD, then tried to setup touch on pins 11 and 12 - same result - MM+ bricks itself, and LCD just flashes it's backlight at you. No USB or native console. Reset or power cycle DOES NOT get around this, it just goes back to flashing the LCD backlight and there is no console ever again, until you reflash the firmware. At this point, I would really like to hear from anyone who has B37, and has a 1963 LCD and touch working. Smoke makes things work. When the smoke gets out, it stops! |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
UPDATE: If I reflash B23, which is an old version, and issue OPTION TOUCH 11,12, then everything works - INCLUDING THE TOUCH. I think we have a bug in B37 affecting the touch side of things. Yes? No? First thing after B23, is to setup the LCD, and run GUI TEST DISPLAY(remember this is an old beta before the command syntax was changed), and that shows the LCD test just fine. Next issue the touch command for pins 11 and 12, and it works just fine - in B23.... Smoke makes things work. When the smoke gets out, it stops! |
||||
MicroBlocks![]() Guru ![]() Joined: 12/05/2012 Location: ThailandPosts: 2209 |
For debugging purposes you could read the flash after loading a fresh copy and run the MM+ one time. Then issue the OPTION TOUCH command and read the flash again. There is probably a difference and that difference will help pinpoint the bug. Microblocks. Build with logic. |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
I am not sure about your case but there might be an issue with touch in B37. Sometimes touch refuses to work in my setup, I can issue the OPTION TOUCH command and calibrate the display but when a program uses TOUCH(X) or TOUCH(Y) it always gets -1. I have yet to track down this issue and I am not sure if it is a bug or faulty hardware. BUT, it does not crash the MM+. So, it sounds as if your issue is different. I plan to work on B37 over the next week to turn it into a release version (V5.1 so it might be best to hang on for a while in case I discover something in my testing). Geoff Geoff Graham - http://geoffg.net |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
FIXED IT!!! B37 now working just fine with touch. I stumbled across the mistake when reading the README.TXT for the B37 release, where it states that the option to specify the default font when has been dropped, and this is now the backlight pin if not using the 1963 PWM method. So, OPTION LCDPANEL SSD1963_7,L,4 was WRONG, and I needed to drop the 4 off the end of the command. That done, the touch is working. ![]() Now that I read that, it makes sence - specifying pin4(accidentally) as the backlight control, is part of the SPI channel to the touch controller IC - the poor old interpreter must not have known what hit it. ![]() See, I was still trying to specify the default font as part of the OPTION LCDPANEL command, as I was accidentally referring to an older version of the advanced features manual........ It's all good, and everything is now working as it should - a happy ending - yay! ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
Great news. It should be much easier when I have finished the MM++ version because then the documentation will be consistent. Geoff Graham - http://geoffg.net |
||||
MicroBlocks![]() Guru ![]() Joined: 12/05/2012 Location: ThailandPosts: 2209 |
That is a work around, not a fix. Weird that it bricks the firmware when using the wrong syntax/parameters. An error message would be expected. Microblocks. Build with logic. |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
You are right but it is amazingly difficult to catch all these errors, especially in the start up phase when the interpreter has not started running. This was part of the reason why the setup OPTION commands must be run at the command prompt. Geoff Geoff Graham - http://geoffg.net |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
aha, now could there be a case for a 'bare' startup option? if at startup the micromite sees a string of '&' characters at the terminal input it skips the TFT LCD configuration? grogster: did the MM+ not respond to '!' (factory reset) at startup? geoff: does a factory reset also de-configure the TFT LCD settings? cheers, rob :-) |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
Yes it does. Geoff Graham - http://geoffg.net |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Happy new year, folks. ![]() Yes and no. I understand WHY the MM+ fell over in my situation now. Cos the options are setup before the interpreter runs(to paraphrase Geoff for a moment), that means that incorrect settings in the options or conflicts between options as I had, PROBABLY cause a core-exception, the PIC32 restarts because of that, gets into a tizzy again, restarts, gets into a tizzy again, restarts..... As it cannot ever get past this point, and as the interpreter is not actually running at that point, it cannot give you an error message. That would be how I see things. It was really only a problem cos of my choice of 4 in the OPTION LCDPANEL command. Because that conflicts with the SPI channel, as soon as I issued the touch command, we have a direct conflict which caused the MM+ to get stuck in an unrecoverable loop, me thinks. I did not try that, but I expect not. Based on Geoff's comment at the end of the previous page, as the interpreter is not running quite yet, it would not be able to recognise the terminal input to be able to respond to the '!' string of input. That, and there is no VCP to connect to - the MM+ is then invisible to the PC on both USB or the native console pins. I would expect that this is also as the VCP has not had a chance to start, so the computer can't see it, and the two cannot communicate. Again - just my interpretation(pun intended!) of this particular issue. Smoke makes things work. When the smoke gets out, it stops! |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
I had the same problem for the same reason a few weeks ago but I couldn't find the post. The umite doesn't run long enough to look for the !!!!!!!!! It is difficult for MMBasic to know what the programmer is going to do next or what hardware is attached. That makes it hard to check for all possibilities. When working with beta firmware and beta manuals, we can expect a few gotchas. Jim VK7JH MMedit |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |