[xiao ESP32-S3 Sense] Conflict of MCPWM with SD Card

Hello,

I am controlling a motor using MCPWM with a xiao ESP32-S3 Sense, but this stops working if I call SD.begin().

Any known conflict between MCPWM and SD card reader ?

Thanks,

Hi there,
If you set the default Settings (GPIO’s) the PWM conflicts with the SD CS.
Afaik , you need to Switch it in the code or hardware or both?
without seeing the Hardware connections and the code in question it’s merely a Guess.
HTH
GL :slight_smile: PJ

check out the technical reference guide about IO mux and GPIO matrix to see the way .
:v:

try calling SDbegin() with a different PIN explicitly see if it works?

Hello PJ, and thanks for the insight.

I was trying to use GPIO7 (D8/SCK) & GPIO8 (D9/MISO) for my motor, and indeed SD.begin(21) does interfere with these pins, not with MCPWM per se.

It seems I misread the schematic, thinking that SD Card was using dedicated SPICLK and SPID pins… but Iooking at the File System documentation, I now understand SD operation does use D8/D9/D10.

Sorry for missing the obvious.

N.B. I found MCPWM rather useful to avoid using the limited number of PWM channels on ESP32S3… I’ve packaged a little library to make it easy to use.

Hi there,
I agree with you, way more useful too. Simple thing easy fix :smile: :+1:
Too many variants :crazy_face: LOL, c2,c3,why no C4 , :sparkler: :bomb: I guess it just sounds bad …
GL :slight_smile: PJ
:v: