_whitelogger has joined #glasgow
diverger has quit [Ping timeout: 240 seconds]
diverger has joined #glasgow
<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]
Getorix_ has joined #glasgow
electronic_eel has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
electronic_eel has joined #glasgow
electronic_eel has quit [Client Quit]
electronic_eel has joined #glasgow
emily has quit [Quit: killed]
ZerataX has quit [Quit: killed]
disasm[m] has quit [Quit: killed]
david-sawatzke[m has quit [Quit: killed]
fridtjof[m] has quit [Quit: killed]
promach3 has quit [Quit: killed]
kerel has quit [Quit: killed]
cyrillu[m] has quit [Quit: killed]
jschievink has quit [Quit: killed]
kerel has joined #glasgow
disasm[m] has joined #glasgow
ZerataX has joined #glasgow
jschievink has joined #glasgow
promach3 has joined #glasgow
emily has joined #glasgow
fridtjof[m] has joined #glasgow
david-sawatzke[m has joined #glasgow
cyrillu[m] has joined #glasgow
<_whitenotifier-3> [glasgow] electroniceel commented on issue #172: revC1 schematic : lvds compatible connector part number is incorrect - https://git.io/JvaqP
DurandA59 has joined #glasgow
<_whitenotifier-3> [glasgow] electroniceel opened pull request #188: revC schematics: fix recommended LVDS connector - https://git.io/Jvamk
<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> thx
<DurandA59> So I need to held low SDA for 60μs. Currently I just write 0x00 to I2DAT but it is too short and sometimes the device doesn't wake up.
<electronic_eel> don't know if this SDA-low-to-wake is something common for i2c devices, I have never seen it before
<DurandA59> Unfortunately if I write 0x00 twice the signal goes high due to the (N)ACK.
<DurandA59> This is not standard at all.
<electronic_eel> yes, seems to me like it
<DurandA59> So I think I can reduce the beed speed to 100Khz, write 0x00 and go back to 400Khz
<DurandA59> *the bus speed
<electronic_eel> I would try to implement it with gpio and not i2c - so disable the i2c, switch the pin to gpio, pull it low, switch back to i2c
<electronic_eel> but I haven't done that on the fx2 yet, just something I'd try on another microcontroller
<DurandA59> Do you know if the SDA pin can be used as a GPIO on the FX2?
<_whitenotifier-3> [glasgow] whitequark closed issue #172: revC1 schematic : lvds compatible connector part number is incorrect - https://git.io/Je2GE
<_whitenotifier-3> [GlasgowEmbedded/glasgow] whitequark pushed 1 commit to master [+0/-0/±1] https://git.io/Jvamr
<_whitenotifier-3> [GlasgowEmbedded/glasgow] electroniceel 4e0e4e3 - revC schematics: fix recommended LVDS connector
<_whitenotifier-3> [glasgow] whitequark closed pull request #188: revC schematics: fix recommended LVDS connector - https://git.io/Jvamk
<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.
ExeciN has quit [Ping timeout: 240 seconds]
DurandA59 has quit [Remote host closed the connection]
electronic_eel has quit [Ping timeout: 256 seconds]
electronic_eel has joined #glasgow
Stary has quit [Quit: ZNC - http://znc.in]
Stary has joined #glasgow
DurandA59 has joined #glasgow
DurandA59 has quit [Ping timeout: 260 seconds]
electronic_eel has quit [Ping timeout: 255 seconds]
electronic_eel has joined #glasgow
DurandA59 has joined #glasgow
DurandA59 has quit [Ping timeout: 260 seconds]
<Stephie> i keep running into things and thinking "damn i wish i had a glasgow"...
DurandA59 has joined #glasgow