PIC32MZ2048EFH144 compiled/programmed with start kit VS compiled/programmed with CD3
Hi PIC experts,
My code can run with DM320007 (PIC32MZ2048EFH144-I/PH start kit) without any problem.
Project task: SPI reading and UDP output.
Firmware A running at DM320007, no issue. I'm using my SPI driver(Enhance mode with FIFO), with some modification based on demo project:
I create my PCB with PIC32MZ2048EFH144-I/PH and LAN8740 only. Those parts of my PCB are exactly same as the DM320007 (Ethernet pins; SPI1 are RF5/RF4/RD1, chip select is a GPIO RD10)
To fit my PCB, I removed debug/command/console related things from the project through Harmony. Program my PCB with ICD3 through MPLAB X IDE.
This firmware B runs not good. I found out that sometime the data sequence I read from the SPI is not correct. Example, I suppose to read 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12; turns out some time I get 5, 6, 7, 8, 9, 10, 11, 1, 2, 3, 4; or 7, 8, 9, 10, 11, 1, 2, 3, 4, 5, 6. (Feels the SPI FIFO is not read in the right sequence sometime)
Then I put the firmware B (same project, but set hardware tools as PKOB) to the DM320007 (programmed through start kit's PKOB), and this firmware B is running at the DM320007 without any problem.
Any suggestions? Thanks your help in advance!