Page 1 of 1

ARM and GPS EB056

Posted: Sat Jul 14, 2012 9:12 am
by Mantas
Hello,

I need assistance connecting GPS EB056 board to an ARM board. How to patch and why. I set the jumpers at D(J5) and 3(J7), the J2 is set to 3V3, plus installed the 2032 battery. I was trying for about an hour, and gave up:) Tried everything, and nothing. Tied both A (RX - PA5, TX-PA6) and C (RX - PA21, TX-PA22) ports,connecting TX from EB056 to TX on ARM board, and RX from EB056 to RX on ARM board, i tied connecting PPS to TCLK0 on PA4 and SCK0/1 on PA2 and PA23. I also found that in v5 ARM flowcode i get the following error message when I'm trying to use HW channel 2 on UART (the boud rate is set to 9600). The channel 1 compiles with no error, anyway the message was:


Launching the compiler...
C:\Program Files (x86)\Matrix Multimedia\Flowcode ARM V5\Tools\MX_bats\arm7comp.bat "GPS" "F:\FLOWCO~1\SPA"
In file included from C:\Program Files (x86)\Matrix Multimedia\Flowcode ARM V5\CAL\includes.c:564,
from GPS.c:1225:
C:\Program Files (x86)\Matrix Multimedia\Flowcode ARM V5\CAL\/ARM\ARM_CAL_UART.c: In function 'FC_CAL_UART_Init_1':
C:\Program Files (x86)\Matrix Multimedia\Flowcode ARM V5\CAL\/ARM\ARM_CAL_UART.c:362: error: 'AT91C_PA21_RXD0' undeclared (first use in this function)
C:\Program Files (x86)\Matrix Multimedia\Flowcode ARM V5\CAL\/ARM\ARM_CAL_UART.c:362: error: (Each undeclared identifier is reported only once
C:\Program Files (x86)\Matrix Multimedia\Flowcode ARM V5\CAL\/ARM\ARM_CAL_UART.c:362: error: for each function it appears in.)
C:\Program Files (x86)\Matrix Multimedia\Flowcode ARM V5\CAL\/ARM\ARM_CAL_UART.c:362: error: 'AT91C_PA22_TXD0' undeclared (first use in this function)
C:\Program Files (x86)\Matrix Multimedia\Flowcode ARM V5\CAL\/ARM\ARM_CAL_UART.c: In function 'FC_CAL_UART_Update_Baud_1':
C:\Program Files (x86)\Matrix Multimedia\Flowcode ARM V5\CAL\/ARM\ARM_CAL_UART.c:687: error: 'AT91C_PA21_RXD0' undeclared (first use in this function)
C:\Program Files (x86)\Matrix Multimedia\Flowcode ARM V5\CAL\/ARM\ARM_CAL_UART.c:687: error: 'AT91C_PA22_TXD0' undeclared (first use in this function)

Error returned from [arm-elf-gcc.exe]
Return code = 1
Flowcode was unable to compile the flowchart's C code due to the following errors:


If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.


FINISHED

Best regards,
Mantas

Re: ARM and GPS EB056

Posted: Sat Jul 14, 2012 9:29 am
by Mantas
I managed to fix the ARM_CAL_UART.c the port naming was incorrect, here are the changes:

line number 362
AT91F_PIO_CfgPeriph(AT91C_BASE_PIOA, AT91C_PA21_RXD0 | AT91C_PA22_TXD0, 0);
changed to
AT91F_PIO_CfgPeriph(AT91C_BASE_PIOA, AT91C_PA5_RXD0 | AT91C_PA6_TXD0, 0); //manually modified to ARM datasheet

and the same changed done in line 687

Cheers,
Mantas

Re: ARM and GPS EB056

Posted: Mon Jul 16, 2012 9:18 am
by DavidA
Oh thanks Mantas, ill pass this to the appropriate person!

Re: ARM and GPS EB056

