i’m trying to do board to board communication with two nucleo 64 F401 and the two examples installed in Ide with board manager, i2c slave receiver example doesn’t work, serial monitor shows unreadable characters.
if you comment char stuffs and send only an integer, receiver reads always zero.
where is the problem?
Thanks
Issue is known and a fix exists:
https://github.com/stm32duino/Arduino_C … issues/212
i’m not sure it’s the same problem, that thread talks about freeze, my code does not freeze, it just returns bad data,
anyway i did not understand how to fix it:
-I added sugested lines in wire.cpp, and changed allocateRxBuffer to static
-changed handle.XferCount to handle.XferSize in twi.c
before modifying code receiver showed bad data, after these code changes serial com shows anything.
were am i wrong?
Please can you tell me were can i download a fixed code version of arduino core stm32? Did someone upload it?
If i now reinstall the package through board manager it should work?
many thanks.
Even if I think it should freeze as the buffer should be initialized with null.
Anyway, If you applied properly the fix this should work, it seems you met another issue.
We have raised an issue on github following this fix as we found that IT mode (Rx/Tx callback) is not well managed. Maybe you met this case.
Just one question about your hardware setup. I2C lines (SDA/SCL) must have a pull up resistor on each line else this will not work.
To make sure doing all right I removed Arduino IDE and all the related folders, including Arduino15.
Then reinstalled Arduino IDE 1.8.4 and the last arduino core version 2018.1.18 in board manager.
Now compiling sketches for nucleo 64 returns exit code 1:
Arduino:1.8.4 (Windows 7), Scheda:"Nucleo-64, Nucleo F401RE, STLink, Generic Serial, None, Smallest (-Os default)"
...
...
Using board 'Nucleo_64' from platform in folder: C:\Users\stefano corona\AppData\Local\Arduino15\packages\STM32\hardware\stm32\2018.1.18
Using core 'arduino' from platform in folder: C:\Users\stefano corona\AppData\Local\Arduino15\packages\STM32\hardware\stm32\2018.1.18
cmd /c "if not exist C:\Users\stefano corona\AppData\Local\Arduino15\packages\STM32\hardware\stm32\2018.1.18\libraries\Wire\examples\master_writer/build_opt.h mkdir C:\Windows\TEMP\arduino_build_12413\sketch & type NUL > C:\Windows\TEMP\arduino_build_12413/sketch/build_opt.h"
Impossibile trovare il percorso specificato.
Impossibile trovare il percorso specificato.
exit status 1
Errore durante la compilazione per la scheda Nucleo-64.
Linux will only accept the “/”
On this forum, everyone is encouraged to use the “/” forward slash because some Linux users get annoyed when they have to use search and replace… don’t ask me how I know this
Ray
thanks for the explanation, then maybe my assumption is wrong.
Do you have any suggestion to solve the problem?
It does not compile without manually adding those files and folder, and when it compiles returns errors.
https://github.com/stm32duino/Arduino_C … 2/pull/204
But the main correction is also to double quote path in the platform.txt
this is what returns on my serial port monitor:
.€. ñ9
.€. ñ9
.€. ñ9
.€. ñ9
...
Instead of downloading the exe IDE installer, download the zip and… unzip it in a folder without spaces.
Then iside create a folder named portable. Launch the IDE and the other folders and files will be created.
Download the core and install it in the portable/sketchbook/hardware folder.
[zoomx – Fri Feb 09, 2018 10:07 pm] –
Maybe you can use a portable version.Instead of downloading the exe IDE installer, download the zip and… unzip it in a folder without spaces.
Then iside create a folder named portable. Launch the IDE and the other folders and files will be created.
Download the core and install it in the portable/sketchbook/hardware folder.
oh yes thank you even if the patch in platform.txt works well I will try it asap so I could also install board even under proxy
I think your install is ok, I will do the test next week with F401.
I have tested the patch for I2C slave with F091 and F303 with success. As I’ve mentioned, there is an issue with the I2C complete transfer callback which need to be reviewed. I will keep you informed.
from: nbData = I2C_TXRX_BUFFER_SIZE – obj->handle.XferCount;
to: nbData = I2C_TXRX_BUFFER_SIZE – obj->handle.XferSize;
As mentioned I2C slave required some review since the mode to IT mode. An issue is already open for this.
Thank you fpiSTM