I am currently playing withe the output options of pin 5 of the Teensy 4.0 board. I can change the drive-strength. But when I try to change speed or slew-rate I see no influence on the waveform at pin 5 that I am watching with an oscilloscope. The Program I use is given below. It generaes 5 cycles with speed=0 and 5 cycles with speed=3. Both waveforms look exactly the same.
Code:
int testPin = 5 ; // pin5 is EMC_08 on Teensy 4.0
#define MHz 1e6
#define IOMUXC_SLOW_SLEW_RATE 0
#define IOMUXC_FAST_SLEW_RATE 1
void setup() {
Serial.begin(115200);
while(!Serial) ;
Serial.println("teensy40gpioAndMuxTest2...") ;
Serial.print(" F_CPU_ACTUAL="); Serial.print(F_CPU_ACTUAL/MHz); Serial.println(" MHz") ;
Serial.printf("&IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_08=%08XH\n",&IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_08) ;
Serial.printf("IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_08 =%08XH\n",IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_08) ;
pinMode(testPin, OUTPUT);
pinMode(4 , OUTPUT);
Serial.printf("IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_08 =%08XH\n",IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_08) ;
Serial.println("end setup...") ;
}
void loop() {
while(1){
IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_08=IOMUXC_PAD_DSE(7) | IOMUXC_PAD_SPEED(0) | IOMUXC_FAST_SLEW_RATE ;
CORE_PIN4_PORTSET = CORE_PIN4_BITMASK;
for(int k=0 ; k<5 ; k++){
CORE_PIN5_PORTSET = CORE_PIN5_BITMASK;
CORE_PIN5_PORTCLEAR = CORE_PIN5_BITMASK;
}
IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_08=IOMUXC_PAD_DSE(7) | IOMUXC_PAD_SPEED(3) | IOMUXC_FAST_SLEW_RATE ;
CORE_PIN4_PORTCLEAR = CORE_PIN4_BITMASK;
for(int k=0 ; k<5 ; k++){
CORE_PIN5_PORTSET = CORE_PIN5_BITMASK;
CORE_PIN5_PORTCLEAR = CORE_PIN5_BITMASK;
}
}
}