• AVR Freaks

AnsweredHot!HARMONY BUG in SPI EEPROM Developer Help Example

Author
lamdaelectronics
Starting Member
  • Total Posts : 64
  • Reward points : 0
  • Joined: 2010/07/23 04:04:41
  • Location: 0
  • Status: offline
2019/07/27 01:01:20 (permalink)
0

HARMONY BUG in SPI EEPROM Developer Help Example

Does anybody have implemented the "Using Harmony's Dynamic SPI Driver" example with Harmony v.2.06?
I've managed to have it compile, although it stops at running with an _general_exception_handler Error when the DRV_SPI_BufferAddWrite() is executed. 
Attached are the files with the SPI settings and the modified code (app.c)
I'm using PIC32MX795F512L, MPLABX v.5.05, XC32, HARMONY v.2.06
 
 

Attached Image(s)

#1
lamdaelectronics
Starting Member
  • Total Posts : 64
  • Reward points : 0
  • Joined: 2010/07/23 04:04:41
  • Location: 0
  • Status: offline
Re: HARMONY BUG in SPI EEPROM Developer Help Example 2019/07/27 01:09:17 (permalink)
0
Finally the files were accepted above
post edited by lamdaelectronics - 2019/07/27 04:05:56
#2
muellernick
Super Member
  • Total Posts : 475
  • Reward points : 0
  • Joined: 2015/01/06 23:58:23
  • Location: Germany
  • Status: offline
Re: HARMONY BUG in SPI EEPROM Developer Help Example 2019/07/28 23:20:10 (permalink)
0
How about stepping into DRV_SPI_BufferAddWrite with the debugger?
 
Nick
#3
lamdaelectronics
Starting Member
  • Total Posts : 64
  • Reward points : 0
  • Joined: 2010/07/23 04:04:41
  • Location: 0
  • Status: offline
Re: HARMONY BUG in SPI EEPROM Developer Help Example 2019/07/29 00:10:47 (permalink)
0
That's how I found out where the problem is!
Pinpoint it can not handle the "struct DRV_SPI_DRIVER_OBJECT * pDrvObject = pClient->driverObject;"
Kostas
post edited by lamdaelectronics - 2019/07/29 00:12:56
#4
arpananand
Super Member
  • Total Posts : 421
  • Reward points : 0
  • Joined: 2009/11/18 04:35:42
  • Location: 0
  • Status: offline
Re: HARMONY BUG in SPI EEPROM Developer Help Example 2019/07/30 14:27:48 (permalink)
0
i see you are comparing the open handle with "NULL", in stead of that you should compare with "DRV_HANDLE_INVALID". see if it helps.
 
#5
lamdaelectronics
Starting Member
  • Total Posts : 64
  • Reward points : 0
  • Joined: 2010/07/23 04:04:41
  • Location: 0
  • Status: offline
Re: HARMONY BUG in SPI EEPROM Developer Help Example 2019/07/31 05:44:08 (permalink)
0
Thanks for the suggestion  arpananand, I've tried it but, as I said in my previous post the problem is in "struct DRV_SPI_DRIVER_OBJECT * pDrvObject = pClient->driverObject;"
 
PS. The code is NOT mine is the one provided by Microchip in https://microchipdeveloper.com/harmony:spi-dynamic#top-of-page. They say that the example is for Harmony 2, (I have the 2.06 installed).
I wonder, there is NOBODY who tried it? not even the authors?
#6
arpananand
Super Member
  • Total Posts : 421
  • Reward points : 0
  • Joined: 2009/11/18 04:35:42
  • Location: 0
  • Status: offline
Re: HARMONY BUG in SPI EEPROM Developer Help Example 2019/07/31 08:29:45 (permalink) ☼ Best Answerby lamdaelectronics 2019/08/01 03:49:22
3 (1)
how about trying a demo from Harmony 2 from following location:
apps\driver\spi\serial_eeprom
 
this should help.
#7
lamdaelectronics
Starting Member
  • Total Posts : 64
  • Reward points : 0
  • Joined: 2010/07/23 04:04:41
  • Location: 0
  • Status: offline
Re: HARMONY BUG in SPI EEPROM Developer Help Example 2019/08/01 03:57:43 (permalink)
0
Thank you arpananand!
The solution was there in my computer all the time. I've made the changes for my board and it worked!
The example writes 64 bytes of 0xAA and 0x55 and reads them back. After the verification it lights on an LED.
This implementation, under Harmony, it takes hundreds of statements, making "impossible" to maintain or intervene in to the code.
Case closed, back to the drawing board to integrate it in the rest of the code.
#8
lamdaelectronics
Starting Member
  • Total Posts : 64
  • Reward points : 0
  • Joined: 2010/07/23 04:04:41
  • Location: 0
  • Status: offline
Re: HARMONY BUG in SPI EEPROM Developer Help Example 2019/08/06 04:26:02 (permalink)
0
I had a response from Microchip support. If I manage to get it run with their help I will upload the project, followed by the Harmony procedure to set the SPI driver.
#9
lamdaelectronics
Starting Member
  • Total Posts : 64
  • Reward points : 0
  • Joined: 2010/07/23 04:04:41
  • Location: 0
  • Status: offline
Re: HARMONY BUG in SPI EEPROM Developer Help Example 2019/08/06 23:51:54 (permalink)
0
Got it work with Microchip Support. Attached a file with the changes made on the Microchip Developers Help example (https://microchipdeveloper.com/harmony:spi-dynamic)
 
#10
lamdaelectronics
Starting Member
  • Total Posts : 64
  • Reward points : 0
  • Joined: 2010/07/23 04:04:41
  • Location: 0
  • Status: offline
Re: HARMONY BUG in SPI EEPROM Developer Help Example 2019/08/06 23:56:13 (permalink)
0
Unfortunately the zipped file is larger than 500kB and I can not upload it!
#11
Jump to:
© 2019 APG vNext Commercial Version 4.5