Hi everyone.
I have installed the Lora click package, added the paths and have some code working fine, however, when I change the MCU clock frequency the message window displays the error.
0 340 File 'C:\Users\Public\Documents\Mikroelektronika\mikroC PRO for PIC32\Packages\Click_Lora_RF\Uses\lora_rf_hw.c' not found,
Now it's my understanding that this is an inaccessible package file. So how do I change the clock speed? I am designing a low voltage device that requires different clock to 80 Mhz.
Can anyone confirm that changing the clock with the lora package results in this error when compiling?
Regards
Mark.
Lora click package fails on OSC change "'Lora_rf_hw.c'
-
- Posts: 16
- Joined: 09 Feb 2018 14:09
Re: Lora click package fails on OSC change "'Lora_rf_hw.c'
Hi,
Please, can you attach your project so I could analyze this issue ?
Regards,
Filip.
Please, can you attach your project so I could analyze this issue ?
Regards,
Filip.
-
- Posts: 16
- Joined: 09 Feb 2018 14:09
Re: Lora click package fails on OSC change "'Lora_rf_hw.c'
Hi Flip, thanks for the reply.
I just quickly made this program to show you as my program is far too long (and needs cleaning up ). I have only changed the clock speed and the oscillator selection bits to Primary Osc (XT,HS,EC). I figure something is wrong with the package installation. Complies fine at 80 MHz though.
However I have found a walk around.
I found the old library on github and although not as nice I have it running at 8MHz.
On a side note.
To anyone reading this, to run a RN2903 with a MCU at 8Mhz you have to change the BAUD rate (57600) of the RN2903 to a lower value (I used 9600) or the UART communication fails. (Restart Condition, RN2903 LoRa™ Technology Module Command Reference User’s Guide page 12.)
ie Something like.
Thanks Flip, and look forward to hearing what you find.
Regards mark.
I just quickly made this program to show you as my program is far too long (and needs cleaning up ). I have only changed the clock speed and the oscillator selection bits to Primary Osc (XT,HS,EC). I figure something is wrong with the package installation. Complies fine at 80 MHz though.
However I have found a walk around.
I found the old library on github and although not as nice I have it running at 8MHz.
On a side note.
To anyone reading this, to run a RN2903 with a MCU at 8Mhz you have to change the BAUD rate (57600) of the RN2903 to a lower value (I used 9600) or the UART communication fails. (Restart Condition, RN2903 LoRa™ Technology Module Command Reference User’s Guide page 12.)
ie Something like.
Code: Select all
TRISF5_bit = 0; //Uart2 Tx... For BAUD change only.
//.......
LATF5_bit = 0; //Tx low.
Delay_us(938);
UART2_Init( 9600 );
Delay_ms( 200 );
UART2_Write(0x55);
Regards mark.
- Attachments
-
- forflip.zip
- (79.61 KiB) Downloaded 124 times
-
- Posts: 16
- Joined: 09 Feb 2018 14:09
Re: Lora click package fails on OSC change "'Lora_rf_hw.c'
.opps double post
- Attachments
-
- forflip.zip
- (79.61 KiB) Downloaded 119 times
-
- Posts: 16
- Joined: 09 Feb 2018 14:09
Re: Lora click package fails on OSC change "'Lora_rf_hw.c'
Yeah um....
Still having this issue.
Still having this issue.
Re: Lora click package fails on OSC change "'Lora_rf_hw.c'
Hi,
I apologize for the delayed reply.
If I'm correct, just delete the #include "lora_rf.h" line and the example will compile.
Also, I suggest you to reinstall the library from the LibStock.
Regards,
Filip.
I apologize for the delayed reply.
If I'm correct, just delete the #include "lora_rf.h" line and the example will compile.
Also, I suggest you to reinstall the library from the LibStock.
Regards,
Filip.
-
- Posts: 16
- Joined: 09 Feb 2018 14:09
Re: Lora click package fails on OSC change "'Lora_rf_hw.c'
Thank You Flip.
Will try and get back to you.
Will try and get back to you.
-
- Posts: 16
- Joined: 09 Feb 2018 14:09
Re: Lora click package fails on OSC change "'Lora_rf_hw.c'
Just a follow up. Doesn't work.
Re: Lora click package fails on OSC change "'Lora_rf_hw.c'
Hi,
Are you able to compile the project ?
Regards,
Filip.
Are you able to compile the project ?
Regards,
Filip.
-
- Posts: 16
- Joined: 09 Feb 2018 14:09
Re: Lora click package fails on OSC change "'Lora_rf_hw.c'
Filip
The project will not compile.
Can you compile it at 8Mhz?
Code and package attached.
Regards.
Mark
The project will not compile.
Code: Select all
/* LoRa RF Example
********************/
//#include "lora_rf.h"
/* Variables
**************/
sbit RF_LORA_RST at LATC1_bit;
sbit RF_LORA_RST_Direction at TRISC1_bit;
/* Function Prototypes
************************/
void system_init( void );
/* Functions
**************/
void system_init()
{
RF_LORA_RST_Direction = 0;
}
void main()
{
system_init();
lora_rf_reset(); // <------------------<<<
while( 1 )
{
}
}
Code and package attached.
Regards.
Mark
- Attachments
-
- Screenshot (98)_LI.jpg (948.22 KiB) Viewed 2660 times
-
- Filip.7z
- Has Code and package used in example
- (917.72 KiB) Downloaded 103 times