Skip to content

Instantly share code, notes, and snippets.

@MrKevinWeiss
Created June 20, 2018 11:08
Show Gist options
  • Save MrKevinWeiss/8a6e58468b0f63fd74c565e6f1112556 to your computer and use it in GitHub Desktop.
Save MrKevinWeiss/8a6e58468b0f63fd74c565e6f1112556 to your computer and use it in GitHub Desktop.
#9347 test result for d3a7731
Starting Test periph_i2c
================================================================================
Name: init test
Desc: 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 assigned as master
Data: []
Result: Success
Command:
Message: Given device not available
Data: []
Result: Error
================================================================================
Name: mutex test
Desc: 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 assigned as master
Data: []
Result: Success
Command: i2c_release(i2c_0)
Message: i2c_0 released
Data: []
Result: Success
Command: i2c_acquire(i2c_0)
Message: i2c_0 acquired
Data: []
Result: Success
Command: i2c_read_byte(i2c_0, 0x55, 0x00)
Message: i2c_0 read 1 byte(s) : [0x00]
Data: [0]
Result: Success
Command: i2c_release(i2c_0)
Message: i2c_0 released
Data: []
Result: Success
================================================================================
Name: read test
Desc: Tests the read functionality for default i2c bus (0) with the bpt
Result: PASS
Notes: Does not check flags, must have a successful write before read
--------------------------------------------------------------------------------
Command:
Message: i2c_0 assigned as master
Data: []
Result: Success
Command: i2c_acquire(i2c_0)
Message: i2c_0 acquired
Data: []
Result: Success
Command: i2c_read_reg(i2c_0, 0x55, 0x98)
Message: i2c_0 read 1 byte(s) from reg 0x98 : [0x00]
Data: [0]
Result: Success
Command: i2c_read_reg(i2c_0, 0x56, 0x98)
Message: EIO [5]
Data: []
Result: Error
Command: i2c_read_reg(i2c_0, 0x55, 0x99)
Message: i2c_0 read 1 byte(s) from reg 0x99 : [0x01]
Data: [1]
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x98, 1)
Message: i2c_0 read 1 byte(s) from reg 0x98 : [0x00]
Data: [0]
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x99, 1)
Message: i2c_0 read 1 byte(s) from reg 0x99 : [0x01]
Data: [1]
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x98, 2)
Message: i2c_0 read 2 byte(s) from reg 0x98 : [0x00, 0x01]
Data: [0, 1]
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x98, 3)
Message: i2c_0 read 3 byte(s) from reg 0x98 : [0x00, 0x01, 0x02]
Data: [0, 1, 2]
Result: Success
Command: i2c_read_regs(i2c_0, 0x54, 0x98, 1)
Message: EIO [5]
Data: []
Result: Error
Command: i2c_read_regs(i2c_0, 0x55, 0x98, 1)
Message: i2c_0 read 1 byte(s) from reg 0x98 : [0x00]
Data: [0]
Result: Success
Command: i2c_read_byte(i2c_0, 0x55, 0x00)
Message: i2c_0 read 1 byte(s) : [0x00]
Data: [0]
Result: Success
Command: i2c_read_byte(i2c_0, 0x53, 0x00)
Message: EAGAIN [11]
Data: []
Result: Error
Command: i2c_read_bytes(i2c_0, 0x55, 1, 0x00)
Message: i2c_0 read 1 byte(s) : [0x00]
Data: [0]
Result: Success
Command: i2c_read_byte(i2c_0, 0x52, 0x01)
Message: EOPNOTSUPP [95]
Data: []
Result: Error
Command: i2c_read_bytes(i2c_0, 0x55, 2, 0x00)
Message: i2c_0 read 2 byte(s) : [0x00, 0x01]
Data: [0, 1]
Result: Success
Command: i2c_read_bytes(i2c_0, 0x55, 3, 0x00)
Message: i2c_0 read 3 byte(s) : [0x00, 0x01, 0x02]
Data: [0, 1, 2]
Result: Success
Command: i2c_release(i2c_0)
Message: i2c_0 released
Data: []
Result: Success
================================================================================
Name: write test
Desc: Tests the write functionality for default i2c bus (0) with the bpt
Result: PASS
Notes: Does not check flags
--------------------------------------------------------------------------------
Command:
Message: i2c_0 assigned as master
Data: []
Result: Success
Command: i2c_acquire(i2c_0)
Message: i2c_0 acquired
Data: []
Result: Success
Command: i2c_write_reg(i2c_0, 0x55, 0x98, 0x00, [0x2a])
Message: i2c_0 wrote 1 byte
Data: []
Result: Success
Command: i2c_read_reg(i2c_0, 0x55, 0x98)
Message: i2c_0 read 1 byte(s) from reg 0x98 : [0x2a]
Data: [42]
Result: Success
Command: i2c_write_reg(i2c_0, 0x55, 0x98, 0x00, [0x00])
Message: i2c_0 wrote 1 byte
Data: []
Result: Success
Command: i2c_read_reg(i2c_0, 0x55, 0x98)
Message: i2c_0 read 1 byte(s) from reg 0x98 : [0x00]
Data: [0]
Result: Success
Command: i2c_write_reg(i2c_0, 0x55, 0x99, 0x00, [0x29])
Message: i2c_0 wrote 1 byte
Data: []
Result: Success
Command: i2c_read_reg(i2c_0, 0x55, 0x99)
Message: i2c_0 read 1 byte(s) from reg 0x99 : [0x29]
Data: [41]
Result: Success
Command: i2c_write_reg(i2c_0, 0x55, 0x99, 0x00, [0x01])
Message: i2c_0 wrote 1 byte
Data: []
Result: Success
Command: i2c_read_reg(i2c_0, 0x55, 0x99)
Message: i2c_0 read 1 byte(s) from reg 0x99 : [0x01]
Data: [1]
Result: Success
Command: i2c_write_reg(i2c_0, 0x51, 0x98, 0x00, [0x00])
Message: EIO [5]
Data: []
Result: Error
Command: i2c_write_regs(i2c_0, 0x55, 0x98, 0x00, [0x2c])
Message: i2c_0 wrote 1 bytes to reg 0x98
Data: []
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x98, 1)
Message: i2c_0 read 1 byte(s) from reg 0x98 : [0x2c]
Data: [44]
Result: Success
Command: i2c_write_regs(i2c_0, 0x55, 0x98, 0x00, [0x00])
Message: i2c_0 wrote 1 bytes to reg 0x98
Data: []
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x98, 1)
Message: i2c_0 read 1 byte(s) from reg 0x98 : [0x00]
Data: [0]
Result: Success
Command: i2c_write_regs(i2c_0, 0x55, 0x99, 0x00, [0x2d, 0x2e])
Message: i2c_0 wrote 2 bytes to reg 0x99
Data: []
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x99, 2)
Message: i2c_0 read 2 byte(s) from reg 0x99 : [0x2d, 0x2e]
Data: [45, 46]
Result: Success
Command: i2c_write_regs(i2c_0, 0x55, 0x99, 0x00, [0x01, 0x02])
Message: i2c_0 wrote 2 bytes to reg 0x99
Data: []
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x99, 2)
Message: i2c_0 read 2 byte(s) from reg 0x99 : [0x01, 0x02]
Data: [1, 2]
Result: Success
Command: i2c_write_regs(i2c_0, 0x55, 0x98, 0x00, [0x2f, 0x30, 0x31])
Message: i2c_0 wrote 3 bytes to reg 0x98
Data: []
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x98, 3)
Message: i2c_0 read 3 byte(s) from reg 0x98 : [0x2f, 0x30, 0x31]
Data: [47, 48, 49]
Result: Success
Command: i2c_write_regs(i2c_0, 0x55, 0x98, 0x00, [0x00, 0x01, 0x02])
Message: i2c_0 wrote 3 bytes to reg 0x98
Data: []
Result: Success
Command: i2c_read_regs(i2c_0, 0x55, 0x98, 3)
Message: i2c_0 read 3 byte(s) from reg 0x98 : [0x00, 0x01, 0x02]
Data: [0, 1, 2]
Result: Success
Command: i2c_write_regs(i2c_0, 0x51, 0x98, 0x00, [0x00])
Message: EIO [5]
Data: []
Result: Error
Command: i2c_write_byte(i2c_0, 0x55, 0x00, [0x99])
Message: i2c_0 wrote 1 byte to the bus
Data: []
Result: Success
Command: i2c_read_byte(i2c_0, 0x55, 0x00)
Message: i2c_0 read 1 byte(s) : [0x01]
Data: [1]
Result: Success
Command: i2c_write_byte(i2c_0, 0x55, 0x00, [0x98])
Message: i2c_0 wrote 1 byte to the bus
Data: []
Result: Success
Command: i2c_read_byte(i2c_0, 0x55, 0x00)
Message: i2c_0 read 1 byte(s) : [0x00]
Data: [0]
Result: Success
Command: i2c_write_byte(i2c_0, 0x50, 0x00, [0x00])
Message: EIO [5]
Data: []
Result: Error
Command: i2c_write_bytes(i2c_0, 0x55, 0x00, [0x99])
Message: i2c_0 wrote 1 bytes
Data: []
Result: Success
Command: i2c_read_byte(i2c_0, 0x55, 0x00)
Message: i2c_0 read 1 byte(s) : [0x01]
Data: [1]
Result: Success
Command: i2c_write_bytes(i2c_0, 0x55, 0x00, [0x98, 0x32])
Message: i2c_0 wrote 2 bytes
Data: []
Result: Success
Command: i2c_read_byte(i2c_0, 0x55, 0x00)
Message: i2c_0 read 1 byte(s) : [0x32]
Data: [50]
Result: Success
Command: i2c_write_bytes(i2c_0, 0x55, 0x00, [0x99, 0x33, 0x34])
Message: i2c_0 wrote 3 bytes
Data: []
Result: Success
Command: i2c_read_bytes(i2c_0, 0x55, 2, 0x00)
Message: i2c_0 read 2 byte(s) : [0x33, 0x34]
Data: [51, 52]
Result: Success
Command: i2c_write_bytes(i2c_0, 0x55, 0x00, [0x98, 0x00, 0x01, 0x02])
Message: i2c_0 wrote 4 bytes
Data: []
Result: Success
Command: i2c_read_bytes(i2c_0, 0x55, 3, 0x00)
Message: i2c_0 read 3 byte(s) : [0x00, 0x01, 0x02]
Data: [0, 1, 2]
Result: Success
Command: i2c_write_bytes(i2c_0, 0x51, 0x00, [0x2f, 0x30, 0x31])
Message: EIO [5]
Data: []
Result: Error
Command: i2c_release(i2c_0)
Message: i2c_0 released
Data: []
Result: Success
================================================================================
Name: read flag test
Desc: Tests the read flag functionality
Result: PASS
Notes: Not a comprehesive test but tests a proper frame
--------------------------------------------------------------------------------
Command:
Message: i2c_0 assigned as master
Data: []
Result: Success
Command: i2c_acquire(i2c_0)
Message: i2c_0 acquired
Data: []
Result: Success
Command: i2c_read_reg(i2c_0, 0x55, 0x98)
Message: i2c_0 read 1 byte(s) from reg 0x98 : [0x00]
Data: [0]
Result: Success
Command: i2c_read_bytes(i2c_0, 0x55, 1, 0x04)
Message: i2c_0 read 1 byte(s) : [0x00]
Data: [0]
Result: Success
Command: i2c_read_bytes(i2c_0, 0x55, 1, 0x0c)
Message: i2c_0 read 1 byte(s) : [0x01]
Data: [1]
Result: Success
Command: i2c_read_bytes(i2c_0, 0x55, 1, 0x08)
Message: i2c_0 read 1 byte(s) : [0x02]
Data: [2]
Result: Success
Command: i2c_release(i2c_0)
Message: i2c_0 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 flag test
Result: PASS**
* Test altered to ensure successful write before read
** Failure case of sending no start reads were successful (frame issue)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment