Lora click package fails on OSC change "'Lora_rf_hw.c'

General discussion on mikroC PRO for PIC32.
Post Reply
Author
Message
DeltaSigma
Posts: 16
Joined: 09 Feb 2018 14:09

Lora click package fails on OSC change "'Lora_rf_hw.c'

#1 Post by DeltaSigma » 09 Feb 2018 14:29

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.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Lora click package fails on OSC change "'Lora_rf_hw.c'

#2 Post by filip » 13 Feb 2018 15:27

Hi,

Please, can you attach your project so I could analyze this issue ?

Regards,
Filip.

DeltaSigma
Posts: 16
Joined: 09 Feb 2018 14:09

Re: Lora click package fails on OSC change "'Lora_rf_hw.c'

#3 Post by DeltaSigma » 13 Feb 2018 16:46

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 :oops: ). 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);
Thanks Flip, and look forward to hearing what you find.
Regards mark.
Attachments
forflip.zip
(79.61 KiB) Downloaded 124 times

DeltaSigma
Posts: 16
Joined: 09 Feb 2018 14:09

Re: Lora click package fails on OSC change "'Lora_rf_hw.c'

#4 Post by DeltaSigma » 13 Feb 2018 16:47

.opps double post
Attachments
forflip.zip
(79.61 KiB) Downloaded 119 times

DeltaSigma
Posts: 16
Joined: 09 Feb 2018 14:09

Re: Lora click package fails on OSC change "'Lora_rf_hw.c'

#5 Post by DeltaSigma » 15 Apr 2018 09:04

Yeah um....
Still having this issue.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Lora click package fails on OSC change "'Lora_rf_hw.c'

#6 Post by filip » 16 Apr 2018 14:40

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.

DeltaSigma
Posts: 16
Joined: 09 Feb 2018 14:09

Re: Lora click package fails on OSC change "'Lora_rf_hw.c'

#7 Post by DeltaSigma » 23 Apr 2018 14:16

Thank You Flip.
Will try and get back to you.
:mrgreen:

DeltaSigma
Posts: 16
Joined: 09 Feb 2018 14:09

Re: Lora click package fails on OSC change "'Lora_rf_hw.c'

#8 Post by DeltaSigma » 08 Feb 2019 16:51

Just a follow up. Doesn't work.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Lora click package fails on OSC change "'Lora_rf_hw.c'

#9 Post by filip » 13 Feb 2019 09:42

Hi,

Are you able to compile the project ?

Regards,
Filip.

DeltaSigma
Posts: 16
Joined: 09 Feb 2018 14:09

Re: Lora click package fails on OSC change "'Lora_rf_hw.c'

#10 Post by DeltaSigma » 16 Feb 2019 09:55

Filip
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 )
    {

    }
}
Can you compile it at 8Mhz?

Code and package attached.
Regards.
Mark
Attachments
Screenshot (98)_LI.jpg
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

Post Reply

Return to “mikroC PRO for PIC32 General”