![]() |
Forum Index : Microcontroller and PC projects : CMM2 5.05.06 beta
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
djwildstar Newbie ![]() Joined: 29/07/2020 Location: United StatesPosts: 24 |
@weirdocollector -- Power the CMM2 using a USB A-to-B cable plugged into a USB power supply and the CMM2's USB B port. Using a keyboard connected to the CMM2's USB A port to issue the UPDATE FIRMWARE command, then unplug the keyboard and plug in the A-to-A data transfer cable. Once the CMM2 is in firmware update mode, I believe the STM32CubeProgrammer should connect in USB mode (for the A-to-A cable) rather than UART mode (which is used for the A-to-B cable). Since I made an all-in-one case with the keyboard semi-permanently attached, I've always used the A-to-B cable and the UART programming mode without problems. |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1638 |
It's not a good idea to power the CMM2 from two different power sourced simultaneously. You may damage the PC's USB port! I think this method has not been fully explained in the manual. I have done it this way: - Connect the USB A to B cable to the PC. - Use Teraterm (or Putty) to issue the UPDATE FIRMWARE command. - Leave the USB A to B cable plugged in and connect the USB A to A cable to a different USB port in the PC. - The PC will now recognise the USB A to A cable input. - Use the STM32CubeProgrammer to program the CMM2 - Disconnect both cables to the CMM2. - Reconnect the power to the CMM2 in your usual fashion. You may be able to use a USB hub for this but I haven't tried it. Bill Keep safe. Live long and prosper. |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1638 |
An alternative method just struck me: - Power the CMM2 from the PC with the USB A to B cable - Issue the UPDATEFIRMWARE command with the USB keyboard - Replace the USB keyboard with the USB A to A cable and plug it into the PC. - The PC will now recognise the USB A to A cable input. - Use the STM32CubeProgrammer to program the CMM2 etc. I have not tried that yet... Next time. Bill Keep safe. Live long and prosper. |
||||
djwildstar Newbie ![]() Joined: 29/07/2020 Location: United StatesPosts: 24 |
Here's an odd one regarding PRINT and TAB() with commas and semicolons. It appears that TAB() counts the ASCII TAB character output by a comma as a single character (regardless of the setting of OPTION TAB), while the data actually output to the console is actually 2, 4, or 8 ASCII BLANK characters (depending on the setting of OPTION TAB). This means that the TAB() function's idea of the current output column will be off by one or more positions depending on the number of non-printable ASCII characters already output on the line. Here's the test: > ?"123456789012345678901234567890":?"A B";TAB(20);"C":?"A","B";TAB(20);"C":?"A","B",TAB(20);"C" 123456789012345678901234567890 A B C A B C A B C From what I read in the documentation, I would expect the TAB(20) to advance until it reaches position 20, regardless of the mixture of characters printed to the line already. If this was the case, the three PRINT statements in the example should produce the same output. The simple work-around for this is to never use the TAB() function with a PRINT statement that will output nonprinting characters (including the comma separator, which outputs ASCII TAB characters). Edited 2020-09-29 04:39 by djwildstar |
||||
mclout999 Guru ![]() Joined: 05/07/2020 Location: United StatesPosts: 489 |
Has anyone else seen this behaior? When viewing graphics files in the file brworser, when you hit esc and drop back to the file manager the text is gone but you can see the text if you scrole up and down. I have not noted this befor but I have not used the file manager to view graphic files for many firmware updates so I do not know when this started happening. I am on 50.05.06b9 at the moment. I am not sure if anyone has mention this here. I will update to B14 as soon as I can. |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3282 |
Thanks. This is one for me. I will fix it in the next general update to MMBasic. Geoff Geoff Graham - http://geoffg.net |
||||
Sasquatch![]() Guru ![]() Joined: 08/05/2020 Location: United StatesPosts: 377 |
I am occasionally getting the dreaded "Error: System fault - check code" message when switching video modes. MM.Info(Reset) is returning "Watchdog" It seems to happen most often when switching between modes 10,8 or 9,8 to 1,8 I am running V5.05.06b14 on a 400MHz CMM2 -Carl |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10198 |
Thanks for the report. This suggest the PLL for the display is taking a long time to synch on your processor. I'll put in some more pings of the watchdog if I can find any obvious places that might need them. |
||||
Sasquatch![]() Guru ![]() Joined: 08/05/2020 Location: United StatesPosts: 377 |
I have the Waveshare boards with the factory crystal resonator installed. I think their oscillator setup has too much "phase noise" or a slower rise time that leads to less certain timing on the inputs of the PLLs. I also get a lot of "Shimmer" in mode 9 I received my 8MHz oscillator modules, but I haven't had time to install them yet. I was thinking to install the oscillators on the Waveshare modules to keep them "self contained" Edited 2020-10-02 04:17 by Sasquatch -Carl |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1128 |
I understand the purpose of a watch dog timer. What is the purpose of using it with MMBasic on the CMM2? Is it possible for the user to write a program (in Basic) that could hang the system? Visit Vegipete's *Mite Library for cool programs. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10198 |
Yes- POKE, CSUB Edited 2020-10-02 04:28 by matherp |
||||
Sasquatch![]() Guru ![]() Joined: 08/05/2020 Location: United StatesPosts: 377 |
Just a couple of other quick observations/questions: The Play Modfile command doesn't seem to support the interrupt at the end of the current file like the other file formats do. Is there a technical reason or was it just never implemented? On the File Menu, the <page down> key initially skips down 2 pages instead of to the bottom of the current page. I know this was changed in the editor recently. I suppose it's a matter of preference, but my preference would be that the file menu work more like the editor does now. Thanks again for making this all so easy for the rest of us! -Carl |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1128 |
I'm seeing a slight issue with drawing sprites. The very bottom right pixel is not being drawn. (Or it is unexpectedly transparent.) The attached sample program uses mode 3,12 but other modes show this too. The sample PNG is a white box with one red pixel in each corner. The bottom right pixel appears black after: sprite loadpng 1, "testcube.png" sprite show 1,151,91,1 TestSprite.zip Edit: LOAD PNG works as expected and shows the bottom right pixel. Edited 2020-10-02 15:30 by vegipete Visit Vegipete's *Mite Library for cool programs. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10198 |
I like that sort of bug - 2 minutes to diagnose and fix. Will be in next beta Mod file playback doesn't end it just loops forever so the concept of a completion interrupt is meaningless Agree - will change in next beta ![]() Edited 2020-10-02 19:08 by matherp |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10198 |
V5.05.06b15 now posted http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip Bug fixes: Fixed issue where the short form help line is incorrectly shown in editor and filemanager in some high resolution modes. Fixed bug in SPRITE LOADPNG which misses the last pixel in the png file. Changes to watchdog to (hopefully) fix any outstanding incorrect triggering Usability changes: Page up/down functionality in filemanager now goes to top or end of current display on first press and then pages by the number of lines showing on subsequent presses Internal changes: Some internal changes - report any unusual issues New functionality: LONGSTRING additions LONGSTRING SETBYTE data , n 'sets byte n to the value data, n respects OPTION BASE LONGSTRING RESIZE n 'sets the stored size of a long string to n Together with LGETBYTE these additions make it easy to use a longstring as a byte array. DIM a%(100) LONGSTRING SETBYTE a%(),48,0 LONGSTRING SETBYTE a%(),49,1 LONGSTRING RESIZE a%(),2 LONGSTRING PRINT a%() PRINT LGETBYTE(a%(),0) |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4301 |
BUG (?) with Console {Screen | Serial | Both} There's probably a good chance I will be told to "stop doing such strange things", but the following is just a short example to reproduce an issue being shown with a longer, perhaps saner, use-case. Colour Maximite 2 MMBasic Version 5.05.06b14 Copyright 2011-2020 Geoff Graham Copyright 2016-2020 Peter Mather > list "console_bug.bas" For i = 0 To 9 Option Console Screen Print "a"; Option Console Serial Print "b"; Option Console Both Print "c"; Next i > run "console_bug.bas" bc The output to the VGA screen is as expected: acacacacacacacacacac Best wishes, Tom Edited 2020-10-02 21:54 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10198 |
I'm in awe of your ability to do the most bizarre things Try downloading b15 again PS then tell me what the issue was and how I've fixed it ![]() Edited 2020-10-02 22:36 by matherp |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4301 |
Thanks Peter, that fixed the "real" problem too. It wasn't that bizarre, I'm updating the Welcome Tape's menu system and trying to provide centered output using PRINT on both the serial console and the VGA display. You could argue I should be using TEXT for the VGA display and I may well go that way, but that requires more significant changes to the code. Thanks again, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10198 |
and how you could/should have coded round it |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4301 |
With beta 14: Íøøøøøøøøøøøøþ Colour Maximite 2 "Welcome Tape" Version 0.4 CONTENTS [1] WHAT'S NEW? [2] Games [3] Other amusements [4] Utilities [5] Demos - Graphics, 3D [6] Demos - Graphics, Fractals [7] Demos - Graphics, Sprites [8] Demos - Graphics, Turtle [9] Demos - Sound [A] Demos - CSUBs [C] Show credits [Q] Quit Press a key to select an option With beta 15: Colour Maximite 2 "Welcome Tape" Version 0.4 CONTENTS [1] WHAT'S NEW? [2] Games [3] Other amusements [4] Utilities [5] Demos - Graphics, 3D [6] Demos - Graphics, Fractals [7] Demos - Graphics, Sprites [8] Demos - Graphics, Turtle [9] Demos - Sound [A] Demos - CSUBs [C] Show credits [Q] Quit Press a key to select an option I'm afraid I don't know, rather lower level than my usual fare. At a guess some unexpected carriage returns or backspaces were being sent, but I'm not sure the output above chimes with that. Regards, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |