soburi / JN516x-arduino-package

Arduino package for JN516x
35 stars 7 forks source link

Small correction eeprom_size #93

Closed dondipietro closed 6 years ago

dondipietro commented 6 years ago

Hello Soburi, I think that you should replace : in the file "JN516x-arduino-package/variants/jn516x/platform.h"

static inline size_t eeprom_size() { return segmentLength * segmentNumber; }

by : static inline size_t eeprom_size() { return segmentLength * (segmentNumber+1); }

Because segmentNumber start from zero, so you under estimate teh size of eeprom. Thank you for your greate job ! 👍

dondipietro commented 6 years ago

After posting I made a few additional test.

I just tested on jn5168 and I can't write on eeprom after adress 4032 4032 is 64x63 So your are absolutely right. I tought that eeprom size was 64*64.

Sorry about that.

soburi commented 6 years ago

Hi, @dondipietro.

Thank you for reporting this issue.

It's seem to be no problem. So, I close this report once.

EEPROM size is decide by u16AHI_InitialiseEEP() which called from eeprom_init(). It is valid value among JN516x's EEPROM APIs.

https://www.nxp.com/docs/en/user-guide/JN-UG-3087.pdf#G38.1010978

If you met related problem, please reopen.👍