So how you connect i2c ...using asf4...there is very less api for writing
ASF4 and I2C
Author
Message
Last Edited: Thu. Jun 10, 2021 - 01:05 PM
It would help if you mention what processor your target is.
JIm
Level: 10k+ Postman
Joined: Fri. Jul 1, 2005
Posts: 25563 View posts
Location: Basingstoke, Hampshire, UK
Don't you just go to https://start.atmel.com/ and take it from there - it should all be "intuitive" ...
Last Edited: Thu. Jun 10, 2021 - 01:31 PM
proc SAMD21 -- asf4 -- sync or async(select in atmelstart)
i2c master does not want to transmit data, waiting for confirmation from the slave. Makes a pulse in the bus and that's it.
------------INIT
i2c_m_sync_get_io_descriptor(&I2C_0, &I2DESC); i2c_m_sync_enable(&I2C_0); i2c_m_sync_set_slaveaddr(&I2C_0, 0x49, I2C_M_SEVEN);
---main
delay_ms(100); err=io_write(I2C_0, (uint8_t *)"Hello World!", 12); or err=i2c_m_sync_cmd_write(&I2C_0, (uint8_t)0x00, &data[0] , 12)
debug err= -4 what to do next???
Last Edited: Thu. Jun 10, 2021 - 01:59 PM