ARM and GPS EB056

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
User avatar
Mantas
Posts: 221
Joined: Tue May 15, 2012 10:32 pm
Location: Klaipeda, Lithuania - North sea, UK
Has thanked: 57 times
Been thanked: 27 times

ARM and GPS EB056

Post 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
Science is my true religion.

User avatar
Mantas
Posts: 221
Joined: Tue May 15, 2012 10:32 pm
Location: Klaipeda, Lithuania - North sea, UK
Has thanked: 57 times
Been thanked: 27 times

Re: ARM and GPS EB056

Post 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
Science is my true religion.

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: ARM and GPS EB056

Post by DavidA »

Oh thanks Mantas, ill pass this to the appropriate person!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ARM and GPS EB056

Post 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.
Attachments
ARM_CAL_UART.c
(20.78 KiB) Downloaded 311 times

User avatar
Mantas
Posts: 221
Joined: Tue May 15, 2012 10:32 pm
Location: Klaipeda, Lithuania - North sea, UK
Has thanked: 57 times
Been thanked: 27 times

Re: ARM and GPS EB056

Post 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
Science is my true religion.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ARM and GPS EB056

Post 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.

User avatar
Mantas
Posts: 221
Joined: Tue May 15, 2012 10:32 pm
Location: Klaipeda, Lithuania - North sea, UK
Has thanked: 57 times
Been thanked: 27 times

Re: ARM and GPS EB056

Post by Mantas »

I am using eb031. What about PPS pin? Were do you connect that?

Regards,
Mantas
Science is my true religion.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ARM and GPS EB056

Post 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.

User avatar
Mantas
Posts: 221
Joined: Tue May 15, 2012 10:32 pm
Location: Klaipeda, Lithuania - North sea, UK
Has thanked: 57 times
Been thanked: 27 times

Re: ARM and GPS EB056

Post by Mantas »

Thnx Ben, understood everything, i'lll give it a try when i'lll have some free time:-)

Best regards,
Mantas
Science is my true religion.

User avatar
Mantas
Posts: 221
Joined: Tue May 15, 2012 10:32 pm
Location: Klaipeda, Lithuania - North sea, UK
Has thanked: 57 times
Been thanked: 27 times

Re: ARM and GPS EB056

Post 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
Science is my true religion.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ARM and GPS EB056

Post 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 326 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 329 times
Let me know how you get on.

User avatar
Mantas
Posts: 221
Joined: Tue May 15, 2012 10:32 pm
Location: Klaipeda, Lithuania - North sea, UK
Has thanked: 57 times
Been thanked: 27 times

Re: ARM and GPS EB056

Post by Mantas »

Good morning Benj,

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

Best regards,
Mantas
Science is my true religion.

Post Reply