Page 1 of 1

mcp3564 SPI error

Posted: Thu Oct 30, 2025 9:21 am
by SpeedPIC32
Hello,
I have one more small issue.
For the ADC3564 connections channel 4, I have MOSI on port D.0, MISO on port C.4, CLK on port D.10, and CS/SS on port D.7 in terms of hardware.
I cannot set the CLK remap pin to PortD.10. This makes it look as if two pins are being used. The following can be seen in the image clk. on the logic probe: image log, log2
log2.PNG
log2.PNG (69.22 KiB) Viewed 57 times
log.PNG
log.PNG (59.59 KiB) Viewed 57 times
clk.PNG
clk.PNG (37.81 KiB) Viewed 57 times


Incorrect data is being read.
If I set the oversampling higher than 256, the programme stops.
Regards

Re: mcp3564 SPI error

Posted: Thu Oct 30, 2025 9:23 am
by SpeedPIC32
PIC32MZ2048EFH144_SPI.fcfx
(27.42 KiB) Downloaded 7 times

Re: mcp3564 SPI error

Posted: Thu Oct 30, 2025 11:38 am
by medelec35
Hello.
SCK is not remappable so the pin is fixed no matter what the remappable pin shows.
With Channel 4 selected, the fixed pin is D10 ,so your image for connections is correct.
You can confirm this via the datasheet or target device image within Flowcode.
With SPI the remappable functions are for SDI, SDO and SS

Re: mcp3564 SPI error

Posted: Thu Oct 30, 2025 6:30 pm
by SpeedPIC32
Thanks for that.
Unfortunately, the second issue with the OSR is still there. If the value becomes smaller or larger, the software crashes/stops running.
Is there a way to set only the clock frequency for SPI? Or does it run directly via the Fosc/32 prescale setting?

Regards, SpeedPIC32