I am using ADICUP360 for some time now and have been progressing with it, all thanks to the help that I get from this forum. I am intending to send some numbers / strings / chars from ADICUP 360 to another board via the serial TX/RX comm pins. However, I am unable to do so. I need a detailed explanation of how can this be made possible.
Currently, the switch configuration that I have set on ADICUP360 EVAL-BOARD is 0,1,0,1 (S1,S2,S3,S4). I am powering the board through the USER pin, the other end of which is connected to my laptop.
The code that I have written is:
UART_WriteString("fa"); //Send 'fa' on serial timer_sleep (500);
I can read the string through PUTTY on my serial comm (with the corresponding switch config) but I am unable to read the data from TX/RX (PIN 1 and 2 on PWML). I would really appreciate if someone can help me out here. Also, I would like to know how can I use the other 3 TX/RX pins for sending data from the ADICUP360.
To use pins 1 and 2 on PWML (P0.7 and P0.6) as Tx/Rx, you should configure the pin mode of pin 0.6 and pin 0.7 to 1 and 2 (binary: 01 and 10), respectively. In the ADuCM360 device drivers api reference manual, this can be done using DioCfgPin. See picture below:
The ADuCM360 has only 1 UART peripheral. TX3 and RX3 is P0.2 and P0.1. Configure the pin modes to 3.
For Tx2 Rx2 Tx1 and Rx1, these can be software implemented as UART using the gpio interrupts.
The other important thing to remember here is configuring the hardware switches on the ADICUP360 device itself. Because the UART pins are routed on the board between the 2 USB port and the Pins on PWML, you need to ensure that if you are trying to use the PWML, that you setup the switches properly. Have a look at the user guide here for that (https://wiki.analog.com/resources/eval/user-guides/eval-adicup360/hardware/base_board#usbconnector_multiplexer )
I am still unable to do so. I am using the example code for ADXL355 that is provided on GITHUB
Let me explain my setup if it helps you understanding the situation.
I have connected the Pin 1 (P0.6) of ADICUP360 with the TX of an Arduino Mega and the Pin 2 (P0.7) with the RX pin of the arduino Mega.The pins that you said have been already set in the code (see picture below).
The loop of my main code is as below:
This is supposed to send the character ch (uint8_t type) to the arduino. But nothing is being sent to the arduino.
I am almost on the verge of giving up this board and use any other board.
I appreciate your effort in trying to make this work. From the snapshots of the code that you sent, I see nothing wrong with it.
Can you send me the main.c file and Communication.c file that you're using? I'll check other part of the code which might be causing this.
Also are you connecting the ADXL355 board to the ADICUP360?
Could you please send your entire project? That would help us determine what is going on here.
What version of the CrossCore Development Environment are you using?