Hi everyone,
I am currently working on a project where I hopefully will be able to use all 8 serial interfaces on the Teensy 4.1 to read sensor data while displaying information on a RGB Led matrix display using OctoWS2811 library.
I thought I could give it a shot to add audio as well by using the Teensy Audio Board RevD for Teensy 4.x.
I am new to the Teensy controllers but have some experience using Arduino's end ESP32's.
Currently I am only using 4 serial interfaces, Serial1-4 and only the Rx channels.
When using the Teensy Audio Board the I2S Tx/Rx will be in conflict with the Serial2 interface as I understand.
I managed to reassign Serial2 to pin 30 and 31 and Serial3 to pin 32 and 33 using setRx and setTx and it seems to work alright, at least the Rx channels. I get the sensor data that I am expecting.
The audio board works fine until the Serial interfaces are initialized and I guess the issue might be that pin 7 and 8 are not restored to be used by I2S after the reassignment.
I found a thread covering a similar issue for the Teensy 3 where Paul advised to restore the pins using PORT_PCR_MUX.
In that case this line was used:
"CORE_PIN9_CONFIG = PORT_PCR_MUX(6); // pin 9, PTC3, I2S0_TX_BCLK"
And I guess I will have to do something similar like
CORE_PIN7_CONFIG = PORT_PCR_MUX(4);
CORE_PIN8_CONFIG = PORT_PCR_MUX(6);
In this case I don't think it will help to post my code. I just want to know if the solution I have in mind should work and if so how I restore pin 7 and 8 so that they can be used by the Audio Board.
I tried adding the lines after the reassignment but it didn't work. I would be grateful for any advice.
Thanks in advance and Merry X-Max to you all!
I am currently working on a project where I hopefully will be able to use all 8 serial interfaces on the Teensy 4.1 to read sensor data while displaying information on a RGB Led matrix display using OctoWS2811 library.
I thought I could give it a shot to add audio as well by using the Teensy Audio Board RevD for Teensy 4.x.
I am new to the Teensy controllers but have some experience using Arduino's end ESP32's.
Currently I am only using 4 serial interfaces, Serial1-4 and only the Rx channels.
When using the Teensy Audio Board the I2S Tx/Rx will be in conflict with the Serial2 interface as I understand.
I managed to reassign Serial2 to pin 30 and 31 and Serial3 to pin 32 and 33 using setRx and setTx and it seems to work alright, at least the Rx channels. I get the sensor data that I am expecting.
The audio board works fine until the Serial interfaces are initialized and I guess the issue might be that pin 7 and 8 are not restored to be used by I2S after the reassignment.
I found a thread covering a similar issue for the Teensy 3 where Paul advised to restore the pins using PORT_PCR_MUX.
In that case this line was used:
"CORE_PIN9_CONFIG = PORT_PCR_MUX(6); // pin 9, PTC3, I2S0_TX_BCLK"
And I guess I will have to do something similar like
CORE_PIN7_CONFIG = PORT_PCR_MUX(4);
CORE_PIN8_CONFIG = PORT_PCR_MUX(6);
In this case I don't think it will help to post my code. I just want to know if the solution I have in mind should work and if so how I restore pin 7 and 8 so that they can be used by the Audio Board.
I tried adding the lines after the reassignment but it didn't work. I would be grateful for any advice.
Thanks in advance and Merry X-Max to you all!