Skip to content

Viliuks/STM32AS5048A

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple AS5048A SPI library for the STM32G0

This is a simple AS5048A High-Resolution Position Sensor library written in C. It uses STM32G0 HAL to communicate with the sensor via SPI, can be modified to work with other HAL libraries.

When using this library please change the CS pins in the header file.

Example usage

SPI_HandleTypeDef hspi2;

AS5048A_Init(&hspi2);
float angleRads = AS5048A_GetAngle();
float angleDeg = AS5048A_GetAngleDeg();

SPI settings

Setting Value
Frame Format Motorola
Data Size 16 bits
Prescaler 32 (2.0MBits/s baud)
CPOL Low
CPHA 2 Edge
CRC Disabled

About

STM32G0 implementation of the AS5048A sensor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages