July 13, 2020, 08:37:44 am

The shoutbox is currently out of service. Join us on Discord instead.
You can help CodeWalrus stay online by donating here.

WARNING: DO NOT UPGRADE your TI-83 Premium CE or TI-84 Plus CE to OS 5.5.1 and higher. It removes all compatibility with most games and removes ASM/C programming! DOWNGRADING IS IMPOSSIBLE. BE WARNED! Likewise, do NOT update your TI-Nspire CX past OS 4.5.0, else using Ndless and ASM/C programs will be impossible.

TI Nspire uart

Started by TheStaticTurtle, January 20, 2018, 01:44:33 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Can you try without the exclamation mark in that line?


It stilll blocking at 32 chars  :'(


I'm not sure what I can do with remote debugging here...

I'd suggest you try some more ways to configure the PL010 UART, maybe try turning the FIFO off.
There's also still the possibility that there's something wrong on the sender's side.


Well can I increase the FIFO buffer size. If not you said that I can write an interrupt for reciveing data but I dont really know how to do that. And if all of that is not really possible how do I disable it ?


You can't change th FIFO size, it's the hardware.

For the other questions, take a look at the PL011 manual: http://infocenter.arm.com/help/topic/com.arm.doc.ddi0183f/DDI0183.pdf


So I have read the whole pdf but I don't see how to make an interrupt. For first I doesn't done so much C and I absolutly don't know how to make an interrupt but the one thing that I have seen fromthe pdf is that there is a byte to see if the receive FIFO is 1/2 full but I don't know how to make it work.


Interrupts aren't required to get it to work if you do everything in a loop.

Just try to configure the UART slightly differently, the register offsets and what the various bits do is all explained within the PDF document.


After some time I managed to make this function work :w00t:. So for now my function look like this:
char* uart_getsn(char* str, int num) {
        int i = 0;
        int max = num-1;
        while(1 && releasefunc()) {
                while(uart_ready() && isKeyPressed(KEY_NSPIRE_ESC)) {
                        if(i == max) {
                                str[i] = 0;
                                return str;
                        char c = uart_getchar();
                        str[i] = c;
                        if(c == '\b'){  i -= 2; }
                        else if(c == '\r')      { str[i] =0; return str; }


definitvely not perfect since i have to send \r after each command  and I have added  isKeyPressed(KEY_NSPIRE_ESC) to the while in case of stuck (append only one time) but I work for me.


Hello there!

I was just doing some research, prior to starting a uart chat interface for the nspire, when I stumbled upon your lovely posts.
Great to hear someone else out there in the interwebs has the same interest!

I was wondering, Samy, if you have developed your idea any further than the previous posts suggests?
So far you have already saved me a stack of time starting from scratch, and if possible, I'd love to co-op with you to continue on this app.

With warm regards from Switzerland,


While I don't exactly understand you question I'm glad to hhave helped you for something and I indeed continued to work on this project after this post and the program evolved into this:
https://github.com/TurtleForGaming/nspire-communication/blob/master/nspire-client/uart_sms/hello.cpp And if you want to see the whole project look at this post: https://codewalr.us/index.php?topic=2299.0

Powered by EzPortal