Radio library Bluepill

iscle
Wed Jul 12, 2017 1:51 pm
Hi,

i’ve been trying to get a TEA5767 working with the STM32 arduino port with the Radio library which can be found on GitHub, but i get lots of warnings and errors when trying to compile the Test sketch for the STM32 board. If I try to compile it for an arduino uno or an arduino nano it works just fine!

What should I do?

This is the error
In file included from C:\Users\Iscle\Documents\Arduino\libraries\Radio-master\examples\TestTEA5767\TestTEA5767.ino:36:0:

C:\Users\Iscle\Documents\Arduino\libraries\Radio-master\src/radio.h:124:1: warning: 'typedef' was ignored in this declaration [enabled by default]

};

^

C:\Users\Iscle\Documents\Arduino\libraries\Radio-master\src/radio.h:133:1: warning: 'typedef' was ignored in this declaration [enabled by default]

};

^

In file included from C:\Users\Iscle\Documents\Arduino\libraries\Radio-master\src\RDA5807M.cpp:21:0:

C:\Users\Iscle\Documents\Arduino\libraries\Radio-master\src/radio.h:124:1: warning: 'typedef' was ignored in this declaration [enabled by default]

};

^

C:\Users\Iscle\Documents\Arduino\libraries\Radio-master\src/radio.h:133:1: warning: 'typedef' was ignored in this declaration [enabled by default]

};

^

C:\Users\Iscle\Documents\Arduino\libraries\Radio-master\src\RDA5807M.cpp: In member function 'virtual void RDA5807M::checkRDS()':

C:\Users\Iscle\Documents\Arduino\libraries\Radio-master\src\RDA5807M.cpp:381:38: error: no matching function for call to 'TwoWire::requestFrom(int, int, int)'

Wire.requestFrom(I2C_INDX, 8, 1); // Retransmit device address with READ, followed by 8 bytes

^

C:\Users\Iscle\Documents\Arduino\libraries\Radio-master\src\RDA5807M.cpp:381:38: note: candidates are:

In file included from C:\Users\Iscle\Documents\Arduino\hardware\Arduino_STM32-master\STM32F1\libraries\Wire/Wire.h:43:0,

from C:\Users\Iscle\Documents\Arduino\libraries\Radio-master\src\RDA5807M.cpp:19:

C:\Users\Iscle\Documents\Arduino\hardware\Arduino_STM32-master\STM32F1\libraries\Wire/WireBase.h:101:11: note: uint8 WireBase::requestFrom(uint8, int)

uint8 requestFrom(uint8, int);

^

C:\Users\Iscle\Documents\Arduino\hardware\Arduino_STM32-master\STM32F1\libraries\Wire/WireBase.h:101:11: note: candidate expects 2 arguments, 3 provided

C:\Users\Iscle\Documents\Arduino\hardware\Arduino_STM32-master\STM32F1\libraries\Wire/WireBase.h:106:11: note: uint8 WireBase::requestFrom(int, int)

uint8 requestFrom(int, int);

^

C:\Users\Iscle\Documents\Arduino\hardware\Arduino_STM32-master\STM32F1\libraries\Wire/WireBase.h:106:11: note: candidate expects 2 arguments, 3 provided

C:\Users\Iscle\Documents\Arduino\libraries\Radio-master\src\RDA5807M.cpp: In member function 'virtual void RDA5807M::debugStatus()':

C:\Users\Iscle\Documents\Arduino\libraries\Radio-master\src\RDA5807M.cpp:483:33: error: no matching function for call to 'TwoWire::requestFrom(int, int, int)'

Wire.requestFrom(I2C_INDX,32,1); // Retransmit device address with READ, followed by 8 bytes

^

C:\Users\Iscle\Documents\Arduino\libraries\Radio-master\src\RDA5807M.cpp:483:33: note: candidates are:

In file included from C:\Users\Iscle\Documents\Arduino\hardware\Arduino_STM32-master\STM32F1\libraries\Wire/Wire.h:43:0,

from C:\Users\Iscle\Documents\Arduino\libraries\Radio-master\src\RDA5807M.cpp:19:

C:\Users\Iscle\Documents\Arduino\hardware\Arduino_STM32-master\STM32F1\libraries\Wire/WireBase.h:101:11: note: uint8 WireBase::requestFrom(uint8, int)

uint8 requestFrom(uint8, int);

^

C:\Users\Iscle\Documents\Arduino\hardware\Arduino_STM32-master\STM32F1\libraries\Wire/WireBase.h:101:11: note: candidate expects 2 arguments, 3 provided

C:\Users\Iscle\Documents\Arduino\hardware\Arduino_STM32-master\STM32F1\libraries\Wire/WireBase.h:106:11: note: uint8 WireBase::requestFrom(int, int)

uint8 requestFrom(int, int);

^

C:\Users\Iscle\Documents\Arduino\hardware\Arduino_STM32-master\STM32F1\libraries\Wire/WireBase.h:106:11: note: candidate expects 2 arguments, 3 provided

