newaetech / chipwhisperer

ChipWhisperer - the complete open-source toolchain for side-channel power analysis and glitching attacks
http://chipwhisperer.com
Other
1.09k stars 280 forks source link

ChipWhispererHusky userio.drive_data getter always returns 0 #494

Closed nikals99 closed 3 months ago

nikals99 commented 3 months ago

According to the documentation scope.userio.drive_data on the Husky should return an integer describing how the userio is currently driven. Instead it always returns 0.

Steps to Reproduce:

import chipwhisperer as cw

scope = cw.scope()

scope.userio.direction = 0xFF
scope.userio.drive_data = 0xFF
print(scope.userio.drive_data)

The output should be:

255

The actual output:

0
jpcrypt commented 3 months ago

Thanks for noting this; fixed in https://github.com/newaetech/chipwhisperer/commit/bd7abc08f488d939a1853942c798868896fdaa32 However note that scope.userio.drive_data will only return what you set to it, whereas scope.userio.status will return the actual status of the pins. So in the case where you have a mix of I/O pins, they will not be the same.