|Have you had this problem before:
||[ 2 ]
||[ 1 ]
|I did, but i found a way around it.
||[ 1 ]
|Total Votes : 4
I have noticed that if you run a C program for the ti 84 plus ce, and press the on key while the program is running, and then quit the program normally, the program quits normally, but there is the os message that shows an error: break message, just like you just force-stopped a ti-basic program with the On Key. I tried disabling on-latching and clearing the on-latch here but that didn't seem to work: https://github.com/randomguy70/SmartNotesCE/blob/1490892276cb0c432a0fa111fdfe560c1bf39ebb/smart_notes_ce/src/main.c#L12.
I then found that professionally done programs such as Hexaedit had the same issue, so I assume that this is a common problem. Is this a bug, or is it fixable with a simple function, and if so, what function? If you have any insights, please comment below. Thank you in advance!
I think it's something hard-coded into the OS. I'm guessing that hypothetically, if we flashed a custom OS to the calculator, we could disable that behaviour.
(*(volatile uint8_t*)0xF00008) = 1;
For anyone wondering how I even figured this out, the OS uses the main set of interrupts, while keypadc uses the FIQ set. So, replacing the address of the FIQ interrupts in the define for kb_ClearOnLatch with the address of the main set resets the OS's copy instead.
Added that to the cleanup code for the toolchain, so in future releases programs will just do that by default.
Added that to the cleanup code for the toolchain, so in future releases programs will just do that by default.Shouldn't keypadc do that cleanup instead of the CRT? Especially since there's already kb_Reset(). Seems like the cleanup should go in kb_Reset() and change the documentation to say that it's required to prevent the ERR: BREAK issue.
It's not an issue with keypadc specifically, it's just that GetCSC resets the interrupt. So, you could have the same issue in a program which calls GetCSC, then waits for a while without calling it before exiting. So, I figured that the crt was a better location for it, since it's not specifically related to keypadc. Also, requiring users to call a function to fix a hard-to-catch issue would likely just result in lots of people not fixing the issue.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum