SparkFun_RFD77402_Arduino_Library to much timeout

Development environment specific, Arduino, Eclipse, VS2013, Em::Blocks etc
Post Reply
MeanPhoenix
Posts: 3
Joined: Thu Oct 22, 2020 6:06 am

SparkFun_RFD77402_Arduino_Library to much timeout

Post by MeanPhoenix »

i have problem with this library and cjmcu-402
i have to much time out and errors when i want to get distance.
my core ver is : 1.9.0
and stm32f103c8t6 bluepill(64K) is my board
i havnt any problem at mega2560
SparkFun_RFD77402_Distance_Sensor___VCSEL_Time_of_Flight-1.0.0.zip

i have pull up resistor
i test it with mega2560 the reading sensor between 50 to 53 has delta time.
but with stm32f103c8t6 i have only two delta time With two values of 50 and 60 ms.
i think mega2560 is More reliable than stm32f103c8t6.
delay used in lib and i think the problem about it or millis function has problem.

User avatar
fpiSTM
Posts: 780
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 30
Location: Le Mans
Contact:

Re: SparkFun_RFD77402_Arduino_Library to much timeout

Post by fpiSTM »

There is some fixes available for I2C in the master for STM32F1 series, it should be fine to test it.
Did you try several speed?
By default the lib seems to be at : I2C_SPEED_STANDARD (100k)
Did you try I2C_SPEED_FAST (400k)?

MeanPhoenix
Posts: 3
Joined: Thu Oct 22, 2020 6:06 am

Re: SparkFun_RFD77402_Arduino_Library to much timeout

Post by MeanPhoenix »

Yes, I tried, but it got worse

User avatar
fpiSTM
Posts: 780
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 30
Location: Le Mans
Contact:

Re: SparkFun_RFD77402_Arduino_Library to much timeout

Post by fpiSTM »

You should try to change the default timeout set to 10 ms.
I will use a define for all 10 ms delay then test some values (higher and lower) to see if this change the issue.

MeanPhoenix
Posts: 3
Joined: Thu Oct 22, 2020 6:06 am

Re: SparkFun_RFD77402_Arduino_Library to much timeout

Post by MeanPhoenix »

fpiSTM wrote:
Fri Oct 23, 2020 3:37 pm
You should try to change the default timeout set to 10 ms.
I will use a define for all 10 ms delay then test some values (higher and lower) to see if this change the issue.
i ,tested it to
But this is what I did not test is master from github because right now iam working on another project and i afraid to change the core.

Post Reply

Return to “IDE's”