Micromedia+ PIC32MX7 and Sigfox click

General discussion on mikroC PRO for PIC32.
Post Reply
Author
Message
heliop
Posts: 7
Joined: 13 Jun 2019 13:02

Micromedia+ PIC32MX7 and Sigfox click

#1 Post by heliop » 13 Jun 2019 14:22

Hi,

I´m trying to run sigfox click example with mikromedia+ with the shield for pic32mx7. I create a new board definition file compatible with the shield but when I run click_Sigfox_PIC32 example it get stuck in the function sigfox_init().


I attached the board files it´s the only files I changed.

Thank you,
Hélio Pereira
Attachments
board_files.zip
(9.68 KiB) Downloaded 85 times

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

Re: Micromedia+ PIC32MX7 and Sigfox click

#2 Post by filip » 21 Jun 2019 09:37

Hi,

Could you please attach the photo of your connection ?

Regards,
Filip.

heliop
Posts: 7
Joined: 13 Jun 2019 13:02

Re: Mikromedia+ PIC32MX7 and Sigfox click

#3 Post by heliop » 25 Jun 2019 18:31

Hi,

I attach the photo.


Thank you,
Hélio Pereira
Attachments
IMG_20190625_182624.jpg
IMG_20190625_182624.jpg (2.79 MiB) Viewed 3147 times

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: Micromedia+ PIC32MX7 and Sigfox click

#4 Post by filip.grujcic » 26 Jun 2019 16:34

Hello,

SigFox Click communicates via SPI. Have you checked that you initialized SPI properly?
Which SPI module are you using?

Kind regards,
Filip Grujcic

heliop
Posts: 7
Joined: 13 Jun 2019 13:02

Re: Mikromedia+ PIC32MX7 and Sigfox click

#5 Post by heliop » 28 Jun 2019 09:36

Hi,

I´m using SPI 1 and in the oscilloscope I can see communication from pic32(CLK and DO) but no answer from sigfox click.



Thank you,
Hélio Pereira

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: Micromedia+ PIC32MX7 and Sigfox click

#6 Post by filip.grujcic » 28 Jun 2019 15:20

Hello,

Everything in the files seems to be correct.
I will test out Sigfox click with your board def files on mm+ for PIC32MX and I will let you know what happens.

Kind regards,
Filip Grujcic

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: Micromedia+ PIC32MX7 and Sigfox click

#7 Post by filip.grujcic » 02 Jul 2019 11:56

Hi,

Could you send me a screenshot of your Library Manager, the section where the mikroBUS Board Definition API is, so I can see which library you ticked?

Kind regards,
Filip Grujcic

heliop
Posts: 7
Joined: 13 Jun 2019 13:02

Re: Micromedia+ PIC32MX7 and Sigfox click

#8 Post by heliop » 02 Jul 2019 16:26

Hi,

I´m using easypicfusion but I include the files I edit

#include "__epf_generic_GPIO.c"

#ifdef ENABLE_SPI
#include "__epf_generic_SPI.c"
#endif
#ifdef ENABLE_UART
#include "__epf_generic_UART.c"
#endif
#ifdef ENABLE_LOG
#include "__epf_generic_LOG.c"
#endif

Thank you,
Hélio Pereira
Attachments
lib1.PNG
lib1.PNG (7.04 KiB) Viewed 3080 times

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: Micromedia+ PIC32MX7 and Sigfox click

#9 Post by filip.grujcic » 02 Jul 2019 16:33

Hi,

But have you edited the file called easypicfusion_v7_P32MX795F512L.c?
The library uses this file and not the generic easypicfusion one.

Kind regards,
Filip Grujcic

heliop
Posts: 7
Joined: 13 Jun 2019 13:02

Re: Micromedia+ PIC32MX7 and Sigfox click

#10 Post by heliop » 02 Jul 2019 18:22

Hi,

Yes I edited easypicfusion_v7_P32MX795F512L.c


Thank you,
Hélio Pereira

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: Micromedia+ PIC32MX7 and Sigfox click

#11 Post by filip.grujcic » 03 Jul 2019 14:08

Hi Hélio,

Does the MCU completely freeze at the sigfox_init function, or does the code go through but Sigfox just fails to initialize?
How are you monitoring the code?
Have you tried other mikroBUS sockets?

Kind regards,
Filip Grujcic

heliop
Posts: 7
Joined: 13 Jun 2019 13:02

Re: Micromedia+ PIC32MX7 and Sigfox click

#12 Post by heliop » 03 Jul 2019 17:30

Hi,

The MCU completely freeze at the sigfox_init function.
I´m monitoring the code with breakpoints.
I only use mikroBUS1 socket because they share the same SPI bus the only difference is CS.


Thank you,
Hélio Pereira

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: Micromedia+ PIC32MX7 and Sigfox click

#13 Post by filip.grujcic » 04 Jul 2019 16:12

Hi,

Are you using hardware debugger?
RB6 and RB7 pins are used for programming and debugging and at the same time they are CS and RST on mikroBUS where you are trying to use SigFox Click.
I tried the example code and the MCU doesn't freeze, the code goes through, however I am not able to debug for above mentioned reasons.

Kind regards,
Filip Grujcic

heliop
Posts: 7
Joined: 13 Jun 2019 13:02

Re: Micromedia+ PIC32MX7 and Sigfox click

#14 Post by heliop » 04 Jul 2019 18:30

I will try without the debugger and I let you know if it works.



Thank you,
Hélio Pereira

Post Reply

Return to “mikroC PRO for PIC32 General”