Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot compile: SPI.transfer() SPI...setMosi missing #1

Closed
tueddy opened this issue Dec 22, 2019 · 2 comments
Closed

cannot compile: SPI.transfer() SPI...setMosi missing #1

tueddy opened this issue Dec 22, 2019 · 2 comments

Comments

@tueddy
Copy link

tueddy commented Dec 22, 2019

Hi,

very interesting project! I want to upgrade firmware for lower power card detection (LPCD)
But i'm unable to compile. I have installed the bluepill support from this tutorial:
https://www.heise.de/developer/artikel/Keine-bittere-Pille-die-Blue-Pill-mit-ARM-Cortex-M3-4009580.html
Blink demo works fine after installing.

On compiling your firmware-updater i get several errors SPI things are undefined:
void PN5180_Firmware::Begin() {
SPI.setMOSI(MosiPin);
SPI.setMISO(MisoPin);
SPI.setSCLK(SckPin);

and
SPI.transfer((uint8_t*)TxBuffer, TxSize);

What is the exact environment to make this work? PN5180 wiring seems fine.
I've also tried to compile using ESP8266/ESP32 but get guru mediation errors, maybe progmem?. Arduino UNO has not enough ram. Any ideas how to get this working?
Best
Dirk

@tueddy
Copy link
Author

tueddy commented Dec 26, 2019

I finally managed to update the PN5180 firmware to version 4.0 using the official st-libraries and the st-link V2 programmer. the SPI library described in tutorial above seems incompatible.

Thank's for your great library!
Dirk

@abidxraihan
Copy link

I finally managed to update the PN5180 firmware to version 4.1 using ESP32, no additional hardware or anything needed. Arduino development environment was used.

After extensively raking through zGrEaNz's code I found minor(but crucial) programming issues. Although these issues may just be specific to ESP32 board. The guru mediation error occurred because ChunkCounter variable was not initialized. Also no number was passed to MaxChunkSize when SecureDownloadTransceive() was called in lie 529 of PN5180_Firmware.cpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants