![]() |
Forum Index : Microcontroller and PC projects : com2 close error?
Author | Message | ||||
drkl![]() Senior Member ![]() Joined: 18/10/2015 Location: HungaryPosts: 102 |
Hello everybody, mm44,ver5.2 The code: open "com2:9600" as #1 'MM44: pin30-TX PIN31-RX close #1 setpin 30, off The error message: [3] SetPin 30, off Error: Pin 30 is in use What is the error? drkl |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Not by a MM at the moment. Out of interest what happens if you add a PAUSE (try 1000) after the CLOSE line and before the SETPIN? |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9588 |
I would also agree with WW - a small pause - probably 100ms would be enough between your close #1 and setpin 30 would most likely get around that issue. Smoke makes things work. When the smoke gets out, it stops! |
||||
jwaldha Newbie ![]() Joined: 14/01/2016 Location: HungaryPosts: 10 |
I think this is a bug in the firmware in the line 255 of the MX170/Serial.c: if(ExtCurrentConfig[COM2_RX_PIN] == EXT_COM_RESERVED) ExtCfg(COM2_TX_PIN, EXT_NOT_CONFIG, 0); The correct line: if(ExtCurrentConfig[COM2_TX_PIN] == EXT_COM_RESERVED) ExtCfg(COM2_TX_PIN, EXT_NOT_CONFIG, 0); --- JWaldha --- JWaldha |
||||
drkl![]() Senior Member ![]() Joined: 18/10/2015 Location: HungaryPosts: 102 |
Sorry, the delay doesn't solved the problem. May it be a firmware bug? drkl |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3282 |
It is a bug! Thanks very much, your test program made it so easy to find. It will be fixed in the next release. Geoff Geoff Graham - http://geoffg.net |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |