Helpful ReplyHot!Problem with SPI clock

Page: < 12 Showing page 2 of 2
Author
rodims
Super Member
  • Total Posts : 1350
  • Reward points : 0
  • Joined: 2009/02/10 11:08:59
  • Location: 51.9627, 7.6262
  • Status: offline
Re: Problem with SPI clock 2018/10/17 06:01:39 (permalink)
0
Ramon, I wonder how this post relates to your older post: https://www.microchip.com/forums/m1060285.aspx
Did you already successfully use SPI between your PIC and the EM4325 or not ?
If it worked at that time, what is the difference now ?
 
Concerning "NON standard SPI" I wondered whether developers for other processor platforms like ARM or TI should not experience this problem, too. And my first impression was  that they don't.  (Google Search)
 
#21
rodims
Super Member
  • Total Posts : 1350
  • Reward points : 0
  • Joined: 2009/02/10 11:08:59
  • Location: 51.9627, 7.6262
  • Status: offline
Re: Problem with SPI clock 2018/10/17 07:24:50 (permalink)
0
The SPI function is working correcly and I send the data as the datasheet says. I first send the command word, in this case a 0xE8, SPI write command, and then I send the data byte I want to write. Then I send 3 bytes of dummy data so that I get the TAGs response. This it what the datasheet says to do, but then I load all the data of the EEPROM with the reader and nothing has benn written to memory of the EM4325. I get all 0s

 
Testing your success with NFC reader seems to be a smart method, but we cannot see wheter there could be other pitfalls.  I would suggest testing the basic SPI communication not by writing to the EEPROM, but to read some other non-EEPROM location, e.g. the temperature sensor.  EEPROM might have additional constraints, e.g. write protection:
 
From the manual:

The SPI Write Enable Words contain bits for each EEPROM page that a user may define as having write permission for the SPI interface when operating as an SPI Slave device. If the corresponding bit is 0, then the SPI interface is not allowed to write to that EEPROM page. Note that the write enable bit is only one condition for writing to the EEPROM page and is used in conjunction with the memory lock bits (except for User memory) to control EEPROM write operations. If using the memory lock bits to prevent the SPI interface from writing to EEPROM, then both the pwd - write and permalock bits must be set
 
This is independant from the discussion whether you can use the PIC hardware SPI or not.
#22
Page: < 12 Showing page 2 of 2
Jump to:
© 2018 APG vNext Commercial Version 4.5