Posted: Mon Jul 16, 2012 10:01 am
by Benj
Hi Mantas,

Thanks for the heads up and especially for providing the fix :D .

I have applied your changes to the master file so it will be included in the next release and attached a copy here if anyone else needs it for v5.3.

Re: ARM and GPS EB056

Posted: Mon Jul 16, 2012 1:37 pm
by Mantas
But I am still struggling to connect the GPS board to the ARM board correctly, could you help me with that?

Best regards,
Mantas

Re: ARM and GPS EB056

Posted: Mon Jul 16, 2012 4:29 pm
by Benj
Hello Mantas,

Which ARM device are you using? Are you using one of our products eg the EB031 or the ECIORM or are you using your own circuitry?

The GPS E-block port and patch setting should look like this for the two boards.

EB031

UART1
TX - PortC Pin 6
RX - PortC Pin 7

UART2
TX - PortA Pin 6
RX - PortA Pin 5


ECIORM

UART1
TX - PortC Pin 6
RX - PortC Pin 7

UART2
TX - PortA Pin 6
RX - PortA Pin 7

Also be sure to check you have the correct serial baud rate and UART selected in the GPS component properties.

Re: ARM and GPS EB056

Posted: Mon Jul 16, 2012 5:14 pm
by Mantas
I am using eb031. What about PPS pin? Were do you connect that?

Regards,
Mantas

Re: ARM and GPS EB056

Posted: Mon Jul 16, 2012 5:34 pm
by Benj
Hello Mantas,

The PPS can be assigned to any Free I/O pin preferaby on the same port as the UART pins. The PPS signal is not actually used by the component and is just there to allow you to use it in your application to get a reliable second tick should you wish to.

Re: ARM and GPS EB056

Posted: Mon Jul 16, 2012 6:13 pm
by Mantas
Thnx Ben, understood everything, i'lll give it a try when i'lll have some free time:-)

Best regards,
Mantas

Re: ARM and GPS EB056

Posted: Thu Jul 19, 2012 1:26 pm
by Mantas
Hello Benj,

So I connected everything as you said: I used UART channel 1 port C pins 6 and 7, and nothing is happening...no data is being transmitted to the ARM chip, and LCD display shows only 00:00:00 on time and date. Then I connected the led board in between EB056 and EB031 boards, and I noticed that only D6 led is always on, and not blinking or anything, and D6 led corresponds to TX pin (as far as I know the TX signal is high when no transmission or reception is in progress and goes low when the transmission starts). Then I reversed the pin 6 with pin 7 and D6 led was still on and D5 led was blinking at 1 sec intervals, but no results. What might be wrong? Have you tested this board together with ARM board?

And one more thing, I've noticed that on EB185-30-1.pdf on the last page, where the port schematic diagrams are shown, the J7 socket, which is Port C it is listed that pin 7 is PA22/TXD1 and pin 8 is PA2/RXD1 (I have tried this configurations also), where you described it pin 6 and 7 respectively.

Could you, please, test it on your workbench and see how it goes, because I've tried everything with no luck...

Best regards,
Mantas

Re: ARM and GPS EB056

Posted: Thu Jul 19, 2012 4:59 pm
by Benj
Hello Mantas,

Right here are the details of my setup.

EB031 with 12V PSU, Power Selection - PSU and Programming - USB

EB056 - PortC, Jumper settings: C, 2 and 3V3

EB005 - PortA, Jumper setting default

Here is my Flowcode program.
Flowcode1.fcf_arm
(11.5 KiB) Downloaded 363 times
And here is a replacement CAL file as the existing file had a minor bug which meant the UART receive interrupt was not being enabled correctly.
ARM_CAL_UART.c
(20.92 KiB) Downloaded 362 times
Let me know how you get on.

Re: ARM and GPS EB056

Posted: Fri Jul 20, 2012 9:00 am
by Mantas
Good morning Benj,

Thank You for the fix, now it is working brilliantly! :)

Best regards,
Mantas