Datalogger IO Issue

Questions about the BASICtools and MakeItC
basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Datalogger IO Issue

Post by basicchip »

As for J1, those are both SGPIO and GPIO. I specifically laid out the board to make it easy to get to those SGPIO pins which I have used to do camera and display interfaces.

https://forum.sparkfun.com/viewtopic.ph ... &start=420



mikechris
Posts: 12
Joined: Sat Apr 29, 2017 12:02 pm

Re: Datalogger IO Issue

Post by mikechris »

Serial Saga,

Still have no luck getting TXD2 and TXD3 to work. Looking at the registers
before starting the program and again at the "END" (before Reset, or Stop),
can see the Function change for TXD1 from 0x.D0 (GPIO) to 0x.41 (Serial), and
then back to 0x.D0 (GPIO) after Reset, as expected. Doing the same for
TXD2 and TXD3, the Function does not change, it stays:
TXD2: 400860BC=0x.D0 (GPIO): should change to 0x.41, FUNC=1
TXD3: 4008610C=0x.D4 (GPIO): should change to 0x.42, FUNC=2
Forcing the registers to:
* &H400860BC = &H41 ' " P1_15, TXD2
* &H400860C0 = &H41 ' " P1_16, RXD2

* &H4008610c = &H42 ' " P2_3, TXD3
* &H40086110 = &H42 ' " P2_4, RXD3
does not work either, but you do see the pullup resister (EPUN) set the line
high to the Marking state, so the register is getting set. But something is
missing, probably in the compiling of the BAUD command. Thought I saw
somewhere that the addition of UART2/3 is only in the later revisions. Maybe
the DataLogger has a piece of old code for BAUD.

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Datalogger IO Issue

Post by basicchip »

I took a closer look at the C code, and see the issue, the LPC43xx uses USARTs and that is what they are called in C, I added definitions for UART0 and UART1 but had not done that for UART2 and UART3, so the code in firmware to launch them is missing.

I will have to recompile the firmware, but I am doing onsite consulting this week and won't be able to test that until next week sometime.

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Datalogger IO Issue

Post by basicchip »

This version of code should initialize all UARTs, as well as make all GPIOs default.

I've done some initial testing.
LPC4330.hex
(77.23 KiB) Downloaded 784 times

mikechris
Posts: 12
Joined: Sat Apr 29, 2017 12:02 pm

Re: Datalogger IO Issue

Post by mikechris »

My initial testing also looks good, thanks for the help.

Post Reply