interrupts with UARTs

Questions on UARTs, and serial communication
AMDlloydsp
Posts: 99
Joined: Mon Apr 15, 2013 3:51 pm
Location: NE Central FL

Re: interrupts with UARTs

Post by AMDlloydsp » Fri Sep 20, 2013 4:21 pm

BTW... if I just use "UART1_LCR" as the pointer, instead of your syntax, I get the value.

I tried streaming to my term at 1/2 stop bit, which I can do on a dedicated RS232 analyzer. It still works fine.

But here's something that may be a clue.

I just got it working; Ostensibly, without changing anything.

At one point, every time I loaded the program, I got no compiler errors. But when I ran it, the BASICtools screen 'crashed', hanging on the first two to four letters of "Executing"... ("Ex" or "Exec"). It did this every time. And when that happened, NO rs232 i/o would occur at all, waits or not. It appeared as if I were crashing the SuperPro.

I tried clearing the SuperPro by loading a program consisting of only a "Print". Ran that. It worked. I re-loaded the loopback program, and it failed the same way.

I remembered something like this happening before. So I carefully re-typed the whole program in a new file in Notepad++. Saved it. Ran it. It didn't crash, and now the RS232 streams to my terminal without delays.

It is possible that an inadvertently typed control character in the .bas file could cause this sort of behavior?

I'd sure like to know what I did, so I can get on with the next phase of this project.

Thanks,
LS



basicchip
Posts: 837
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: interrupts with UARTs

Post by basicchip » Fri Sep 20, 2013 4:53 pm

A control character in the BASIC source would be flagged by the compiler on the PC. So it would not get out to the ARM.

Have I seen mysterious crashes of Windows based tools (of any kind including BASICtools), yes and now more on Win8. But none have I ever been able to duplicate. As always make sure all your drivers are up to date, one specific to your PC as well as the FTDI drivers for the serial connection, we try to keep up with it, but they come from www.FTDIchip.com

AMDlloydsp
Posts: 99
Joined: Mon Apr 15, 2013 3:51 pm
Location: NE Central FL

Re: interrupts with UARTs

Post by AMDlloydsp » Fri Sep 20, 2013 6:41 pm

Well, thanks, Bruce.

It only cost me a bit of time, but I HATE ghosts!

I need the interrupt-driven serial i/o because this module can expect totally asycronous messaging from three other (SuperPro) modules, and for that sort of thing, bit-boffing just wouldn't cut it. BELIEVE me... I saved that working file.<G> I still have the bad one, and when I get time, I'm going to do a byte-wise compare on the two, and figure out the difference!

I'm on to the stepper routines now, and that's going swimmingly.

Thanks,
Lloyd

Post Reply