ICM-20948 on SAMR34

By vialma7hotmailcom , 22 January 2020

Hello.

I'm trying to use my ICM-20948 on a SAMR34 Xplained Pro board using Atmel Studio, but I don't know how to do it properly. I tried some examples from the developers corner but none of them worked with this board, or at least I couldn't make them work. I've already developed my own I2C libraries, so I only want to know how to access the registers where the sensor's data is located to read it. I searched for a way to do it but I didn't find much information. Also, I couldn't find any libraries for Atmel to get an idea about how it works (I already tested it on Arduino without any problem, but I don't know how to export that process into Atmel/SAMR34), and I don't really understand ASF auto generated code.

Is there any way to access the registers using a route as if you were accessing, for example, CTRLA register on I2C configuration (I mean, using a route like this one: SERCOM1->I2CM.CTRLA.bit.MODE)? Or how can I read the data directly from the registers? Because I saw many registers on the ICM-20948 datasheet but I don't know how to access them.

Maybe this sounds like a simple question, but I'm fairly new to this software and hardware and I've been stuck here for weeks.

Thanks in advance.

phpbb Topic ID
38086