Fujitsu SK-AMAPOLLO-BASE-V11 Kullanıcı Kılavuzu - Sayfa 24

Anakart Fujitsu SK-AMAPOLLO-BASE-V11 için çevrimiçi göz atın veya pdf Kullanıcı Kılavuzu indirin. Fujitsu SK-AMAPOLLO-BASE-V11 46 sayfaları. Ambiq micro apollo 1 / 2 evaluation board

Fujitsu SK-AMAPOLLO-BASE-V11 Kullanıcı Kılavuzu
Add apolloiom.c to your project and include apolloiom.h and skamapollobase.h in you C-file.
Following code gives an example how to use the IOM:
#incude "mcu.h"
#include "skamapollobase.h"
#include "apolloiom.h"
#include "apollogpio.h"
const stc_apolloiom_config_t stcIomConfig = {
IomInterfaceModeSpi, //use SPI mode
15000000UL,
FALSE,
FALSE,
0,
60
};
int main(void)
{
uint8_t b = 0xAA;
ApolloIOM_Configure(IOMSTR1,&stcIomConfig);
ApolloIOM_Enable(IOMSTR1);
ApolloGpio_GpioOutputEnable(ARDUINO_SS,TRUE);
CLEAR_GPIO(ARDUINO_SS); //set chipselect
//send one byte
ApolloIom_SpiWriteByte(IOMSTR1, 0, b, AM_HAL_IOM_RAW);
//read one byte
b = ApolloIom_SpiReadByte(IOMSTR1, 0, AM_HAL_IOM_RAW);
SET_GPIO(ARDUINO_SS); //clear chipselect
while(1)
{
__NOP();
}
}
EEU-UG-2017120001-10
FEEU Ultra-Low-Power Apollo Evaluation Kit Platform
Chapter 2 Using the Hardware
//frequency
//SPHA setting
//SPOL setting
//WriteThreshold
//ReadThreshold
- 24 -
© Fujitsu Electronics Europe GmbH