MSP 432 MCUs Training Part 8 Software MSPWare

  • Slides: 10
Download presentation
MSP 432™ MCUs Training Part 8: Software MSPWare Driver. Lib CMSIS 1

MSP 432™ MCUs Training Part 8: Software MSPWare Driver. Lib CMSIS 1

It’s all in MSPWare MSP 432 Entry !!!New!!! Training MSP 432 Driver. Lib 2

It’s all in MSPWare MSP 432 Entry !!!New!!! Training MSP 432 Driver. Lib 2

Software | MSP Register-Level • Traditional MSP register-level access code fully supported • Header

Software | MSP Register-Level • Traditional MSP register-level access code fully supported • Header files provide complete register & bit definitions • Complete portability for common peripherals across 16 & 32 -bit platforms • 100+ code examples for MSP 430 -shared & new MSP 432 peripherals c code example WDTCTL = WDTPW | WDTHOLD; // P 5 SEL 1 |= BIT 4; // P 5 SEL 0 |= BIT 4; __enable_interrupt(); // SCS_NVIC_ISER 0 = INT_ADC 14_BIT; // ADC 14 CTL 0 = ADC 14 SHT 0_2 | ADC 14 SHP | ADC 14 CTL 1 = ADC 14 RES_2 ADC 14 MCTL 0 |= ADC 14 INCH_1; // ADC 14 IER 0 |= ADC 14 IE 0; // SCS_SCR &= ~SCS_SCR_SLEEPONEXIT; // Stop WDT Configure P 5. 4 for ADC MSP 432: Enable master interrupt MSP 432: Enable ADC 14 interrupt ADC 14 ON A 1 ADC input select; Enable conv. interrupt MSP 432: Wake up on exit from ISR 3

Software | Driver Library GPIO_set. As. Peripheral. Module. Function. Output. Pin(PARAMETERS); Timer_generate. PWM(PARAMETERS) P

Software | Driver Library GPIO_set. As. Peripheral. Module. Function. Output. Pin(PARAMETERS); Timer_generate. PWM(PARAMETERS) P 2 DIR |= 0 x 04; Driver TA 1 CCTL 1 = OUTMOD_7; Library P 2 SEL |= 0 x 04; Traditional C code TA 1 CCR 1 = 384; TA 1 CCR 0 = 511; TA 1 CTL = TASSEL_1 | MC_1 | TACLR; 00101010 • Driver Library offers easy-to-understand functions • No more cryptic registers to configure • MSP 430/432 shared peripherals also share Driver. Lib APIs reduce porting effort 10010010 Low level 01010100 programming 10010010 11001010

MSP 432 Driver. Lib | ROM & Source MSP 432 Driver. Lib available as

MSP 432 Driver. Lib | ROM & Source MSP 432 Driver. Lib available as source • Always the latest, most updated version • Library available as BSD source = industry standard • Flexibility for users to further customize/enhance MSP 432 Driver. Lib implemented & tested in ROM • ROM has lower current consumption • No wait-state [ even @ max speed = 48 MHz] • Frees up flash space (25 k. B) for application code • Fully validated & robust ROM code: no future major changes 5

MSP 432 Driver. Lib | ROM & Source MAP file: method to ensure ROM

MSP 432 Driver. Lib | ROM & Source MAP file: method to ensure ROM API is always used UNLESS there’s an update (fix/enhancement ) or APIs only available in Source ROM MAP Source API 1 API 2 API 3 . . API n+1 API n+2 API n+3 API n+1 API n+2 API n+3 Legend: Bug fix Feature Enhancement New API 6

MSP 432 Driver. Lib | Calling Convention MSP 432 Driver. Lib source (Flash) •

MSP 432 Driver. Lib | Calling Convention MSP 432 Driver. Lib source (Flash) • Include driverlib source folder in your project • API Call: Timer. A_generate. PWM(param 1, param 2, etc. ); MSP 432 Driver. Lib ROM • Use “rom. h” header file • API Call: ROM_Timer. A_generate. PWM(param 1, param 2, etc. ); Patches new features or bug fixes: • Use “rom_map. h” header file • API Call: MAP_Timer. A_generate. PWM(param 1, param 2, etc. ); 7

Software | CMSIS • Cortex Microcontroller Software Interface Standard (CMSIS) • Standardized hardware abstraction

Software | CMSIS • Cortex Microcontroller Software Interface Standard (CMSIS) • Standardized hardware abstraction layer for the Cortex-M 4 processor series 8

Software | CMSIS MSP definition #define WDTCTL  (HWREG 16(0 x 4000480 C)) /*

Software | CMSIS MSP definition #define WDTCTL (HWREG 16(0 x 4000480 C)) /* WDTCTL Control Bits */ #define WDTIS 0 (0 x 0001) #define WDTIS 1 (0 x 0002) #define WDTIS 2 (0 x 0004) #define WDTCNTCL (0 x 0008) #define WDTTMSEL (0 x 0010) #define WDTSSEL 0 (0 x 0020) #define WDTSSEL 1 (0 x 0040) #define WDTHOLD (0 x 0080) #define WDTPW (WDTPW_VAL) #define __WDT_BASE__ (0 x 40004800) CMSIS definition typedef struct { uint 8_t RESERVED 0[12]; union { /* WDT_CTL Register */ __IO uint 16_t reg; struct { /* WDT_CTL Bits */ __IO uint 16_t IS : 3; __O uint 16_t CNTCL : 1; __IO uint 16_t TMSEL : 1; __IO uint 16_t SSEL : 2; __IO uint 16_t HOLD : 1; __IO uint 16_t PW : 8; } bit; } CTL; } WDT_Type; #define WDT ((WDT_Type *) __WDT_BASE__) 9

Software | Libraries & RTOS • High-level libraries – Graphics Library – Capacitive Touch

Software | Libraries & RTOS • High-level libraries – Graphics Library – Capacitive Touch Library – IQMath • Application-specific libraries – – NFCLink & TRF 7970 A NFC Library CC 3100 Wi. Fi Simple. Link BLE & Bluetooth And more … • RTOS – – TI-RTOS Free. RTOS Micrium µC/OS And more…. 10