<ktemkin>
that FIFO allocation makes some sense to me
<ktemkin>
it's "I have 1k of buffer to dole out; how do I compromise between Endpoint Count and FIFO count?"
ExeciN has joined #glasgow
epray has joined #glasgow
<epray>
[Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
<epray>
[Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
<epray>
[Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
epray has left #glasgow [#glasgow]
<tnt>
looks legit
Edrash has joined #glasgow
Edrash has left #glasgow [#glasgow]
Smoacheodr has joined #glasgow
Smoacheodr has left #glasgow ["[Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode sta"]
<hell__>
lol
Getorix has quit [Read error: Connection reset by peer]
<_whitenotifier-3>
[glasgow] electroniceel commented on issue #172: revC1 schematic : lvds compatible connector part number is incorrect - https://git.io/JvaqP
<DurandA59>
Hi everyone! I am finalizing an i2c driver for the Glasgow FX2 firmware (for the ATECC508A) and I need to held low the i2c SDA line for >= 60μs to wake up the device. Writing 0x00 to I2DAT is too fast (~30μs). Is there an FX2 expert out there?
<electronic_eel>
DurandA59: so you wrote the code to handle the ATECC in firmware for the fx2? Or did you write a generic i2c interface in firmware and an applet in python on the host to handle the ATECC?
<DurandA59>
I wrote the code in the firmware for the FX2. Since the glasgow team decided to drop this feature, I decided to implement it anyways as a proof-of-concept and I preferred to handle the ATECC logic in the FX2 (only a few functions are required). It works fine as I am able to upload a nonce and generate the signature. The only issue is that I cannot
<DurandA59>
wake up the device properly.
<electronic_eel>
yeah, unfortunately whitequark didn't implement the generic i2c interface to the internal i2c bus yet.
<electronic_eel>
did microchip pull the complete datasheet of the atecc?
<electronic_eel>
I just see the summary datasheet now, but remember reading the full one some months ago
<DurandA59>
I was able to implement pretty much everything, it took me some time as I never worked with FX2 nor the 8051.
<electronic_eel>
DurandA59: you may have a point there, seems like there are no alternate functions for the scl and sda pins
<DurandA59>
So I think my only option is to switch from 400kHz to 100kHz during wakeup. I saw that 100kHz is also available in the FX2 datasheet however the I2CTL register only specifies 400KHZ and STOPIE. Should I write 0 to the 400KHZ bit to switch to 100kHz?
<electronic_eel>
yeah, so switching to 100kHz is your only option. write 0 to the 400KHZ bit to swtich to 100, write 1 to switch back to 400
<DurandA59>
I will try that, thank you for your help.
<electronic_eel>
maybe first read out the current value of the bit and set it back to that afterwards
<electronic_eel>
some other code part may have decided to use 100 instead of 400
<electronic_eel>
there is the reference manual of the fx2 which better explains these bits than the datasheet
<DurandA59>
Excellent, thank you for the tip about the reference manual.
<DurandA59>
Btw, do you know why __xdata is also specified for function parameters and not only for declaration?
<electronic_eel>
__xdata tells the compiler to use the "external" ram of the 8051
<electronic_eel>
this also works for function parameters. If you define a function with an __xdata parameter, the caller has to / can provide a pointer into external ram
<electronic_eel>
since the "internal" ram of the 8051 is so small, nearly everything is done with x ram in more recent controllers with a few kb of ram
<DurandA59>
That is what I assumed, but I forgot to put __xdata for some function parameters and it worked anyways so I wondered how did the compiler handle that.
<DurandA59>
Also I noticed that __xdata declarations must be at the top of the functions which seemed strange.
<DurandA59>
Switching to 100kHz works fine, I am able to sign a challenge sent from the host through USB. Thank you very much electronic_eel.
<DurandA59>
I will publish the asymmetric authentication code in a branch on my fork in case of any of you is interested. Right now I am using I am checking the signature against a raw public key but the final goal is to use a certificate stored in the ATECC.