How to change LIS3DSH resolution
Hello everyone,
I am new to STM32 and to Keil. I would like to change the accelerometer resolution from 2G to 16G, but due to my inexperience, I don't know how. My teacher didn't help my and said that I need to figure it out by myself, but I really don't know what to do. Can somebody help me what to do a what to change?
Here is code that teacher provided:
I will be very thankful is someone can help me.
//-----------------------------NASTAVENI AKCELEROMETRU ( Setting)-------------------------
//Defaultne je rozlišení +-2g
//SPI Komunikace
HAL_GPIO_WritePin(GPIOE, ACC_CS_Pin, GPIO_PIN_RESET); //Chip select
adresaRegistru = 0x20; //CTRL_REG4
HAL_SPI_Transmit(&hspi1, &adresaRegistru, 1, 50);
data = 0x37; //povol osy, 12,5Hz na vystupu
HAL_SPI_Transmit(&hspi1, &data, 1, 50);
HAL_GPIO_WritePin(GPIOE, ACC_CS_Pin, GPIO_PIN_SET); //Chip select
HAL_Delay(20);