exit status 1


Rick Kimball
Wed Jul 12, 2017 2:23 pm
Which Radio Library?

https://github.com/search?utf8=%E2%9C%9 … rary&type=


stevestrong
Wed Jul 12, 2017 3:49 pm
Which STM32 board?

zmemw16
Wed Jul 12, 2017 4:10 pm
radio+library+TEA5767 –> 6 repo’s cf 343 :)
+arduino and its 5
stephen

iscle
Wed Jul 12, 2017 10:14 pm
Hi,

yup, i forgot to put the link to the library hahaha
It’s this one: https://github.com/mathertel/Radio

The board is the BluePill one.

I’ve chosen this one because it seemed to work with arduino, but it can be any library as long as it works with the TEA5767, something I couldn’t find.

Thanks!


bdbell
Thu Jul 13, 2017 1:15 am
I have been using the attached library with STM32 and TEA Radio module.

iscle
Tue Jul 18, 2017 9:28 pm
[bdbell – Thu Jul 13, 2017 1:15 am] –
I have been using the attached library with STM32 and TEA Radio module.

Thanks! I will try it and see if it works for me. :)


iscle
Sat Jul 22, 2017 10:17 pm
Okay, I’ve tried 3 libraries of which only 2 of them work, but the problem is that I can’t seem to get past 103.5MHz frequency!!! If i go past that I can still hear that station, with a bit of noise… Anyone had this problem before?

Can it be a problem of having 10k pull up resistor on the i2c instead of 4k7?
Edit: I’ve tried with 5K resistors and it’s still the same problem…

Thanks


RogerClark
Sat Jul 22, 2017 10:25 pm
[iscle – Sat Jul 22, 2017 10:17 pm] –
Okay, I’ve tried 3 libraries of which only 2 of them work, but the problem is that I can’t seem to get past 103.5MHz frequency!!! If i go past that I can still hear that station, with a bit of noise… Anyone had this problem before?

Can it be a problem of having 10k pull up resistor on the i2c instead of 4k7?

Thanks

Seems very unlikely this is a problem with Comms to the module.

Sounds like you reached the RF frequency limit if either the TX or the Rx


iscle
Sat Jul 22, 2017 10:28 pm
[RogerClark – Sat Jul 22, 2017 10:25 pm] –

[iscle – Sat Jul 22, 2017 10:17 pm] –
Okay, I’ve tried 3 libraries of which only 2 of them work, but the problem is that I can’t seem to get past 103.5MHz frequency!!! If i go past that I can still hear that station, with a bit of noise… Anyone had this problem before?

Can it be a problem of having 10k pull up resistor on the i2c instead of 4k7?

Thanks

Seems very unlikely this is a problem with Comms to the module.

Sounds like you reached the RF frequency limit if either the TX or the Rx

Hi Roger,
Thanks for answering…

I’ve tried with 5k pull ups and it’s still the same problem.
Could it be due to a faulty chip? I’ve searched this problem and nobody seems to be having it! Strange… All stations from 103.5 and below work just fine…

Edit:
The library uses this to convert the frequency entered in (xxx.x) ex.(104.2) style and send it via i2c.
void TEA5767Radio::setFrequency(float frequency)
{
unsigned int frequencyB = 4 * (frequency * 1000000 + 225000) / 32768;
byte frequencyH = frequencyB >> 8;
byte frequencyL = frequencyB & 0XFF;
HWire.beginTransmission(_address);
HWire.write(frequencyH);
HWire.write(frequencyL);
HWire.write(0xB0);
HWire.write(0x10);
HWire.write(0x00);
HWire.endTransmission();
delay(100);
}


RogerClark
Sun Jul 23, 2017 12:03 am
Have you confirmed that the stations you receive eg. at 100Mhz actually transmit at 100Mhz

i.e Its possible that the frequency calculation you are using is incorrect and that when you try to receive on 103 you are telling it to receive on 108 or higher.

Sounds more like your board just doesnt receive very well above 103.5

Do you have another receiver to compare it with.
Did you try a different antenna etc


iscle
Sun Jul 23, 2017 12:18 am
[RogerClark – Sun Jul 23, 2017 12:03 am] –
Have you confirmed that the stations you receive eg. at 100Mhz actually transmit at 100Mhz

i.e Its possible that the frequency calculation you are using is incorrect and that when you try to receive on 103 you are telling it to receive on 108 or higher.

Sounds more like your board just doesnt receive very well above 103.5

Do you have another receiver to compare it with.
Did you try a different antenna etc

Yes, all the stations under 103.50MHz are the correct ones, I’ve used another radio to confirm that they really were the ones supposed to be. That’s how I found that the “maximum” station that it would receive.
Even if reboot the radio and tell it to sync, for example, 100.0MHz it will do it, but then if you directly sync 104.2 or even 106.1 the 103.5MHz station will start being received with a lot of noise. I can make a video if it helps.

Thanks.


Leave a Reply

Your email address will not be published. Required fields are marked *