Page 1 of 1
Correction in nRF24L01 component
Posted: Tue Feb 12, 2019 2:33 pm
by sysprofessional
Dear BenJ,
The component nRF24L01 in FC8 working fine but there is a little bug in Initialise macro for RF_CH register.
you wrote value 76 in register 0x40 for universally safe frequency (2.476MHz).While the required register value is (0x05+0x20 = 0x25)
MX_UINT16 FCD_0e0f1_nRF24L01__Initialise()
{
//Local variable definitions
MX_UINT16 FCL_TEMP;
MX_UINT16 FCR_RETVAL;
// ce_pin = 0
SET_PORT_PIN(C, 0, 0);
FCI_DELAYBYTE_US(40);
FC_CAL_SPI_Master_Init_1();
FCI_DELAYBYTE_US(40);
FCD_0e0f1_nRF24L01__WriteRegister(0x24, 0x4F);
FCD_0e0f1_nRF24L01__WriteRegister(0x26, 0x07);
FCD_0e0f1_nRF24L01__WriteRegister(0x3C, 0x00);
FCD_0e0f1_nRF24L01__WriteRegister(0x27, 0x70);
FCD_0e0f1_nRF24L01__WriteRegister(0x40, 76);
FCD_0e0f1_nRF24L01__FlushRx();
FCD_0e0f1_nRF24L01__FlushTx();
return (FCR_RETVAL);
}
According datasheet the register range between (0x00 - 0x1D). nRF24L01 has no register with address of 0x40. So this command is useless. Module will always configure at default value 0x02 (2.402MHz). That's why working fine but not at safe frequency.
Re: Correction in nRF24L01 component
Posted: Tue Feb 12, 2019 3:48 pm
by mnf
See also
viewtopic.php?f=63&t=18962&hilit=Nrf
Where I mention this in one of the examples.
There is also an example using Shockburst and variable length packets which may be useful to you?
Re: Correction in nRF24L01 component
Posted: Tue Feb 12, 2019 5:59 pm
by sysprofessional
Thanks mnf,
btw i was already made it using FC6 before launching the FC7 and its working nicely for me in both modes.
Basically my goal is to indicate the register 0x40 .Matrix team used it for RF_CH register (plz correct me if i'm wrong)
mnf, here is the small peace of code from your example of initialise macro.
FCD_0e0f1_nRF24L01__WriteRegister(0x27, 0x70);
FCD_0e0f1_nRF24L01__WriteRegister(0x40, 64); // Anyone know what this does?
FCD_0e0f1_nRF24L01__FlushRx();
you did not explain about this register,
BR
Syspro
Re: Correction in nRF24L01 component
Posted: Tue Feb 12, 2019 6:36 pm
by Benj
Hello,
you wrote value 76 in register 0x40 for universally safe frequency (2.476MHz).While the required register value is (0x05+0x20 = 0x25)
Thanks for letting me know.
I have now made the changes you suggested and pushed them to the v8 update system.
Re: Correction in nRF24L01 component
Posted: Tue Feb 12, 2019 7:19 pm
by mnf
I just added a comment querying the line! It was a long time ago!
The block read/write macros make for a neater interface though!
Martin
Re: Correction in nRF24L01 component
Posted: Wed Feb 13, 2019 10:35 pm
by electron67
Hi Benj
This update of the component NRF24L01, is also needed for Flowcode 7 for a good operation ?
Enrique
Re: Correction in nRF24L01 component
Posted: Tue Feb 19, 2019 10:49 am
by Benj
Hi Enrique,
I've added the fix to v7 and made the update available here.
viewtopic.php?f=63&t=19743
Re: Correction in nRF24L01 component
Posted: Tue Feb 19, 2019 4:37 pm
by electron67
Hi Benj
I am working with an irrigation system in which I use this transmitter; in fact if it works fine, but I notice that sometimes it takes a little longer to turn it off or on, I hope that with this update of the transmitter the reception will be refined.
Thanks Benj
Re: Correction in nRF24L01 component
Posted: Sat Mar 09, 2019 8:21 am
by DCW
Hello ALL... I read the datasheet given to me... off the internet... and I believe that MatrixTsl's rendition of this component... is GOOD.!!! To say the least... but very confusing... and POOR.... when one realizes that there is so much of the NRF24L01 not catered for in the component..!! OR AM WRONG..????
Is this on purpose..?????.. have I missed something...??? am I asking for too.... much..???
Is there anyone out there - in this great big MatrixTsl Forum system.... that could venture to help me... create a NRF24L01 component... that caters for the whole NRF24L01 device operation.???
It's fine having only one PIPE ADDRESS .. with 5 bytes ... filled in... and using it like that... but what about the other 5 PIPE ADDRESS functions... so that one may use the NRF24L01 to it's fullest... and have all the functionality....
Surely - there is someone out there that can write such a component... what about the "big guns" in embedded software C coding...??? There must be dozens of those people...????... WOW what a challenge....????
Please someone... can - anyone help...??? ..
The poor little NRF24L01 .... would be so smart to be able to work ... I will say properly... (I hate that word... it's a very bad adverb)... rather say correctly..!!!
Liam from MatrixTsl says his engineers - are far to busy to do a proper job...
Can I throw the challenge out to anyone that can create this component... please..???
I will contact as many technical magazine company publishers as possible... and also as many other internet based ... embedded software engineers .. in C code as possible.. and see what I can get going.... cause FLOWCODE is a damn fine program... I have taught children in grade 0 ... and showed them how, and what FLOWCODE can do... Boy OH Boy - is there time to sleep...hmmm... not with those guys...
Thanks for reading this.... people....
Have any other people got something to add.... please PM me if you like....!!!
My Kindest Regards
DCW ....(Damn Clean Water .... Distiled and molecularly neutral Clean Water).....
Re: Correction in nRF24L01 component
Posted: Tue Mar 12, 2019 8:29 pm
by celebriums
Hi All
@electron67
Did the nRF24L01 component work correctly? I'm thinking of using it in a project.
Re: Correction in nRF24L01 component
Posted: Tue Mar 12, 2019 9:10 pm
by electron67
HI,
I have not updated the files yet, I am still working with the previous version, but if the component works perfectly.
Enrique