Skip to content

Instantly share code, notes, and snippets.

@MrKevinWeiss
Created June 5, 2018 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrKevinWeiss/074d8b435cb4564d975903d816842120 to your computer and use it in GitHub Desktop.
Save MrKevinWeiss/074d8b435cb4564d975903d816842120 to your computer and use it in GitHub Desktop.
***TEST RESULTS*** cpu/sam0: update I2C driver to new API #9198
Connected to /dev/ttyACM1
================================================================================
Name: init test
Description: Tests the initialization of the i2c periph
Result: PASS
Notes:
--------------------------------------------------------------------------------
Command:
Message: Amount of i2c devices: [1]
Data: [1]
Result: Success
Command:
Message: i2c_0 successfully assigned as master
Data: []
Result: Success
Command:
Message: Given device not available
Data: []
Result: Error
================================================================================
Name: mutex test
Description: Tests mutex aquire/release functionality (not full)
Result: PASS
Notes: Cannot test since it can still be used without mutex
Cannot test expected timeout due to no reset
Do we need double release failure check?
Does not check multiple busses acquired
--------------------------------------------------------------------------------
Command:
Message: i2c_0 successfully assigned as master
Data: []
Result: Success
Command: i2c_release(i2c_0)
Message: i2c_0 successfully released
Data: []
Result: Success
Command: i2c_acquire(i2c_0)
Message: i2c_0 successfully acquired
Data: []
Result: Success
Command: i2c_read_byte(i2c_0, 0x55, 0x00)
Message: i2c_0 successfully read 1 byte: [0x00]
Data: [0x00]
Result: Success
Command: i2c_release(i2c_0)
Message: i2c_0 successfully released
Data: []
Result: Success
================================================================================
Name: read test
Description: Tests the read functionality for default i2c bus (0) with the bpt
Result: PASS
Notes: Does not check flags
--------------------------------------------------------------------------------
Command:
Message: i2c_0 successfully assigned as master
Data: []
Result: Success
Command: i2c_acquire(i2c_0)
Message: i2c_0 successfully acquired
Data: []
Result: Success
Command: i2c_read_reg(i2c_0, 0x55, 0x98)
Message: i2c_0 successfully read 1 byte from reg 0x98: [0x00]
Data: [0x00]
Result: Success
Command: i2c_read_reg(i2c_0, 0x56, 0x98)
Message: Unknown Error
Data: []
Result: Error
Command: i2c_read_reg(i2c_0, 0x55, 0x99)
Message: i2c_0 successfully read 1 byte from reg 0x99: [0x01]
Data: [0x01]
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x98, 1)
Message: i2c_0 successfully read 1 bytes from reg 0x98: [0x00]
Data: [0x00]
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x99, 1)
Message: i2c_0 successfully read 1 bytes from reg 0x99: [0x01]
Data: [0x01]
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x98, 2)
Message: i2c_0 successfully read 2 bytes from reg 0x98: [0x00, 0x01]
Data: [0x00, 0x01]
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x98, 3)
Message: i2c_0 successfully read 3 bytes from reg 0x98: [0x00, 0x01, 0x02]
Data: [0x00, 0x01, 0x02]
Result: Success
Command: i2c_read_regs(i2c_0, 0x54, 0x98, 1)
Message: Unknown Error
Data: []
Result: Error
Command: i2c_read_byte(i2c_0, 0x55, 0x00)
Message: i2c_0 successfully read 1 byte: [0x00]
Data: [0x00]
Result: Success
Command: i2c_read_byte(i2c_0, 0x53, 0x00)
Message: Unknown Error
Data: []
Result: Error
Command: i2c_read_bytes(i2c_0, 0x55, 1, 0x00)
Message: i2c_0 successfully read 1 bytes: [0x00]
Data: [0x00]
Result: Success
Command: i2c_read_byte(i2c_0, 0x52, 0x01)
Message: Unknown Error
Data: []
Result: Error
Command: i2c_read_bytes(i2c_0, 0x55, 2, 0x00)
Message: i2c_0 successfully read 2 bytes: [0x00, 0x01]
Data: [0x00, 0x01]
Result: Success
Command: i2c_read_bytes(i2c_0, 0x55, 3, 0x00)
Message: i2c_0 successfully read 3 bytes: [0x00, 0x01, 0x02]
Data: [0x00, 0x01, 0x02]
Result: Success
Command: i2c_release(i2c_0)
Message: i2c_0 successfully released
Data: []
Result: Success
================================================================================
Name: write test
Description: Tests the write functionality for default i2c bus (0) with the bpt
Result: PASS
Notes: Does not check flags
--------------------------------------------------------------------------------
Command:
Message: i2c_0 successfully assigned as master
Data: []
Result: Success
Command: i2c_acquire(i2c_0)
Message: i2c_0 successfully acquired
Data: []
Result: Success
Command: i2c_write_reg(i2c_0, 0x55, 0x98, 0x00, [0x2a])
Message: i2c_0 successfully wrote 1 byte
Data: []
Result: Success
Command: i2c_read_reg(i2c_0, 0x55, 0x98)
Message: i2c_0 successfully read 1 byte from reg 0x98: [0x2a]
Data: [0x2a]
Result: Success
Command: i2c_write_reg(i2c_0, 0x55, 0x98, 0x00, [0x00])
Message: i2c_0 successfully wrote 1 byte
Data: []
Result: Success
Command: i2c_read_reg(i2c_0, 0x55, 0x98)
Message: i2c_0 successfully read 1 byte from reg 0x98: [0x00]
Data: [0x00]
Result: Success
Command: i2c_write_reg(i2c_0, 0x55, 0x99, 0x00, [0x29])
Message: i2c_0 successfully wrote 1 byte
Data: []
Result: Success
Command: i2c_read_reg(i2c_0, 0x55, 0x99)
Message: i2c_0 successfully read 1 byte from reg 0x99: [0x29]
Data: [0x29]
Result: Success
Command: i2c_write_reg(i2c_0, 0x55, 0x99, 0x00, [0x01])
Message: i2c_0 successfully wrote 1 byte
Data: []
Result: Success
Command: i2c_read_reg(i2c_0, 0x55, 0x99)
Message: i2c_0 successfully read 1 byte from reg 0x99: [0x01]
Data: [0x01]
Result: Success
Command: i2c_write_reg(i2c_0, 0x51, 0x98, 0x00, [0x00])
Message: Unknown Error
Data: []
Result: Error
Command: i2c_write_regs(i2c_0, 0x55, 0x98, 0x00, [0x2c])
Message: i2c_0 successfully wrote 1 bytes to reg 0x98
Data: []
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x98, 1)
Message: i2c_0 successfully read 1 bytes from reg 0x98: [0x2c]
Data: [0x2c]
Result: Success
Command: i2c_write_regs(i2c_0, 0x55, 0x98, 0x00, [0x00])
Message: i2c_0 successfully wrote 1 bytes to reg 0x98
Data: []
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x98, 1)
Message: i2c_0 successfully read 1 bytes from reg 0x98: [0x00]
Data: [0x00]
Result: Success
Command: i2c_write_regs(i2c_0, 0x55, 0x99, 0x00, [0x2d, 0x2e])
Message: i2c_0 successfully wrote 2 bytes to reg 0x99
Data: []
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x99, 2)
Message: i2c_0 successfully read 2 bytes from reg 0x99: [0x2d, 0x2e]
Data: [0x2d, 0x2e]
Result: Success
Command: i2c_write_regs(i2c_0, 0x55, 0x99, 0x00, [0x01, 0x02])
Message: i2c_0 successfully wrote 2 bytes to reg 0x99
Data: []
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x99, 2)
Message: i2c_0 successfully read 2 bytes from reg 0x99: [0x01, 0x02]
Data: [0x01, 0x02]
Result: Success
Command: i2c_write_regs(i2c_0, 0x55, 0x98, 0x00, [0x2f, 0x30, 0x31])
Message: i2c_0 successfully wrote 3 bytes to reg 0x98
Data: []
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x98, 3)
Message: i2c_0 successfully read 3 bytes from reg 0x98: [0x2f, 0x30, 0x31]
Data: [0x2f, 0x30, 0x31]
Result: Success
Command: i2c_write_regs(i2c_0, 0x55, 0x98, 0x00, [0x00, 0x01, 0x02])
Message: i2c_0 successfully wrote 3 bytes to reg 0x98
Data: []
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x98, 3)
Message: i2c_0 successfully read 3 bytes from reg 0x98: [0x00, 0x01, 0x02]
Data: [0x00, 0x01, 0x02]
Result: Success
Command: i2c_write_regs(i2c_0, 0x51, 0x98, 0x00, [0x00])
Message: Unknown Error
Data: []
Result: Error
Command: i2c_write_byte(i2c_0, 0x55, 0x00, [0x99])
Message: i2c_0 successfully wrote 1 byte to the bus
Data: []
Result: Success
Command: i2c_read_byte(i2c_0, 0x55, 0x00)
Message: i2c_0 successfully read 1 byte: [0x01]
Data: [0x01]
Result: Success
Command: i2c_write_byte(i2c_0, 0x55, 0x00, [0x98])
Message: i2c_0 successfully wrote 1 byte to the bus
Data: []
Result: Success
Command: i2c_read_byte(i2c_0, 0x55, 0x00)
Message: i2c_0 successfully read 1 byte: [0x00]
Data: [0x00]
Result: Success
Command: i2c_write_byte(i2c_0, 0x50, 0x00, [0x00])
Message: Unknown Error
Data: []
Result: Error
Command: i2c_write_bytes(i2c_0, 0x55, 0x00, [0x99])
Message: i2c_0 successfully wrote 1 bytes
Data: []
Result: Success
Command: i2c_read_byte(i2c_0, 0x55, 0x00)
Message: i2c_0 successfully read 1 byte: [0x01]
Data: [0x01]
Result: Success
Command: i2c_write_bytes(i2c_0, 0x55, 0x00, [0x98, 0x32])
Message: i2c_0 successfully wrote 2 bytes
Data: []
Result: Success
Command: i2c_read_byte(i2c_0, 0x55, 0x00)
Message: i2c_0 successfully read 1 byte: [0x32]
Data: [0x32]
Result: Success
Command: i2c_write_bytes(i2c_0, 0x55, 0x00, [0x99, 0x33, 0x34])
Message: i2c_0 successfully wrote 3 bytes
Data: []
Result: Success
Command: i2c_read_bytes(i2c_0, 0x55, 2, 0x00)
Message: i2c_0 successfully read 2 bytes: [0x33, 0x34]
Data: [0x33, 0x34]
Result: Success
Command: i2c_write_bytes(i2c_0, 0x55, 0x00, [0x98, 0x00, 0x01, 0x02])
Message: i2c_0 successfully wrote 4 bytes
Data: []
Result: Success
Command: i2c_read_bytes(i2c_0, 0x55, 3, 0x00)
Message: i2c_0 successfully read 3 bytes: [0x00, 0x01, 0x02]
Data: [0x00, 0x01, 0x02]
Result: Success
Command: i2c_write_bytes(i2c_0, 0x51, 0x00, [0x2f, 0x30, 0x31])
Message: Unknown Error
Data: []
Result: Error
Command: i2c_release(i2c_0)
Message: i2c_0 successfully released
Data: []
Result: Success
================================================================================
Name: read test
Description: Tests the read flag functionality
Result: PASS
Notes: Not a comprehesive test but tests a proper frame
--------------------------------------------------------------------------------
Command:
Message: i2c_0 successfully assigned as master
Data: []
Result: Success
Command: i2c_acquire(i2c_0)
Message: i2c_0 successfully acquired
Data: []
Result: Success
Command: i2c_read_reg(i2c_0, 0x55, 0x98)
Message: i2c_0 successfully read 1 byte from reg 0x98: [0x00]
Data: [0x00]
Result: Success
Command: i2c_read_bytes(i2c_0, 0x55, 1, 0x04)
Message: i2c_0 successfully read 1 bytes: [0x00]
Data: [0x00]
Result: Success
Command: i2c_read_bytes(i2c_0, 0x55, 1, 0x0c)
Message: i2c_0 successfully read 1 bytes: [0x01]
Data: [0x01]
Result: Success
Command: i2c_read_bytes(i2c_0, 0x55, 1, 0x08)
Message: i2c_0 successfully read 1 bytes: [0x02]
Data: [0x02]
Result: Success
Command: i2c_read_bytes(i2c_0, 0x55, 1, 0x08)
Message: Unknown Error
Data: []
Result: Error
Command: i2c_read_bytes(i2c_0, 0x55, 1, 0x0c)
Message: Unknown Error
Data: []
Result: Error
Command: i2c_release(i2c_0)
Message: i2c_0 successfully released
Data: []
Result: Success
================================================================================
Name: init test
Result: PASS
Name: mutex test
Result: PASS
Name: read test
Result: PASS
Name: write test
Result: PASS
Name: read test
Result: PASS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment