wiken
New Member
Posts: 45
|
Post by wiken on Jan 26, 2018 10:05:52 GMT
Hi.
I want to use the RX/TX on pin 18,19. There is no Serial-reference to that pins:
SerialASC Arduino FDTI USB-COM micro USB Serial1 RX1/TX1 Arduino J403 pins 17/16 Serial0 RX0/TX0 Arduino J403 pins 15/14 Serial RX/TX Arduino default J402 pins D0/D1
The board says Tx2, Rx3, I guess it should be Tx2, Rx2 as stated on page 45 TXD2 and RXD2 in J403. Page 44 states that it's P20.0 ASC3 TX and P20.3 ASC3 RX.
Can you tell me how to use pin 18, 19? We need to CAD a board to comply to an older design.
\Wiken 
|
|
|
Post by Admin on Jan 26, 2018 10:24:54 GMT
Hi,
pins 18 and 19 use the same serial channel (ASC3) as the one connected to the FTDI chip for the USB com port. It is possible to redirect SerialASC to these pins but it requires some additional software. I will prepare an example.
|
|
wiken
New Member
Posts: 45
|
Post by wiken on Jan 26, 2018 12:06:28 GMT
Thanks! You saved my day. \Wiken 
|
|
wiken
New Member
Posts: 45
|
Post by wiken on Feb 9, 2018 9:44:14 GMT
Hi. Have you had any chance to prepare that example? Best Regards \Wiken 
|
|
|
Post by Admin on Feb 9, 2018 10:13:26 GMT
Try this:
/* Function to cause ASC to go to pin18(TX2) and pin19 (RX2) rather than FTDI USB port */ void MapAsc3ToRx2Tx2(void) {
/* Pin mapping */ const IfxAsclin_Asc_Pins pins = { NULL_PTR, IfxPort_InputMode_pullUp, // CTS pin not used &IfxAsclin3_RXC_P20_3_IN, IfxPort_InputMode_pullUp, // Rx pin NULL_PTR, IfxPort_OutputMode_pushPull, // RTS pin not used &IfxAsclin3_TX_P20_0_OUT, IfxPort_OutputMode_pushPull, // Tx pin IfxPort_PadDriver_cmosAutomotiveSpeed1 };
/* Manually set pad driver to speed grade 1 (otherwise 3v3 is not seen as a '1' ) */ IfxPort_setPinPadDriver(&MODULE_P20, 3, IfxPort_PadDriver_cmosAutomotiveSpeed1) ;
IfxAsclin_Cts_In *cts = pins.cts;
if (cts != NULL_PTR) { IfxAsclin_initCtsPin(cts, pins.ctsMode); }
IfxAsclin_Rx_In *rx = pins.rx;
if (rx != NULL_PTR) { IfxAsclin_initRxPin(rx, pins.rxMode); }
IfxAsclin_Rts_Out *rts = pins.rts;
if (rts != NULL_PTR) { IfxAsclin_initRtsPin(rts, pins.rtsMode, pins.pinDriver); }
IfxAsclin_Tx_Out *tx = pins.tx;
if (tx != NULL_PTR) { IfxAsclin_initTxPin(tx, pins.txMode, pins.pinDriver); } }
/*** Core 0 ***/
void setup() { // put your setup code for core 0 here, to run once:
SerialASC.begin(115200); MapAsc3ToRx2Tx2(); /* ASC3 uses pin 18 and 19.
}
|
|
wiken
New Member
Posts: 45
|
Post by wiken on Feb 9, 2018 12:01:32 GMT
Thanks, I'm going to try this. \Wiken 
|
|
sinai1
Junior Member

Posts: 67
|
Post by sinai1 on Jan 11, 2019 18:12:19 GMT
Hi, this solution works?.
I Really need to use the Serial Debug Pin 0-1, Serial1 PIN18-19 and Serial2 PIN16-17 at the same time.
regards
|
|
|
Post by Admin on Jan 11, 2019 20:05:38 GMT
There should be no problem with this!
|
|
wiken
New Member
Posts: 45
|
Post by wiken on Feb 1, 2019 9:41:54 GMT
Works fine for me.  \Wiken 
|
|