From 8a613ad2a97eee783b1561797df305c185cafbd9 Mon Sep 17 00:00:00 2001 From: Stephen Date: Tue, 6 Apr 2021 20:46:33 -0400 Subject: [PATCH] Added documentation for boost --- .../html/_9_hardware_8markdown.html | 2 +- .../html/_9_resources_8markdown.html | 105 +++ .../html/_9_software_8markdown.html | 2 +- Generated Documentation/html/_board_8h.html | 107 +++ .../html/_board_8h_source.html | 332 +++++++ .../html/_design_01_choices_8markdown.html | 2 +- .../_device_01_specifications_8markdown.html | 2 +- .../_documentation_01_guide_8markdown.html | 2 +- ...xx_2crc_2crc__ex1__build_signature_8c.html | 159 ++++ ..._6xx_2crc_2crc__ex1__build_signature_8c.js | 4 + ..._2crc__ex1__build_signature_8c_source.html | 206 +++++ ...6xx_2dma_2dma__ex1__repeated_block_8c.html | 151 ++++ ...__6xx_2dma_2dma__ex1__repeated_block_8c.js | 4 + ...a_2dma__ex1__repeated_block_8c_source.html | 220 +++++ ...a__spi_2eusci__a__spi__ex1__master_8c.html | 222 +++++ ...__a__spi_2eusci__a__spi__ex1__master_8c.js | 7 + ...2eusci__a__spi__ex1__master_8c_source.html | 239 +++++ ..._a__spi_2eusci__a__spi__ex1__slave_8c.html | 224 +++++ ...i__a__spi_2eusci__a__spi__ex1__slave_8c.js | 7 + ..._2eusci__a__spi__ex1__slave_8c_source.html | 220 +++++ ...i__a__uart__ex1__loopback_advanced_8c.html | 265 ++++++ ...sci__a__uart__ex1__loopback_advanced_8c.js | 9 + ...art__ex1__loopback_advanced_8c_source.html | 237 +++++ ...i__b__i2c__ex1__master_rx_multiple_8c.html | 229 +++++ ...sci__b__i2c__ex1__master_rx_multiple_8c.js | 8 + ...2c__ex1__master_rx_multiple_8c_source.html | 318 +++++++ ...ci__b__i2c__ex1__slave_tx_multiple_8c.html | 224 +++++ ...usci__b__i2c__ex1__slave_tx_multiple_8c.js | 7 + ...i2c__ex1__slave_tx_multiple_8c_source.html | 249 ++++++ ...sci__b__i2c__ex2__master_rx_single_8c.html | 206 +++++ ...eusci__b__i2c__ex2__master_rx_single_8c.js | 6 + ..._i2c__ex2__master_rx_single_8c_source.html | 214 +++++ ...usci__b__i2c__ex2__slave_tx_single_8c.html | 223 +++++ ...2eusci__b__i2c__ex2__slave_tx_single_8c.js | 7 + ...__i2c__ex2__slave_tx_single_8c_source.html | 253 ++++++ ...i__b__i2c__ex3__master_tx_multiple_8c.html | 251 ++++++ ...sci__b__i2c__ex3__master_tx_multiple_8c.js | 8 + ...2c__ex3__master_tx_multiple_8c_source.html | 274 ++++++ ...ci__b__i2c__ex3__slave_rx_multiple_8c.html | 211 +++++ ...usci__b__i2c__ex3__slave_rx_multiple_8c.js | 7 + ...i2c__ex3__slave_rx_multiple_8c_source.html | 271 ++++++ ...sci__b__i2c__ex4__master_tx_single_8c.html | 207 +++++ ...eusci__b__i2c__ex4__master_tx_single_8c.js | 6 + ..._i2c__ex4__master_tx_single_8c_source.html | 220 +++++ ...usci__b__i2c__ex4__slave_rx_single_8c.html | 232 +++++ ...2eusci__b__i2c__ex4__slave_rx_single_8c.js | 7 + ...__i2c__ex4__slave_rx_single_8c_source.html | 241 +++++ ...b__i2c__ex5__master_multiple_slave_8c.html | 248 ++++++ ...__b__i2c__ex5__master_multiple_slave_8c.js | 9 + ..._ex5__master_multiple_slave_8c_source.html | 311 +++++++ ..._b__i2c__ex5__slave_multiple_slave_8c.html | 248 ++++++ ...i__b__i2c__ex5__slave_multiple_slave_8c.js | 9 + ...__ex5__slave_multiple_slave_8c_source.html | 283 ++++++ ...b__spi_2eusci__b__spi__ex1__master_8c.html | 222 +++++ ...__b__spi_2eusci__b__spi__ex1__master_8c.js | 7 + ...2eusci__b__spi__ex1__master_8c_source.html | 240 +++++ ..._b__spi_2eusci__b__spi__ex1__slave_8c.html | 223 +++++ ...i__b__spi_2eusci__b__spi__ex1__slave_8c.js | 7 + ..._2eusci__b__spi__ex1__slave_8c_source.html | 219 +++++ ...x__6xx_2gpio_2gpio__ex1__output_hi_8c.html | 139 +++ ...5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.js | 4 + ...2gpio_2gpio__ex1__output_hi_8c_source.html | 197 +++++ ...xx_2gpio_2gpio__ex2__input_capture_8c.html | 161 ++++ ..._6xx_2gpio_2gpio__ex2__input_capture_8c.js | 5 + ...o_2gpio__ex2__input_capture_8c_source.html | 241 +++++ ...xx_2gpio_2gpio__ex3__software_poll_8c.html | 152 ++++ ..._6xx_2gpio_2gpio__ex3__software_poll_8c.js | 4 + ...o_2gpio__ex3__software_poll_8c_source.html | 183 ++++ ...x_2gpio_2gpio__ex4__write_to_port1_8c.html | 154 ++++ ...6xx_2gpio_2gpio__ex4__write_to_port1_8c.js | 4 + ..._2gpio__ex4__write_to_port1_8c_source.html | 170 ++++ ...mpy32__ex10__32bit_signed_multiply_8c.html | 157 ++++ ..._2mpy32__ex10__32bit_signed_multiply_8c.js | 4 + ...ex10__32bit_signed_multiply_8c_source.html | 173 ++++ ..._ex11__32bit_signed_multiply_accum_8c.html | 157 ++++ ...2__ex11__32bit_signed_multiply_accum_8c.js | 4 + ...32bit_signed_multiply_accum_8c_source.html | 181 ++++ ...x12__32bit_unsigned_multiply_accum_8c.html | 157 ++++ ..._ex12__32bit_unsigned_multiply_accum_8c.js | 4 + ...bit_unsigned_multiply_accum_8c_source.html | 180 ++++ ...2mpy32__ex13__saturation_underflow_8c.html | 222 +++++ ...2_2mpy32__ex13__saturation_underflow_8c.js | 7 + ..._ex13__saturation_underflow_8c_source.html | 204 +++++ ..._2mpy32__ex14__saturation_overflow_8c.html | 222 +++++ ...32_2mpy32__ex14__saturation_overflow_8c.js | 7 + ...__ex14__saturation_overflow_8c_source.html | 210 +++++ ...2mpy32_2mpy32__ex15__fraction_mode_8c.html | 202 +++++ ...x_2mpy32_2mpy32__ex15__fraction_mode_8c.js | 6 + ...2mpy32__ex15__fraction_mode_8c_source.html | 181 ++++ ...py32__ex1__16bit_unsigned_multiply_8c.html | 157 ++++ ...2mpy32__ex1__16bit_unsigned_multiply_8c.js | 4 + ...x1__16bit_unsigned_multiply_8c_source.html | 164 ++++ ...mpy32__ex2__8bit_unsigned_multiply_8c.html | 157 ++++ ..._2mpy32__ex2__8bit_unsigned_multiply_8c.js | 4 + ...ex2__8bit_unsigned_multiply_8c_source.html | 164 ++++ ...2mpy32__ex3__16bit_signed_multiply_8c.html | 222 +++++ ...2_2mpy32__ex3__16bit_signed_multiply_8c.js | 7 + ..._ex3__16bit_signed_multiply_8c_source.html | 174 ++++ ..._2mpy32__ex4__8bit_signed_multiply_8c.html | 157 ++++ ...32_2mpy32__ex4__8bit_signed_multiply_8c.js | 4 + ...__ex4__8bit_signed_multiply_8c_source.html | 170 ++++ ...ex5__16bit_unsigned_multiply_accum_8c.html | 157 ++++ ...__ex5__16bit_unsigned_multiply_accum_8c.js | 4 + ...bit_unsigned_multiply_accum_8c_source.html | 173 ++++ ..._ex6__8bit_unsigned_multiply_accum_8c.html | 156 ++++ ...2__ex6__8bit_unsigned_multiply_accum_8c.js | 4 + ...bit_unsigned_multiply_accum_8c_source.html | 173 ++++ ...__ex7__16bit_signed_multiply_accum_8c.html | 157 ++++ ...32__ex7__16bit_signed_multiply_accum_8c.js | 4 + ...16bit_signed_multiply_accum_8c_source.html | 173 ++++ ...2__ex8__8bit_signed_multiply_accum_8c.html | 157 ++++ ...y32__ex8__8bit_signed_multiply_accum_8c.js | 4 + ..._8bit_signed_multiply_accum_8c_source.html | 180 ++++ ...py32__ex9__32bit_unsigned_multiply_8c.html | 182 ++++ ...2mpy32__ex9__32bit_unsigned_multiply_8c.js | 5 + ...x9__32bit_unsigned_multiply_8c_source.html | 177 ++++ ...2rtc__c_2rtc__c__ex1__calendarmode_8c.html | 202 +++++ ...x_2rtc__c_2rtc__c__ex1__calendarmode_8c.js | 6 + ..._2rtc__c__ex1__calendarmode_8c_source.html | 262 ++++++ ...imer__a_2timer__a__ex1__pwm_single_8c.html | 198 +++++ ...2timer__a_2timer__a__ex1__pwm_single_8c.js | 6 + ..._2timer__a__ex1__pwm_single_8c_source.html | 178 ++++ ...de_operation_with_c_c_r0_interrupt_8c.html | 204 +++++ ...mode_operation_with_c_c_r0_interrupt_8c.js | 6 + ...ation_with_c_c_r0_interrupt_8c_source.html | 221 +++++ ...e_operation_with_t_a_i_e_interrupt_8c.html | 179 ++++ ...ode_operation_with_t_a_i_e_interrupt_8c.js | 5 + ...tion_with_t_a_i_e_interrupt_8c_source.html | 210 +++++ ...imer__a__ex4__pwm_multiple_up_down_8c.html | 216 +++++ ...2timer__a__ex4__pwm_multiple_up_down_8c.js | 7 + ...__ex4__pwm_multiple_up_down_8c_source.html | 203 +++++ ..._a_2timer__a__ex5__pwm_multiple_up_8c.html | 215 +++++ ...r__a_2timer__a__ex5__pwm_multiple_up_8c.js | 7 + ...er__a__ex5__pwm_multiple_up_8c_source.html | 202 +++++ ...er__a__ex6__up_down_mode_operation_8c.html | 197 +++++ ...imer__a__ex6__up_down_mode_operation_8c.js | 6 + ...ex6__up_down_mode_operation_8c_source.html | 194 ++++ ...er__b__ex1__continuous_mode_c_c_r0_8c.html | 197 +++++ ...imer__b__ex1__continuous_mode_c_c_r0_8c.js | 6 + ...ex1__continuous_mode_c_c_r0_8c_source.html | 212 +++++ ...__b_2timer__b__ex2__overflow_i_s_r_8c.html | 172 ++++ ...er__b_2timer__b__ex2__overflow_i_s_r_8c.js | 5 + ...mer__b__ex2__overflow_i_s_r_8c_source.html | 204 +++++ ..._6xx_2timer__b_2timer__b__ex3__pwm_8c.html | 137 +++ ...x__6xx_2timer__b_2timer__b__ex3__pwm_8c.js | 4 + ...imer__b_2timer__b__ex3__pwm_8c_source.html | 212 +++++ ..._2timer__b__ex4__up_mode_operation_8c.html | 202 +++++ ..._b_2timer__b__ex4__up_mode_operation_8c.js | 6 + ...__b__ex4__up_mode_operation_8c_source.html | 200 +++++ ...er__b_2timer__b__ex5__single_p_w_m_8c.html | 198 +++++ ...imer__b_2timer__b__ex5__single_p_w_m_8c.js | 6 + ...timer__b__ex5__single_p_w_m_8c_source.html | 177 ++++ ...xx_2tlv_2tlv__ex1__get_device_type_8c.html | 149 ++++ ..._6xx_2tlv_2tlv__ex1__get_device_type_8c.js | 4 + ..._2tlv__ex1__get_device_type_8c_source.html | 152 ++++ ..._2tlv__ex2__read_t_l_v_descriptors_8c.html | 837 ++++++++++++++++++ ...lv_2tlv__ex2__read_t_l_v_descriptors_8c.js | 37 + ...ex2__read_t_l_v_descriptors_8c_source.html | 326 +++++++ ...v_2tlv__ex3__calibrate_temp_sensor_8c.html | 352 ++++++++ ...tlv_2tlv__ex3__calibrate_temp_sensor_8c.js | 13 + ..._ex3__calibrate_temp_sensor_8c_source.html | 322 +++++++ ...a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html | 181 ++++ ...__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js | 5 + ..._a__ex1__interval_s_m_c_l_k_8c_source.html | 185 ++++ ...__a_2wdt__a__ex2__interval_a_c_l_k_8c.html | 181 ++++ ...dt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js | 5 + ...t__a__ex2__interval_a_c_l_k_8c_source.html | 185 ++++ ...__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html | 159 ++++ ...dt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js | 4 + ...t__a__ex3__watchdog_a_c_l_k_8c_source.html | 172 ++++ ...xx_2crc_2crc__ex1__build_signature_8c.html | 159 ++++ ..._4xx_2crc_2crc__ex1__build_signature_8c.js | 4 + ..._2crc__ex1__build_signature_8c_source.html | 206 +++++ ...a__spi_2eusci__a__spi__ex1__master_8c.html | 220 +++++ ...__a__spi_2eusci__a__spi__ex1__master_8c.js | 7 + ...2eusci__a__spi__ex1__master_8c_source.html | 270 ++++++ ..._a__spi_2eusci__a__spi__ex1__slave_8c.html | 220 +++++ ...i__a__spi_2eusci__a__spi__ex1__slave_8c.js | 7 + ..._2eusci__a__spi__ex1__slave_8c_source.html | 245 +++++ ...i__a__uart__ex1__loopback_advanced_8c.html | 260 ++++++ ...sci__a__uart__ex1__loopback_advanced_8c.js | 9 + ...art__ex1__loopback_advanced_8c_source.html | 255 ++++++ ...i__b__i2c__ex1__master_rx_multiple_8c.html | 283 ++++++ ...sci__b__i2c__ex1__master_rx_multiple_8c.js | 10 + ...2c__ex1__master_rx_multiple_8c_source.html | 354 ++++++++ ...ci__b__i2c__ex1__slave_tx_multiple_8c.html | 220 +++++ ...usci__b__i2c__ex1__slave_tx_multiple_8c.js | 7 + ...i2c__ex1__slave_tx_multiple_8c_source.html | 259 ++++++ ...sci__b__i2c__ex2__master_rx_single_8c.html | 241 +++++ ...eusci__b__i2c__ex2__master_rx_single_8c.js | 8 + ..._i2c__ex2__master_rx_single_8c_source.html | 272 ++++++ ...usci__b__i2c__ex2__slave_tx_single_8c.html | 228 +++++ ...2eusci__b__i2c__ex2__slave_tx_single_8c.js | 7 + ...__i2c__ex2__slave_tx_single_8c_source.html | 263 ++++++ ...i__b__i2c__ex3__master_tx_multiple_8c.html | 284 ++++++ ...sci__b__i2c__ex3__master_tx_multiple_8c.js | 10 + ...2c__ex3__master_tx_multiple_8c_source.html | 332 +++++++ ...ci__b__i2c__ex3__slave_rx_multiple_8c.html | 226 +++++ ...usci__b__i2c__ex3__slave_rx_multiple_8c.js | 7 + ...i2c__ex3__slave_rx_multiple_8c_source.html | 273 ++++++ ...sci__b__i2c__ex4__master_tx_single_8c.html | 242 +++++ ...eusci__b__i2c__ex4__master_tx_single_8c.js | 8 + ..._i2c__ex4__master_tx_single_8c_source.html | 261 ++++++ ...usci__b__i2c__ex4__slave_rx_single_8c.html | 230 +++++ ...2eusci__b__i2c__ex4__slave_rx_single_8c.js | 7 + ...__i2c__ex4__slave_rx_single_8c_source.html | 251 ++++++ ...b__i2c__ex5__master_multiple_slave_8c.html | 282 ++++++ ...__b__i2c__ex5__master_multiple_slave_8c.js | 11 + ..._ex5__master_multiple_slave_8c_source.html | 343 +++++++ ..._b__i2c__ex5__slave_multiple_slave_8c.html | 241 +++++ ...i__b__i2c__ex5__slave_multiple_slave_8c.js | 9 + ...__ex5__slave_multiple_slave_8c_source.html | 285 ++++++ ...b__spi_2eusci__b__spi__ex1__master_8c.html | 220 +++++ ...__b__spi_2eusci__b__spi__ex1__master_8c.js | 7 + ...2eusci__b__spi__ex1__master_8c_source.html | 294 ++++++ ..._b__spi_2eusci__b__spi__ex1__slave_8c.html | 220 +++++ ...i__b__spi_2eusci__b__spi__ex1__slave_8c.js | 7 + ..._2eusci__b__spi__ex1__slave_8c_source.html | 232 +++++ ..._4xx_2framctl_2framctl__ex1__write_8c.html | 173 ++++ ...x__4xx_2framctl_2framctl__ex1__write_8c.js | 5 + ...ramctl_2framctl__ex1__write_8c_source.html | 191 ++++ ...x__4xx_2gpio_2gpio__ex1__output_hi_8c.html | 139 +++ ...2xx__4xx_2gpio_2gpio__ex1__output_hi_8c.js | 4 + ...2gpio_2gpio__ex1__output_hi_8c_source.html | 199 +++++ ...xx_2gpio_2gpio__ex2__input_capture_8c.html | 165 ++++ ..._4xx_2gpio_2gpio__ex2__input_capture_8c.js | 5 + ...o_2gpio__ex2__input_capture_8c_source.html | 257 ++++++ ...xx_2gpio_2gpio__ex3__software_poll_8c.html | 154 ++++ ..._4xx_2gpio_2gpio__ex3__software_poll_8c.js | 4 + ...o_2gpio__ex3__software_poll_8c_source.html | 190 ++++ ...x_2gpio_2gpio__ex4__write_to_port1_8c.html | 154 ++++ ...4xx_2gpio_2gpio__ex4__write_to_port1_8c.js | 4 + ..._2gpio__ex4__write_to_port1_8c_source.html | 172 ++++ ...mpy32__ex10__32bit_signed_multiply_8c.html | 157 ++++ ..._2mpy32__ex10__32bit_signed_multiply_8c.js | 4 + ...ex10__32bit_signed_multiply_8c_source.html | 173 ++++ ..._ex11__32bit_signed_multiply_accum_8c.html | 157 ++++ ...2__ex11__32bit_signed_multiply_accum_8c.js | 4 + ...32bit_signed_multiply_accum_8c_source.html | 181 ++++ ...x12__32bit_unsigned_multiply_accum_8c.html | 157 ++++ ..._ex12__32bit_unsigned_multiply_accum_8c.js | 4 + ...bit_unsigned_multiply_accum_8c_source.html | 180 ++++ ...2mpy32__ex13__saturation_underflow_8c.html | 216 +++++ ...2_2mpy32__ex13__saturation_underflow_8c.js | 7 + ..._ex13__saturation_underflow_8c_source.html | 204 +++++ ..._2mpy32__ex14__saturation_overflow_8c.html | 216 +++++ ...32_2mpy32__ex14__saturation_overflow_8c.js | 7 + ...__ex14__saturation_overflow_8c_source.html | 210 +++++ ...2mpy32_2mpy32__ex15__fraction_mode_8c.html | 198 +++++ ...x_2mpy32_2mpy32__ex15__fraction_mode_8c.js | 6 + ...2mpy32__ex15__fraction_mode_8c_source.html | 181 ++++ ...py32__ex1__16bit_unsigned_multiply_8c.html | 157 ++++ ...2mpy32__ex1__16bit_unsigned_multiply_8c.js | 4 + ...x1__16bit_unsigned_multiply_8c_source.html | 164 ++++ ...mpy32__ex2__8bit_unsigned_multiply_8c.html | 157 ++++ ..._2mpy32__ex2__8bit_unsigned_multiply_8c.js | 4 + ...ex2__8bit_unsigned_multiply_8c_source.html | 164 ++++ ...2mpy32__ex3__16bit_signed_multiply_8c.html | 216 +++++ ...2_2mpy32__ex3__16bit_signed_multiply_8c.js | 7 + ..._ex3__16bit_signed_multiply_8c_source.html | 174 ++++ ..._2mpy32__ex4__8bit_signed_multiply_8c.html | 157 ++++ ...32_2mpy32__ex4__8bit_signed_multiply_8c.js | 4 + ...__ex4__8bit_signed_multiply_8c_source.html | 170 ++++ ...ex5__16bit_unsigned_multiply_accum_8c.html | 157 ++++ ...__ex5__16bit_unsigned_multiply_accum_8c.js | 4 + ...bit_unsigned_multiply_accum_8c_source.html | 173 ++++ ..._ex6__8bit_unsigned_multiply_accum_8c.html | 156 ++++ ...2__ex6__8bit_unsigned_multiply_accum_8c.js | 4 + ...bit_unsigned_multiply_accum_8c_source.html | 173 ++++ ...__ex7__16bit_signed_multiply_accum_8c.html | 157 ++++ ...32__ex7__16bit_signed_multiply_accum_8c.js | 4 + ...16bit_signed_multiply_accum_8c_source.html | 173 ++++ ...2__ex8__8bit_signed_multiply_accum_8c.html | 157 ++++ ...y32__ex8__8bit_signed_multiply_accum_8c.js | 4 + ..._8bit_signed_multiply_accum_8c_source.html | 180 ++++ ...py32__ex9__32bit_unsigned_multiply_8c.html | 180 ++++ ...2mpy32__ex9__32bit_unsigned_multiply_8c.js | 5 + ...x9__32bit_unsigned_multiply_8c_source.html | 177 ++++ ..._4xx_2pmm_2pmm___reset___l_p_mx__5_8c.html | 152 ++++ ...x__4xx_2pmm_2pmm___reset___l_p_mx__5_8c.js | 4 + ...mm_2pmm___reset___l_p_mx__5_8c_source.html | 240 +++++ ...imer__a_2timer__a__ex1__pwm_single_8c.html | 198 +++++ ...2timer__a_2timer__a__ex1__pwm_single_8c.js | 6 + ..._2timer__a__ex1__pwm_single_8c_source.html | 184 ++++ ...de_operation_with_c_c_r0_interrupt_8c.html | 202 +++++ ...mode_operation_with_c_c_r0_interrupt_8c.js | 6 + ...ation_with_c_c_r0_interrupt_8c_source.html | 228 +++++ ...e_operation_with_t_a_i_e_interrupt_8c.html | 179 ++++ ...ode_operation_with_t_a_i_e_interrupt_8c.js | 5 + ...tion_with_t_a_i_e_interrupt_8c_source.html | 215 +++++ ...imer__a__ex4__pwm_multiple_up_down_8c.html | 216 +++++ ...2timer__a__ex4__pwm_multiple_up_down_8c.js | 7 + ...__ex4__pwm_multiple_up_down_8c_source.html | 215 +++++ ..._a_2timer__a__ex5__pwm_multiple_up_8c.html | 215 +++++ ...r__a_2timer__a__ex5__pwm_multiple_up_8c.js | 7 + ...er__a__ex5__pwm_multiple_up_8c_source.html | 210 +++++ ...er__a__ex6__up_down_mode_operation_8c.html | 197 +++++ ...imer__a__ex6__up_down_mode_operation_8c.js | 6 + ...ex6__up_down_mode_operation_8c_source.html | 199 +++++ ...er__b__ex1__continuous_mode_c_c_r0_8c.html | 186 ++++ ...imer__b__ex1__continuous_mode_c_c_r0_8c.js | 6 + ...ex1__continuous_mode_c_c_r0_8c_source.html | 232 +++++ ...__b_2timer__b__ex2__overflow_i_s_r_8c.html | 161 ++++ ...er__b_2timer__b__ex2__overflow_i_s_r_8c.js | 5 + ...mer__b__ex2__overflow_i_s_r_8c_source.html | 224 +++++ ..._4xx_2timer__b_2timer__b__ex3__pwm_8c.html | 139 +++ ...x__4xx_2timer__b_2timer__b__ex3__pwm_8c.js | 4 + ...imer__b_2timer__b__ex3__pwm_8c_source.html | 209 +++++ ..._2timer__b__ex4__up_mode_operation_8c.html | 202 +++++ ..._b_2timer__b__ex4__up_mode_operation_8c.js | 6 + ...__b__ex4__up_mode_operation_8c_source.html | 204 +++++ ...er__b_2timer__b__ex5__single_p_w_m_8c.html | 198 +++++ ...imer__b_2timer__b__ex5__single_p_w_m_8c.js | 6 + ...timer__b__ex5__single_p_w_m_8c_source.html | 182 ++++ ...xx_2tlv_2tlv__ex1__get_device_type_8c.html | 149 ++++ ..._4xx_2tlv_2tlv__ex1__get_device_type_8c.js | 4 + ..._2tlv__ex1__get_device_type_8c_source.html | 152 ++++ ...a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html | 177 ++++ ...__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js | 5 + ..._a__ex1__interval_s_m_c_l_k_8c_source.html | 190 ++++ ...__a_2wdt__a__ex2__interval_a_c_l_k_8c.html | 177 ++++ ...dt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js | 5 + ...t__a__ex2__interval_a_c_l_k_8c_source.html | 190 ++++ ...__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html | 155 ++++ ...dt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js | 4 + ...t__a__ex3__watchdog_a_c_l_k_8c_source.html | 175 ++++ ...xx_2crc_2crc__ex1__build_signature_8c.html | 159 ++++ ...57xx_2crc_2crc__ex1__build_signature_8c.js | 4 + ..._2crc__ex1__build_signature_8c_source.html | 206 +++++ ...f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c.html | 149 ++++ ...0_f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c.js | 4 + ..._2cs_2cs__ex1___d_c_o_setup_8c_source.html | 183 ++++ ...7xx_2dma_2dma__ex1__repeated_block_8c.html | 151 ++++ ...r57xx_2dma_2dma__ex1__repeated_block_8c.js | 4 + ...a_2dma__ex1__repeated_block_8c_source.html | 220 +++++ ...a__spi_2eusci__a__spi__ex1__master_8c.html | 217 +++++ ...__a__spi_2eusci__a__spi__ex1__master_8c.js | 7 + ...2eusci__a__spi__ex1__master_8c_source.html | 300 +++++++ ..._a__spi_2eusci__a__spi__ex1__slave_8c.html | 219 +++++ ...i__a__spi_2eusci__a__spi__ex1__slave_8c.js | 7 + ..._2eusci__a__spi__ex1__slave_8c_source.html | 256 ++++++ ...i__a__uart__ex1__loopback_advanced_8c.html | 259 ++++++ ...sci__a__uart__ex1__loopback_advanced_8c.js | 9 + ...art__ex1__loopback_advanced_8c_source.html | 262 ++++++ ...i__b__i2c__ex1__master_rx_multiple_8c.html | 238 +++++ ...sci__b__i2c__ex1__master_rx_multiple_8c.js | 8 + ...2c__ex1__master_rx_multiple_8c_source.html | 319 +++++++ ...ci__b__i2c__ex1__slave_tx_multiple_8c.html | 228 +++++ ...usci__b__i2c__ex1__slave_tx_multiple_8c.js | 7 + ...i2c__ex1__slave_tx_multiple_8c_source.html | 239 +++++ ...sci__b__i2c__ex2__master_rx_single_8c.html | 204 +++++ ...eusci__b__i2c__ex2__master_rx_single_8c.js | 6 + ..._i2c__ex2__master_rx_single_8c_source.html | 232 +++++ ...usci__b__i2c__ex2__slave_tx_single_8c.html | 227 +++++ ...2eusci__b__i2c__ex2__slave_tx_single_8c.js | 7 + ...__i2c__ex2__slave_tx_single_8c_source.html | 245 +++++ ...i__b__i2c__ex3__master_tx_multiple_8c.html | 247 ++++++ ...sci__b__i2c__ex3__master_tx_multiple_8c.js | 8 + ...2c__ex3__master_tx_multiple_8c_source.html | 286 ++++++ ...ci__b__i2c__ex3__slave_rx_multiple_8c.html | 209 +++++ ...usci__b__i2c__ex3__slave_rx_multiple_8c.js | 7 + ...i2c__ex3__slave_rx_multiple_8c_source.html | 263 ++++++ ...sci__b__i2c__ex4__master_tx_single_8c.html | 205 +++++ ...eusci__b__i2c__ex4__master_tx_single_8c.js | 6 + ..._i2c__ex4__master_tx_single_8c_source.html | 232 +++++ ...usci__b__i2c__ex4__slave_rx_single_8c.html | 230 +++++ ...2eusci__b__i2c__ex4__slave_rx_single_8c.js | 7 + ...__i2c__ex4__slave_rx_single_8c_source.html | 234 +++++ ...b__i2c__ex5__master_multiple_slave_8c.html | 240 +++++ ...__b__i2c__ex5__master_multiple_slave_8c.js | 9 + ..._ex5__master_multiple_slave_8c_source.html | 306 +++++++ ..._b__i2c__ex5__slave_multiple_slave_8c.html | 240 +++++ ...i__b__i2c__ex5__slave_multiple_slave_8c.js | 9 + ...__ex5__slave_multiple_slave_8c_source.html | 282 ++++++ ...b__spi_2eusci__b__spi__ex1__master_8c.html | 217 +++++ ...__b__spi_2eusci__b__spi__ex1__master_8c.js | 7 + ...2eusci__b__spi__ex1__master_8c_source.html | 300 +++++++ ..._b__spi_2eusci__b__spi__ex1__slave_8c.html | 219 +++++ ...i__b__spi_2eusci__b__spi__ex1__slave_8c.js | 7 + ..._2eusci__b__spi__ex1__slave_8c_source.html | 253 ++++++ ...57xx_2framctl_2framctl__ex1__write_8c.html | 173 ++++ ..._r57xx_2framctl_2framctl__ex1__write_8c.js | 5 + ...ramctl_2framctl__ex1__write_8c_source.html | 196 ++++ ..._r57xx_2gpio_2gpio__ex1__output_hi_8c.html | 139 +++ ..._f_r57xx_2gpio_2gpio__ex1__output_hi_8c.js | 4 + ...2gpio_2gpio__ex1__output_hi_8c_source.html | 197 +++++ ...xx_2gpio_2gpio__ex2__input_capture_8c.html | 161 ++++ ...57xx_2gpio_2gpio__ex2__input_capture_8c.js | 5 + ...o_2gpio__ex2__input_capture_8c_source.html | 241 +++++ ...xx_2gpio_2gpio__ex3__software_poll_8c.html | 152 ++++ ...57xx_2gpio_2gpio__ex3__software_poll_8c.js | 4 + ...o_2gpio__ex3__software_poll_8c_source.html | 183 ++++ ...x_2gpio_2gpio__ex4__write_to_port1_8c.html | 154 ++++ ...7xx_2gpio_2gpio__ex4__write_to_port1_8c.js | 4 + ..._2gpio__ex4__write_to_port1_8c_source.html | 170 ++++ ..._f_r57xx_2mpu_2mpu__ex1__three_seg_8c.html | 195 ++++ ...30_f_r57xx_2mpu_2mpu__ex1__three_seg_8c.js | 6 + ...x_2mpu_2mpu__ex1__three_seg_8c_source.html | 231 +++++ ...30_f_r57xx_2mpu_2mpu__ex2__two_seg_8c.html | 195 ++++ ...p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c.js | 6 + ...7xx_2mpu_2mpu__ex2__two_seg_8c_source.html | 223 +++++ ...xx_2mpu_2mpu__ex3__system_pre_init_8c.html | 367 ++++++++ ...57xx_2mpu_2mpu__ex3__system_pre_init_8c.js | 14 + ..._2mpu__ex3__system_pre_init_8c_source.html | 179 ++++ ...mpy32__ex10__32bit_signed_multiply_8c.html | 157 ++++ ..._2mpy32__ex10__32bit_signed_multiply_8c.js | 4 + ...ex10__32bit_signed_multiply_8c_source.html | 173 ++++ ..._ex11__32bit_signed_multiply_accum_8c.html | 157 ++++ ...2__ex11__32bit_signed_multiply_accum_8c.js | 4 + ...32bit_signed_multiply_accum_8c_source.html | 181 ++++ ...x12__32bit_unsigned_multiply_accum_8c.html | 157 ++++ ..._ex12__32bit_unsigned_multiply_accum_8c.js | 4 + ...bit_unsigned_multiply_accum_8c_source.html | 180 ++++ ...2mpy32__ex13__saturation_underflow_8c.html | 216 +++++ ...2_2mpy32__ex13__saturation_underflow_8c.js | 7 + ..._ex13__saturation_underflow_8c_source.html | 204 +++++ ..._2mpy32__ex14__saturation_overflow_8c.html | 216 +++++ ...32_2mpy32__ex14__saturation_overflow_8c.js | 7 + ...__ex14__saturation_overflow_8c_source.html | 210 +++++ ...2mpy32_2mpy32__ex15__fraction_mode_8c.html | 198 +++++ ...x_2mpy32_2mpy32__ex15__fraction_mode_8c.js | 6 + ...2mpy32__ex15__fraction_mode_8c_source.html | 181 ++++ ...py32__ex1__16bit_unsigned_multiply_8c.html | 157 ++++ ...2mpy32__ex1__16bit_unsigned_multiply_8c.js | 4 + ...x1__16bit_unsigned_multiply_8c_source.html | 164 ++++ ...mpy32__ex2__8bit_unsigned_multiply_8c.html | 157 ++++ ..._2mpy32__ex2__8bit_unsigned_multiply_8c.js | 4 + ...ex2__8bit_unsigned_multiply_8c_source.html | 164 ++++ ...2mpy32__ex3__16bit_signed_multiply_8c.html | 216 +++++ ...2_2mpy32__ex3__16bit_signed_multiply_8c.js | 7 + ..._ex3__16bit_signed_multiply_8c_source.html | 174 ++++ ..._2mpy32__ex4__8bit_signed_multiply_8c.html | 157 ++++ ...32_2mpy32__ex4__8bit_signed_multiply_8c.js | 4 + ...__ex4__8bit_signed_multiply_8c_source.html | 170 ++++ ...ex5__16bit_unsigned_multiply_accum_8c.html | 157 ++++ ...__ex5__16bit_unsigned_multiply_accum_8c.js | 4 + ...bit_unsigned_multiply_accum_8c_source.html | 173 ++++ ..._ex6__8bit_unsigned_multiply_accum_8c.html | 156 ++++ ...2__ex6__8bit_unsigned_multiply_accum_8c.js | 4 + ...bit_unsigned_multiply_accum_8c_source.html | 173 ++++ ...__ex7__16bit_signed_multiply_accum_8c.html | 157 ++++ ...32__ex7__16bit_signed_multiply_accum_8c.js | 4 + ...16bit_signed_multiply_accum_8c_source.html | 173 ++++ ...2__ex8__8bit_signed_multiply_accum_8c.html | 157 ++++ ...y32__ex8__8bit_signed_multiply_accum_8c.js | 4 + ..._8bit_signed_multiply_accum_8c_source.html | 180 ++++ ...py32__ex9__32bit_unsigned_multiply_8c.html | 180 ++++ ...2mpy32__ex9__32bit_unsigned_multiply_8c.js | 5 + ...x9__32bit_unsigned_multiply_8c_source.html | 177 ++++ ...57xx_2pmm_2pmm___reset___l_p_mx__5_8c.html | 139 +++ ..._r57xx_2pmm_2pmm___reset___l_p_mx__5_8c.js | 4 + ...mm_2pmm___reset___l_p_mx__5_8c_source.html | 316 +++++++ ...2rtc__b_2rtc__b__ex1__calendermode_8c.html | 201 +++++ ...x_2rtc__b_2rtc__b__ex1__calendermode_8c.js | 6 + ..._2rtc__b__ex1__calendermode_8c_source.html | 261 ++++++ ...imer__a_2timer__a__ex1__pwm_single_8c.html | 198 +++++ ...2timer__a_2timer__a__ex1__pwm_single_8c.js | 6 + ..._2timer__a__ex1__pwm_single_8c_source.html | 179 ++++ ...de_operation_with_c_c_r0_interrupt_8c.html | 204 +++++ ...mode_operation_with_c_c_r0_interrupt_8c.js | 6 + ...ation_with_c_c_r0_interrupt_8c_source.html | 221 +++++ ...e_operation_with_t_a_i_e_interrupt_8c.html | 179 ++++ ...ode_operation_with_t_a_i_e_interrupt_8c.js | 5 + ...tion_with_t_a_i_e_interrupt_8c_source.html | 210 +++++ ...imer__a__ex4__pwm_multiple_up_down_8c.html | 216 +++++ ...2timer__a__ex4__pwm_multiple_up_down_8c.js | 7 + ...__ex4__pwm_multiple_up_down_8c_source.html | 203 +++++ ..._a_2timer__a__ex5__pwm_multiple_up_8c.html | 215 +++++ ...r__a_2timer__a__ex5__pwm_multiple_up_8c.js | 7 + ...er__a__ex5__pwm_multiple_up_8c_source.html | 199 +++++ ...er__a__ex6__up_down_mode_operation_8c.html | 197 +++++ ...imer__a__ex6__up_down_mode_operation_8c.js | 6 + ...ex6__up_down_mode_operation_8c_source.html | 195 ++++ ...er__b__ex1__continuous_mode_c_c_r0_8c.html | 186 ++++ ...imer__b__ex1__continuous_mode_c_c_r0_8c.js | 6 + ...ex1__continuous_mode_c_c_r0_8c_source.html | 228 +++++ ...__b_2timer__b__ex2__overflow_i_s_r_8c.html | 161 ++++ ...er__b_2timer__b__ex2__overflow_i_s_r_8c.js | 5 + ...mer__b__ex2__overflow_i_s_r_8c_source.html | 219 +++++ ...57xx_2timer__b_2timer__b__ex3__pwm_8c.html | 137 +++ ..._r57xx_2timer__b_2timer__b__ex3__pwm_8c.js | 4 + ...imer__b_2timer__b__ex3__pwm_8c_source.html | 209 +++++ ..._2timer__b__ex4__up_mode_operation_8c.html | 202 +++++ ..._b_2timer__b__ex4__up_mode_operation_8c.js | 6 + ...__b__ex4__up_mode_operation_8c_source.html | 206 +++++ ...er__b_2timer__b__ex5__single_p_w_m_8c.html | 198 +++++ ...imer__b_2timer__b__ex5__single_p_w_m_8c.js | 6 + ...timer__b__ex5__single_p_w_m_8c_source.html | 178 ++++ ...xx_2tlv_2tlv__ex1__get_device_type_8c.html | 149 ++++ ...57xx_2tlv_2tlv__ex1__get_device_type_8c.js | 4 + ..._2tlv__ex1__get_device_type_8c_source.html | 152 ++++ ...a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html | 181 ++++ ...__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js | 5 + ..._a__ex1__interval_s_m_c_l_k_8c_source.html | 185 ++++ ...__a_2wdt__a__ex2__interval_a_c_l_k_8c.html | 181 ++++ ...dt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js | 5 + ...t__a__ex2__interval_a_c_l_k_8c_source.html | 185 ++++ ...__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html | 159 ++++ ...dt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js | 4 + ...t__a__ex3__watchdog_a_c_l_k_8c_source.html | 172 ++++ ...xx_2crc_2crc__ex1__build_signature_8c.html | 159 ++++ ..._6xx_2crc_2crc__ex1__build_signature_8c.js | 4 + ..._2crc__ex1__build_signature_8c_source.html | 211 +++++ ...xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c.html | 139 +++ ...r5xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c.js | 4 + ..._2cs_2cs__ex1___d_c_o_setup_8c_source.html | 188 ++++ ...6xx_2dma_2dma__ex1__repeated_block_8c.html | 151 ++++ ...__6xx_2dma_2dma__ex1__repeated_block_8c.js | 4 + ...a_2dma__ex1__repeated_block_8c_source.html | 220 +++++ ...a__spi_2eusci__a__spi__ex1__master_8c.html | 220 +++++ ...__a__spi_2eusci__a__spi__ex1__master_8c.js | 7 + ...2eusci__a__spi__ex1__master_8c_source.html | 278 ++++++ ..._a__spi_2eusci__a__spi__ex1__slave_8c.html | 219 +++++ ...i__a__spi_2eusci__a__spi__ex1__slave_8c.js | 7 + ..._2eusci__a__spi__ex1__slave_8c_source.html | 259 ++++++ ...i__a__uart__ex1__loopback_advanced_8c.html | 259 ++++++ ...sci__a__uart__ex1__loopback_advanced_8c.js | 9 + ...art__ex1__loopback_advanced_8c_source.html | 269 ++++++ ...i__b__i2c__ex1__master_rx_multiple_8c.html | 238 +++++ ...sci__b__i2c__ex1__master_rx_multiple_8c.js | 8 + ...2c__ex1__master_rx_multiple_8c_source.html | 345 ++++++++ ...ci__b__i2c__ex1__slave_tx_multiple_8c.html | 228 +++++ ...usci__b__i2c__ex1__slave_tx_multiple_8c.js | 7 + ...i2c__ex1__slave_tx_multiple_8c_source.html | 257 ++++++ ...sci__b__i2c__ex2__master_rx_single_8c.html | 204 +++++ ...eusci__b__i2c__ex2__master_rx_single_8c.js | 6 + ..._i2c__ex2__master_rx_single_8c_source.html | 251 ++++++ ...usci__b__i2c__ex2__slave_tx_single_8c.html | 227 +++++ ...2eusci__b__i2c__ex2__slave_tx_single_8c.js | 7 + ...__i2c__ex2__slave_tx_single_8c_source.html | 265 ++++++ ...i__b__i2c__ex3__master_tx_multiple_8c.html | 247 ++++++ ...sci__b__i2c__ex3__master_tx_multiple_8c.js | 8 + ...2c__ex3__master_tx_multiple_8c_source.html | 292 ++++++ ...ci__b__i2c__ex3__slave_rx_multiple_8c.html | 209 +++++ ...usci__b__i2c__ex3__slave_rx_multiple_8c.js | 7 + ...i2c__ex3__slave_rx_multiple_8c_source.html | 283 ++++++ ...sci__b__i2c__ex4__master_tx_single_8c.html | 205 +++++ ...eusci__b__i2c__ex4__master_tx_single_8c.js | 6 + ..._i2c__ex4__master_tx_single_8c_source.html | 236 +++++ ...usci__b__i2c__ex4__slave_rx_single_8c.html | 230 +++++ ...2eusci__b__i2c__ex4__slave_rx_single_8c.js | 7 + ...__i2c__ex4__slave_rx_single_8c_source.html | 253 ++++++ ...b__i2c__ex5__master_multiple_slave_8c.html | 240 +++++ ...__b__i2c__ex5__master_multiple_slave_8c.js | 9 + ..._ex5__master_multiple_slave_8c_source.html | 328 +++++++ ..._b__i2c__ex5__slave_multiple_slave_8c.html | 240 +++++ ...i__b__i2c__ex5__slave_multiple_slave_8c.js | 9 + ...__ex5__slave_multiple_slave_8c_source.html | 297 +++++++ ...b__spi_2eusci__b__spi__ex1__master_8c.html | 220 +++++ ...__b__spi_2eusci__b__spi__ex1__master_8c.js | 7 + ...2eusci__b__spi__ex1__master_8c_source.html | 278 ++++++ ..._b__spi_2eusci__b__spi__ex1__slave_8c.html | 220 +++++ ...i__b__spi_2eusci__b__spi__ex1__slave_8c.js | 7 + ..._2eusci__b__spi__ex1__slave_8c_source.html | 258 ++++++ ..._6xx_2framctl_2framctl__ex1__write_8c.html | 150 ++++ ...x__6xx_2framctl_2framctl__ex1__write_8c.js | 4 + ...ramctl_2framctl__ex1__write_8c_source.html | 209 +++++ ...x__6xx_2gpio_2gpio__ex1__output_hi_8c.html | 139 +++ ...5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.js | 4 + ...2gpio_2gpio__ex1__output_hi_8c_source.html | 203 +++++ ...xx_2gpio_2gpio__ex2__input_capture_8c.html | 161 ++++ ..._6xx_2gpio_2gpio__ex2__input_capture_8c.js | 5 + ...o_2gpio__ex2__input_capture_8c_source.html | 248 ++++++ ...xx_2gpio_2gpio__ex3__software_poll_8c.html | 152 ++++ ..._6xx_2gpio_2gpio__ex3__software_poll_8c.js | 4 + ...o_2gpio__ex3__software_poll_8c_source.html | 189 ++++ ...x_2gpio_2gpio__ex4__write_to_port1_8c.html | 154 ++++ ...6xx_2gpio_2gpio__ex4__write_to_port1_8c.js | 4 + ..._2gpio__ex4__write_to_port1_8c_source.html | 176 ++++ ...5xx__6xx_2mpu_2mpu__ex1__three_seg_8c.html | 224 +++++ ..._r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c.js | 8 + ...x_2mpu_2mpu__ex1__three_seg_8c_source.html | 260 ++++++ ..._r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c.html | 224 +++++ ..._f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c.js | 8 + ...6xx_2mpu_2mpu__ex2__two_seg_8c_source.html | 250 ++++++ ...xx_2mpu_2mpu__ex3__system_pre_init_8c.html | 372 ++++++++ ..._6xx_2mpu_2mpu__ex3__system_pre_init_8c.js | 15 + ..._2mpu__ex3__system_pre_init_8c_source.html | 207 +++++ ...mpy32__ex10__32bit_signed_multiply_8c.html | 157 ++++ ..._2mpy32__ex10__32bit_signed_multiply_8c.js | 4 + ...ex10__32bit_signed_multiply_8c_source.html | 173 ++++ ..._ex11__32bit_signed_multiply_accum_8c.html | 157 ++++ ...2__ex11__32bit_signed_multiply_accum_8c.js | 4 + ...32bit_signed_multiply_accum_8c_source.html | 181 ++++ ...x12__32bit_unsigned_multiply_accum_8c.html | 157 ++++ ..._ex12__32bit_unsigned_multiply_accum_8c.js | 4 + ...bit_unsigned_multiply_accum_8c_source.html | 180 ++++ ...2mpy32__ex13__saturation_underflow_8c.html | 216 +++++ ...2_2mpy32__ex13__saturation_underflow_8c.js | 7 + ..._ex13__saturation_underflow_8c_source.html | 204 +++++ ..._2mpy32__ex14__saturation_overflow_8c.html | 216 +++++ ...32_2mpy32__ex14__saturation_overflow_8c.js | 7 + ...__ex14__saturation_overflow_8c_source.html | 210 +++++ ...2mpy32_2mpy32__ex15__fraction_mode_8c.html | 198 +++++ ...x_2mpy32_2mpy32__ex15__fraction_mode_8c.js | 6 + ...2mpy32__ex15__fraction_mode_8c_source.html | 181 ++++ ...py32__ex1__16bit_unsigned_multiply_8c.html | 157 ++++ ...2mpy32__ex1__16bit_unsigned_multiply_8c.js | 4 + ...x1__16bit_unsigned_multiply_8c_source.html | 164 ++++ ...mpy32__ex2__8bit_unsigned_multiply_8c.html | 157 ++++ ..._2mpy32__ex2__8bit_unsigned_multiply_8c.js | 4 + ...ex2__8bit_unsigned_multiply_8c_source.html | 164 ++++ ...2mpy32__ex3__16bit_signed_multiply_8c.html | 216 +++++ ...2_2mpy32__ex3__16bit_signed_multiply_8c.js | 7 + ..._ex3__16bit_signed_multiply_8c_source.html | 174 ++++ ..._2mpy32__ex4__8bit_signed_multiply_8c.html | 157 ++++ ...32_2mpy32__ex4__8bit_signed_multiply_8c.js | 4 + ...__ex4__8bit_signed_multiply_8c_source.html | 170 ++++ ...ex5__16bit_unsigned_multiply_accum_8c.html | 157 ++++ ...__ex5__16bit_unsigned_multiply_accum_8c.js | 4 + ...bit_unsigned_multiply_accum_8c_source.html | 173 ++++ ..._ex6__8bit_unsigned_multiply_accum_8c.html | 156 ++++ ...2__ex6__8bit_unsigned_multiply_accum_8c.js | 4 + ...bit_unsigned_multiply_accum_8c_source.html | 173 ++++ ...__ex7__16bit_signed_multiply_accum_8c.html | 157 ++++ ...32__ex7__16bit_signed_multiply_accum_8c.js | 4 + ...16bit_signed_multiply_accum_8c_source.html | 173 ++++ ...2__ex8__8bit_signed_multiply_accum_8c.html | 157 ++++ ...y32__ex8__8bit_signed_multiply_accum_8c.js | 4 + ..._8bit_signed_multiply_accum_8c_source.html | 180 ++++ ...py32__ex9__32bit_unsigned_multiply_8c.html | 180 ++++ ...2mpy32__ex9__32bit_unsigned_multiply_8c.js | 5 + ...x9__32bit_unsigned_multiply_8c_source.html | 177 ++++ ..._6xx_2pmm_2pmm___reset___l_p_mx__5_8c.html | 139 +++ ...x__6xx_2pmm_2pmm___reset___l_p_mx__5_8c.js | 4 + ...mm_2pmm___reset___l_p_mx__5_8c_source.html | 267 ++++++ ...2rtc__b_2rtc__b__ex1__calendermode_8c.html | 199 +++++ ...x_2rtc__b_2rtc__b__ex1__calendermode_8c.js | 6 + ..._2rtc__b__ex1__calendermode_8c_source.html | 271 ++++++ ...2rtc__c_2rtc__c__ex1__calendarmode_8c.html | 199 +++++ ...x_2rtc__c_2rtc__c__ex1__calendarmode_8c.js | 6 + ..._2rtc__c__ex1__calendarmode_8c_source.html | 262 ++++++ ...imer__a_2timer__a__ex1__pwm_single_8c.html | 198 +++++ ...2timer__a_2timer__a__ex1__pwm_single_8c.js | 6 + ..._2timer__a__ex1__pwm_single_8c_source.html | 186 ++++ ...de_operation_with_c_c_r0_interrupt_8c.html | 204 +++++ ...mode_operation_with_c_c_r0_interrupt_8c.js | 6 + ...ation_with_c_c_r0_interrupt_8c_source.html | 227 +++++ ...e_operation_with_t_a_i_e_interrupt_8c.html | 179 ++++ ...ode_operation_with_t_a_i_e_interrupt_8c.js | 5 + ...tion_with_t_a_i_e_interrupt_8c_source.html | 219 +++++ ...imer__a__ex4__pwm_multiple_up_down_8c.html | 216 +++++ ...2timer__a__ex4__pwm_multiple_up_down_8c.js | 7 + ...__ex4__pwm_multiple_up_down_8c_source.html | 209 +++++ ..._a_2timer__a__ex5__pwm_multiple_up_8c.html | 215 +++++ ...r__a_2timer__a__ex5__pwm_multiple_up_8c.js | 7 + ...er__a__ex5__pwm_multiple_up_8c_source.html | 209 +++++ ...er__a__ex6__up_down_mode_operation_8c.html | 197 +++++ ...imer__a__ex6__up_down_mode_operation_8c.js | 6 + ...ex6__up_down_mode_operation_8c_source.html | 200 +++++ ...er__b__ex1__continuous_mode_c_c_r0_8c.html | 186 ++++ ...imer__b__ex1__continuous_mode_c_c_r0_8c.js | 6 + ...ex1__continuous_mode_c_c_r0_8c_source.html | 228 +++++ ...__b_2timer__b__ex2__overflow_i_s_r_8c.html | 161 ++++ ...er__b_2timer__b__ex2__overflow_i_s_r_8c.js | 5 + ...mer__b__ex2__overflow_i_s_r_8c_source.html | 218 +++++ ..._6xx_2timer__b_2timer__b__ex3__pwm_8c.html | 139 +++ ...x__6xx_2timer__b_2timer__b__ex3__pwm_8c.js | 4 + ...imer__b_2timer__b__ex3__pwm_8c_source.html | 211 +++++ ..._2timer__b__ex4__up_mode_operation_8c.html | 202 +++++ ..._b_2timer__b__ex4__up_mode_operation_8c.js | 6 + ...__b__ex4__up_mode_operation_8c_source.html | 206 +++++ ...er__b_2timer__b__ex5__single_p_w_m_8c.html | 198 +++++ ...imer__b_2timer__b__ex5__single_p_w_m_8c.js | 6 + ...timer__b__ex5__single_p_w_m_8c_source.html | 184 ++++ ...xx_2tlv_2tlv__ex1__get_device_type_8c.html | 149 ++++ ..._6xx_2tlv_2tlv__ex1__get_device_type_8c.js | 4 + ..._2tlv__ex1__get_device_type_8c_source.html | 152 ++++ ..._2tlv__ex2__read_t_l_v_descriptors_8c.html | 773 ++++++++++++++++ ...lv_2tlv__ex2__read_t_l_v_descriptors_8c.js | 37 + ...ex2__read_t_l_v_descriptors_8c_source.html | 326 +++++++ ...v_2tlv__ex3__calibrate_temp_sensor_8c.html | 336 +++++++ ...tlv_2tlv__ex3__calibrate_temp_sensor_8c.js | 13 + ..._ex3__calibrate_temp_sensor_8c_source.html | 346 ++++++++ ...a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html | 181 ++++ ...__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js | 5 + ..._a__ex1__interval_s_m_c_l_k_8c_source.html | 191 ++++ ...__a_2wdt__a__ex2__interval_a_c_l_k_8c.html | 181 ++++ ...dt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js | 5 + ...t__a__ex2__interval_a_c_l_k_8c_source.html | 191 ++++ ...__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html | 159 ++++ ...dt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js | 4 + ...t__a__ex3__watchdog_a_c_l_k_8c_source.html | 178 ++++ .../html/_power_01_design_8markdown.html | 105 +++ .../html/_r_e_a_d_m_e_8markdown.html | 2 +- ...f5xx__6xx_200__empty_project_2main_8c.html | 138 +++ ...0_f5xx__6xx_200__empty_project_2main_8c.js | 4 + ...xx_200__empty_project_2main_8c_source.html | 146 +++ ...r2xx__4xx_200__empty_project_2main_8c.html | 138 +++ ...f_r2xx__4xx_200__empty_project_2main_8c.js | 4 + ...xx_200__empty_project_2main_8c_source.html | 144 +++ ...0_f_r57xx_200__empty_project_2main_8c.html | 138 +++ ...430_f_r57xx_200__empty_project_2main_8c.js | 4 + ...xx_200__empty_project_2main_8c_source.html | 145 +++ ...r5xx__6xx_200__empty_project_2main_8c.html | 138 +++ ...f_r5xx__6xx_200__empty_project_2main_8c.js | 4 + ...xx_200__empty_project_2main_8c_source.html | 145 +++ ..._p430i2xx_200__empty_project_2main_8c.html | 138 +++ ..._s_p430i2xx_200__empty_project_2main_8c.js | 4 + ...xx_200__empty_project_2main_8c_source.html | 145 +++ ...elemetry_and_lighting_system_2main_8c.html | 138 +++ ..._telemetry_and_lighting_system_2main_8c.js | 4 + ...y_and_lighting_system_2main_8c_source.html | 115 +++ Generated Documentation/html/adc10__a_8c.html | 2 +- .../html/adc10__a_8c_source.html | 2 +- Generated Documentation/html/adc10__a_8h.html | 2 +- .../html/adc10__a_8h_source.html | 2 +- .../html/adc10__a__ex1__avcc_ref_8c.html | 180 ++++ .../html/adc10__a__ex1__avcc_ref_8c.js | 5 + .../adc10__a__ex1__avcc_ref_8c_source.html | 255 ++++++ .../html/adc10__a__ex2__int_ref_8c.html | 226 +++++ .../html/adc10__a__ex2__int_ref_8c.js | 7 + .../adc10__a__ex2__int_ref_8c_source.html | 307 +++++++ .../html/adc10__a__ex3__window_comp_8c.html | 307 +++++++ .../html/adc10__a__ex3__window_comp_8c.js | 11 + .../adc10__a__ex3__window_comp_8c_source.html | 354 ++++++++ .../html/adc10__a__ex4__signed_data_8c.html | 180 ++++ .../html/adc10__a__ex4__signed_data_8c.js | 5 + .../adc10__a__ex4__signed_data_8c_source.html | 258 ++++++ .../html/adc10__a__ex5__batt_monitor_8c.html | 156 ++++ .../html/adc10__a__ex5__batt_monitor_8c.js | 4 + ...adc10__a__ex5__batt_monitor_8c_source.html | 239 +++++ .../html/adc10__a__ex6__ref_toggle_8c.html | 183 ++++ .../html/adc10__a__ex6__ref_toggle_8c.js | 5 + .../adc10__a__ex6__ref_toggle_8c_source.html | 272 ++++++ ...adc10__a__ex7__repeat_single_d_m_a_8c.html | 180 ++++ .../adc10__a__ex7__repeat_single_d_m_a_8c.js | 5 + ...a__ex7__repeat_single_d_m_a_8c_source.html | 284 ++++++ .../adc10__a__ex8__sequence_d_m_a_8c.html | 179 ++++ .../html/adc10__a__ex8__sequence_d_m_a_8c.js | 5 + ...c10__a__ex8__sequence_d_m_a_8c_source.html | 279 ++++++ .../html/adc10__a__ex9__repeat_seq_8c.html | 182 ++++ .../html/adc10__a__ex9__repeat_seq_8c.js | 5 + .../adc10__a__ex9__repeat_seq_8c_source.html | 284 ++++++ .../html/adc10__b__ex1__avcc_ref_8c.html | 178 ++++ .../html/adc10__b__ex1__avcc_ref_8c.js | 5 + .../adc10__b__ex1__avcc_ref_8c_source.html | 319 +++++++ .../html/adc10__b__ex2__int_ref_8c.html | 229 +++++ .../html/adc10__b__ex2__int_ref_8c.js | 7 + .../adc10__b__ex2__int_ref_8c_source.html | 361 ++++++++ Generated Documentation/html/adc12__a_8c.html | 2 +- .../html/adc12__a_8c_source.html | 15 +- Generated Documentation/html/adc12__a_8h.html | 2 +- .../html/adc12__a_8h_source.html | 5 +- .../html/adc12__a__ex1__avcc_ref_8c.html | 179 ++++ .../html/adc12__a__ex1__avcc_ref_8c.js | 5 + .../adc12__a__ex1__avcc_ref_8c_source.html | 282 ++++++ .../html/adc12__a__ex2__int_ref_8c.html | 154 ++++ .../html/adc12__a__ex2__int_ref_8c.js | 4 + .../adc12__a__ex2__int_ref_8c_source.html | 234 +++++ .../html/adc12__a__ex3__ext_ref_8c.html | 150 ++++ .../html/adc12__a__ex3__ext_ref_8c.js | 4 + .../adc12__a__ex3__ext_ref_8c_source.html | 217 +++++ .../html/adc12__a__ex4__repeated_seq_8c.html | 282 ++++++ .../html/adc12__a__ex4__repeated_seq_8c.js | 10 + ...adc12__a__ex4__repeated_seq_8c_source.html | 335 +++++++ .../adc12__a__ex5__repeated_single_8c.html | 222 +++++ .../html/adc12__a__ex5__repeated_single_8c.js | 7 + ...12__a__ex5__repeated_single_8c_source.html | 274 ++++++ .../adc12__a__ex6__extended_inputs_8c.html | 206 +++++ .../html/adc12__a__ex6__extended_inputs_8c.js | 6 + ...12__a__ex6__extended_inputs_8c_source.html | 283 ++++++ .../html/adc12__a__ex7__sequence_8c.html | 208 +++++ .../html/adc12__a__ex7__sequence_8c.js | 6 + .../adc12__a__ex7__sequence_8c_source.html | 328 +++++++ .../html/adc12__a__ex8__temp_sensor_8c.html | 244 +++++ .../html/adc12__a__ex8__temp_sensor_8c.js | 8 + .../adc12__a__ex8__temp_sensor_8c_source.html | 296 +++++++ .../html/adc12__b__ex1__avcc_ref_8c.html | 163 ++++ .../html/adc12__b__ex1__avcc_ref_8c.js | 5 + .../adc12__b__ex1__avcc_ref_8c_source.html | 371 ++++++++ .../html/adc12__b__ex2__shared_ref_8c.html | 163 ++++ .../html/adc12__b__ex2__shared_ref_8c.js | 5 + .../adc12__b__ex2__shared_ref_8c_source.html | 378 ++++++++ .../html/adc12__b__ex3__ext_ref_8c.html | 139 +++ .../html/adc12__b__ex3__ext_ref_8c.js | 4 + .../adc12__b__ex3__ext_ref_8c_source.html | 260 ++++++ .../html/adc__ex1__avcc_ref_8c.html | 177 ++++ .../html/adc__ex1__avcc_ref_8c.js | 5 + .../html/adc__ex1__avcc_ref_8c_source.html | 292 ++++++ .../html/adc__ex2__int_ref_8c.html | 228 +++++ .../html/adc__ex2__int_ref_8c.js | 7 + .../html/adc__ex2__int_ref_8c_source.html | 358 ++++++++ .../html/aes256__ex1__encrypt_decrypt_8c.html | 269 ++++++ .../html/aes256__ex1__encrypt_decrypt_8c.js | 9 + ...es256__ex1__encrypt_decrypt_8c_source.html | 190 ++++ Generated Documentation/html/aes_8c.html | 2 +- .../html/aes_8c_source.html | 121 +-- Generated Documentation/html/aes_8h.html | 2 +- .../html/aes_8h_source.html | 22 +- .../html/aes__ex1__encrypt_decrypt_8c.html | 207 +++++ .../html/aes__ex1__encrypt_decrypt_8c.js | 6 + .../aes__ex1__encrypt_decrypt_8c_source.html | 197 +++++ ...crypt_decrypt_with_first_round_key_8c.html | 195 ++++ ...encrypt_decrypt_with_first_round_key_8c.js | 6 + ...ecrypt_with_first_round_key_8c_source.html | 185 ++++ Generated Documentation/html/annotated.html | 109 +++ Generated Documentation/html/annotated_dup.js | 4 + Generated Documentation/html/battbak_8c.html | 2 +- .../html/battbak_8c_source.html | 2 +- Generated Documentation/html/battbak_8h.html | 2 +- .../html/battbak_8h_source.html | 2 +- .../battbak__ex1__calendermode_l_p_m3_8c.html | 202 +++++ .../battbak__ex1__calendermode_l_p_m3_8c.js | 6 + ...k__ex1__calendermode_l_p_m3_8c_source.html | 255 ++++++ Generated Documentation/html/classes.html | 110 +++ ...ssti__mcu__msp430__driverlib__product.html | 160 ++++ ...lassti__mcu__msp430__driverlib__product.js | 4 + Generated Documentation/html/comp__b_8c.html | 2 +- .../html/comp__b_8c_source.html | 37 +- Generated Documentation/html/comp__b_8h.html | 2 +- .../html/comp__b_8h_source.html | 7 +- .../html/comp__b__ex1__2_v_ref_8c.html | 158 ++++ .../html/comp__b__ex1__2_v_ref_8c.js | 4 + .../html/comp__b__ex1__2_v_ref_8c_source.html | 200 +++++ .../html/comp__b__ex2__1_v5_ref_int_8c.html | 176 ++++ .../html/comp__b__ex2__1_v5_ref_int_8c.js | 5 + .../comp__b__ex2__1_v5_ref_int_8c_source.html | 233 +++++ .../comp__b__ex3__avcc_ref_u_l_p_m_8c.html | 152 ++++ .../html/comp__b__ex3__avcc_ref_u_l_p_m_8c.js | 4 + ...p__b__ex3__avcc_ref_u_l_p_m_8c_source.html | 200 +++++ .../html/comp__b__ex4__hysteresis_8c.html | 152 ++++ .../html/comp__b__ex4__hysteresis_8c.js | 4 + .../comp__b__ex4__hysteresis_8c_source.html | 197 +++++ .../html/comp__b__ex5___t_ax_8c.html | 259 ++++++ .../html/comp__b__ex5___t_ax_8c.js | 9 + .../html/comp__b__ex5___t_ax_8c_source.html | 355 ++++++++ .../html/comp__b__ex6__ext_ref_8c.html | 160 ++++ .../html/comp__b__ex6__ext_ref_8c.js | 4 + .../html/comp__b__ex6__ext_ref_8c_source.html | 187 ++++ ...x1__output_toggle_vcomp_vs_vref2_v_8c.html | 139 +++ ..._ex1__output_toggle_vcomp_vs_vref2_v_8c.js | 4 + ...put_toggle_vcomp_vs_vref2_v_8c_source.html | 229 +++++ ...x2__output_toggle_vcomp_vs_vref25v_8c.html | 139 +++ ..._ex2__output_toggle_vcomp_vs_vref25v_8c.js | 4 + ...put_toggle_vcomp_vs_vref25v_8c_source.html | 231 +++++ ...mp__d__ex3__interrupt_vcomp_vs15_v_8c.html | 161 ++++ ...comp__d__ex3__interrupt_vcomp_vs15_v_8c.js | 5 + ...ex3__interrupt_vcomp_vs15_v_8c_source.html | 282 ++++++ ...4__output_toggle_vcomp_vs_half_vcc_8c.html | 139 +++ ...ex4__output_toggle_vcomp_vs_half_vcc_8c.js | 4 + ...ut_toggle_vcomp_vs_half_vcc_8c_source.html | 228 +++++ ...__d__ex5__output_toggle_hysteresis_8c.html | 139 +++ ...mp__d__ex5__output_toggle_hysteresis_8c.js | 4 + ...5__output_toggle_hysteresis_8c_source.html | 228 +++++ ...x1__output_toggle_vcomp_vs_vref2_v_8c.html | 139 +++ ..._ex1__output_toggle_vcomp_vs_vref2_v_8c.js | 4 + ...put_toggle_vcomp_vs_vref2_v_8c_source.html | 237 +++++ ...2__output_toggle_vcomp_vs_vref25_v_8c.html | 139 +++ ...ex2__output_toggle_vcomp_vs_vref25_v_8c.js | 4 + ...ut_toggle_vcomp_vs_vref25_v_8c_source.html | 235 +++++ ...mp__e__ex3__interrupt_vcomp_vs12_v_8c.html | 161 ++++ ...comp__e__ex3__interrupt_vcomp_vs12_v_8c.js | 5 + ...ex3__interrupt_vcomp_vs12_v_8c_source.html | 288 ++++++ ...4__output_toggle_vcomp_vs_half_vcc_8c.html | 139 +++ ...ex4__output_toggle_vcomp_vs_half_vcc_8c.js | 4 + ...ut_toggle_vcomp_vs_half_vcc_8c_source.html | 234 +++++ ...__e__ex5__output_toggle_hysteresis_8c.html | 139 +++ ...mp__e__ex5__output_toggle_hysteresis_8c.js | 4 + ...5__output_toggle_hysteresis_8c_source.html | 234 +++++ .../html/crc32__ex1__calculate_crc16_8c.html | 198 +++++ .../html/crc32__ex1__calculate_crc16_8c.js | 6 + ...crc32__ex1__calculate_crc16_8c_source.html | 201 +++++ Generated Documentation/html/crc_8c.html | 2 +- .../html/crc_8c_source.html | 2 +- Generated Documentation/html/crc_8h.html | 2 +- .../html/crc_8h_source.html | 2 +- .../cs__ex1___d_c_o1_m_hz_s_w_trim_8c.html | 267 ++++++ .../html/cs__ex1___d_c_o1_m_hz_s_w_trim_8c.js | 9 + ..._ex1___d_c_o1_m_hz_s_w_trim_8c_source.html | 300 +++++++ .../cs__ex1__output_clock_signals_8c.html | 137 +++ .../html/cs__ex1__output_clock_signals_8c.js | 4 + ...__ex1__output_clock_signals_8c_source.html | 187 ++++ .../html/cs__ex2___d_c_o16_m_hz_8c.html | 162 ++++ .../html/cs__ex2___d_c_o16_m_hz_8c.js | 5 + .../cs__ex2___d_c_o16_m_hz_8c_source.html | 213 +++++ .../html/cs__ex2___d_c_o24_m_hz_8c.html | 177 ++++ .../html/cs__ex2___d_c_o24_m_hz_8c.js | 5 + .../cs__ex2___d_c_o24_m_hz_8c_source.html | 191 ++++ .../cs__ex2___v_l_o_sources_m_c_l_k_8c.html | 224 +++++ .../cs__ex2___v_l_o_sources_m_c_l_k_8c.js | 7 + ...ex2___v_l_o_sources_m_c_l_k_8c_source.html | 226 +++++ .../cs__ex2__calculate_clock_signals_8c.html | 139 +++ .../cs__ex2__calculate_clock_signals_8c.js | 4 + ...x2__calculate_clock_signals_8c_source.html | 190 ++++ .../html/cs__ex3___x_t1_fault_8c.html | 219 +++++ .../html/cs__ex3___x_t1_fault_8c.js | 7 + .../html/cs__ex3___x_t1_fault_8c_source.html | 313 +++++++ .../cs__ex3___x_t1_sources_a_c_l_k_8c.html | 205 +++++ .../html/cs__ex3___x_t1_sources_a_c_l_k_8c.js | 6 + ..._ex3___x_t1_sources_a_c_l_k_8c_source.html | 224 +++++ ...__ex4___x_t_sources_d_c_o_internal_8c.html | 307 +++++++ ...cs__ex4___x_t_sources_d_c_o_internal_8c.js | 11 + ..._x_t_sources_d_c_o_internal_8c_source.html | 272 ++++++ Generated Documentation/html/ctsd16_8c.html | 2 +- .../html/ctsd16_8c_source.html | 13 +- Generated Documentation/html/ctsd16_8h.html | 2 +- .../html/ctsd16_8h_source.html | 5 +- .../ctsd16__ex1__single_ch_cont_conv_8c.html | 191 ++++ .../ctsd16__ex1__single_ch_cont_conv_8c.js | 6 + ...6__ex1__single_ch_cont_conv_8c_source.html | 245 +++++ ...ex2__single_ch_single_conv_polling_8c.html | 174 ++++ ...__ex2__single_ch_single_conv_polling_8c.js | 5 + ...ngle_ch_single_conv_polling_8c_source.html | 213 +++++ ...3__single_ch_single_conv_interrupt_8c.html | 198 +++++ ...ex3__single_ch_single_conv_interrupt_8c.js | 6 + ...le_ch_single_conv_interrupt_8c_source.html | 239 +++++ .../ctsd16__ex4__internal_temp_sensor_8c.html | 198 +++++ .../ctsd16__ex4__internal_temp_sensor_8c.js | 6 + ...__ex4__internal_temp_sensor_8c_source.html | 260 ++++++ .../ctsd16__ex5__three_ch_single_conv_8c.html | 261 ++++++ .../ctsd16__ex5__three_ch_single_conv_8c.js | 9 + ...__ex5__three_ch_single_conv_8c_source.html | 254 ++++++ Generated Documentation/html/dac12__a_8c.html | 2 +- .../html/dac12__a_8c_source.html | 19 +- Generated Documentation/html/dac12__a_8h.html | 2 +- .../html/dac12__a_8h_source.html | 5 +- .../html/dac12__a__ex1__1_v5_out_8c.html | 156 ++++ .../html/dac12__a__ex1__1_v5_out_8c.js | 4 + .../dac12__a__ex1__1_v5_out_8c_source.html | 179 ++++ .../html/dac12__a__ex2__0_v75_out_8c.html | 156 ++++ .../html/dac12__a__ex2__0_v75_out_8c.js | 4 + .../dac12__a__ex2__0_v75_out_8c_source.html | 197 +++++ .../dac12__a__ex3__positive_ramp_int_8c.html | 161 ++++ .../dac12__a__ex3__positive_ramp_int_8c.js | 5 + ...__a__ex3__positive_ramp_int_8c_source.html | 239 +++++ .../html/dac12__a__ex4__grouped_8c.html | 137 +++ .../html/dac12__a__ex4__grouped_8c.js | 4 + .../dac12__a__ex4__grouped_8c_source.html | 220 +++++ .../html/design_choices.html | 20 +- .../html/device_specifications.html | 56 +- .../dir_0175f9cbb4633b514b5514f21bec03a0.html | 115 +++ .../dir_0175f9cbb4633b514b5514f21bec03a0.js | 6 + .../dir_0201fb0a75bfb001181cd762468718da.html | 2 +- .../dir_026cf2b502f8bbf86cefdc24803245a7.html | 111 +++ .../dir_026cf2b502f8bbf86cefdc24803245a7.js | 4 + .../dir_0471030c6c40e74c2aa9e23909a0aefd.html | 111 +++ .../dir_0471030c6c40e74c2aa9e23909a0aefd.js | 4 + .../dir_04f69be1ff08eefe392fcaf09da102e4.html | 111 +++ .../dir_04f69be1ff08eefe392fcaf09da102e4.js | 4 + .../dir_06231492a7d233fc4a83ba7357554081.html | 117 +++ .../dir_06231492a7d233fc4a83ba7357554081.js | 7 + .../dir_07e7a19cced4ca994622ecf053dbaebb.html | 139 +++ .../dir_07e7a19cced4ca994622ecf053dbaebb.js | 18 + .../dir_082cefa607877865df28aba5f85bc6fe.html | 139 +++ .../dir_082cefa607877865df28aba5f85bc6fe.js | 18 + .../dir_0951772c4bb174d3e698a7a501f39205.html | 111 +++ .../dir_0951772c4bb174d3e698a7a501f39205.js | 4 + .../dir_0bf1e8c1a0485b32b4ea3855c05c5e9f.html | 113 +++ .../dir_0bf1e8c1a0485b32b4ea3855c05c5e9f.js | 5 + .../dir_10079ac620cbbd74c446f76890731701.html | 113 +++ .../dir_10079ac620cbbd74c446f76890731701.js | 5 + .../dir_109b57299c2f7cc571c23ddcc06a7c2e.html | 111 +++ .../dir_109b57299c2f7cc571c23ddcc06a7c2e.js | 4 + .../dir_11a78232b6b0b2534a0769fc18e029c9.html | 117 +++ .../dir_11a78232b6b0b2534a0769fc18e029c9.js | 7 + .../dir_14fcb402065fc02656148105e0b88af8.html | 111 +++ .../dir_14fcb402065fc02656148105e0b88af8.js | 4 + .../dir_1565a4596743f346939089b01b134b85.html | 115 +++ .../dir_1565a4596743f346939089b01b134b85.js | 6 + .../dir_1726e59edf0cdfc0cd477fe472a1d541.html | 111 +++ .../dir_1726e59edf0cdfc0cd477fe472a1d541.js | 4 + .../dir_17daed8eeb6fb5022fcc96df7cc52430.html | 111 +++ .../dir_17daed8eeb6fb5022fcc96df7cc52430.js | 4 + .../dir_1b03434fe1954bcac8b5ee387e9cbef9.html | 111 +++ .../dir_1b03434fe1954bcac8b5ee387e9cbef9.js | 4 + .../dir_1bbd2b7171cd7cf40620edab77a45e65.html | 119 +++ .../dir_1bbd2b7171cd7cf40620edab77a45e65.js | 8 + .../dir_1dc93fad658d497d540ca6f49d4eae01.html | 111 +++ .../dir_1dc93fad658d497d540ca6f49d4eae01.js | 4 + .../dir_1e8a087624731203a4e03c56185a5ede.html | 121 +++ .../dir_1e8a087624731203a4e03c56185a5ede.js | 9 + .../dir_1f3a4db757d3e95a006fc493c3318364.html | 111 +++ .../dir_1f3a4db757d3e95a006fc493c3318364.js | 4 + .../dir_1fb5ef0779154eaf786832488fc134cb.html | 129 +++ .../dir_1fb5ef0779154eaf786832488fc134cb.js | 13 + .../dir_21f3df333188901ff8460d06725eaffa.html | 115 +++ .../dir_21f3df333188901ff8460d06725eaffa.js | 6 + .../dir_25c248bdb2c4a10c020f8b7aee9fc291.html | 111 +++ .../dir_25c248bdb2c4a10c020f8b7aee9fc291.js | 4 + .../dir_27f6d00ac9f631b8de85eccb4b9708f1.html | 113 +++ .../dir_27f6d00ac9f631b8de85eccb4b9708f1.js | 5 + .../dir_295ec522445a072381cce51588ae06de.html | 117 +++ .../dir_295ec522445a072381cce51588ae06de.js | 7 + .../dir_2aaf424bbcb07f5dded9ec249652df2c.html | 111 +++ .../dir_2aaf424bbcb07f5dded9ec249652df2c.js | 4 + .../dir_2b7e865b343d6334dab389a0c4067e85.html | 111 +++ .../dir_2b7e865b343d6334dab389a0c4067e85.js | 4 + .../dir_2bcdb68feb241a3616b904a7e7f95389.html | 117 +++ .../dir_2bcdb68feb241a3616b904a7e7f95389.js | 7 + .../dir_2dd3fc5c5508b4aa7f7cc27f9032e4c2.html | 151 ++++ .../dir_2dd3fc5c5508b4aa7f7cc27f9032e4c2.js | 24 + .../dir_2e61e066929921851158d646dc727247.html | 158 ++++ .../dir_2e61e066929921851158d646dc727247.js | 26 + .../dir_302d4a0d9a31e1dff21c7c222f7dfd5d.html | 113 +++ .../dir_302d4a0d9a31e1dff21c7c222f7dfd5d.js | 5 + .../dir_316389d960a63be80b1f1816e0c22eae.html | 187 ++++ .../dir_316389d960a63be80b1f1816e0c22eae.js | 42 + .../dir_31688d51ab3625fd6f143fd30cc4d7bb.html | 111 +++ .../dir_31688d51ab3625fd6f143fd30cc4d7bb.js | 4 + .../dir_3225291aa21e87c4bb2bfb83325021b3.html | 113 +++ .../dir_3225291aa21e87c4bb2bfb83325021b3.js | 5 + .../dir_3645d7f8031073ad138ae29d5db24eae.html | 111 +++ .../dir_3645d7f8031073ad138ae29d5db24eae.js | 4 + .../dir_3742855ec19362cf25065527c1fc030e.html | 111 +++ .../dir_3742855ec19362cf25065527c1fc030e.js | 4 + .../dir_3911d8ee7cbc2334cb3f1227242ecfb5.html | 111 +++ .../dir_3911d8ee7cbc2334cb3f1227242ecfb5.js | 4 + .../dir_3944c9284a587c1f4257344ed41687e0.html | 117 +++ .../dir_3944c9284a587c1f4257344ed41687e0.js | 7 + .../dir_3aaa32de3f366737f4163401f25ad36a.html | 125 +++ .../dir_3aaa32de3f366737f4163401f25ad36a.js | 11 + .../dir_3c028bf27ff0ca18e6fef1c96c0b15e6.html | 111 +++ .../dir_3c028bf27ff0ca18e6fef1c96c0b15e6.js | 4 + .../dir_3fba8f4249fcded8acf0d58cb4b2908c.html | 115 +++ .../dir_3fba8f4249fcded8acf0d58cb4b2908c.js | 6 + .../dir_41b60d89ff3e63ab46a3e1149f733e71.html | 113 +++ .../dir_41b60d89ff3e63ab46a3e1149f733e71.js | 5 + .../dir_4336da0f5495bbaf9d3e5dbf6dc34a3b.html | 111 +++ .../dir_4336da0f5495bbaf9d3e5dbf6dc34a3b.js | 4 + .../dir_45fca41ab41fdacd455cd61e009e74cc.html | 2 +- .../dir_4600d35be30302c4f82c762933a95149.html | 111 +++ .../dir_4600d35be30302c4f82c762933a95149.js | 4 + .../dir_46b95d24c0abe1f4457728e63ee00541.html | 2 +- .../dir_46bb5cba78f3d659357596b06de24bf6.html | 113 +++ .../dir_46bb5cba78f3d659357596b06de24bf6.js | 5 + .../dir_4b117179b94f57436657819294870333.html | 113 +++ .../dir_4b117179b94f57436657819294870333.js | 5 + .../dir_4dfbf0dfe91a70509baf4d63dfcfcc89.html | 129 +++ .../dir_4dfbf0dfe91a70509baf4d63dfcfcc89.js | 13 + .../dir_4e9c05acfa2c3671b8618fcb95d57d96.html | 2 +- .../dir_510be4f72cc28193897cc86401cba96f.html | 115 +++ .../dir_510be4f72cc28193897cc86401cba96f.js | 6 + .../dir_543ba87a51cfd72533030917770f2e9b.html | 119 +++ .../dir_543ba87a51cfd72533030917770f2e9b.js | 8 + .../dir_5557d2dfca73451af42ecb1cc3f4abba.html | 111 +++ .../dir_5557d2dfca73451af42ecb1cc3f4abba.js | 4 + .../dir_5cb3408a2640a05bbe5a2bd7ac1425c0.html | 123 +++ .../dir_5cb3408a2640a05bbe5a2bd7ac1425c0.js | 10 + .../dir_5d100c2ee59e1240a58e5c289fb89725.html | 115 +++ .../dir_5d100c2ee59e1240a58e5c289fb89725.js | 6 + .../dir_605117065d7c8c97aabf9f28515eba73.html | 127 +++ .../dir_605117065d7c8c97aabf9f28515eba73.js | 12 + .../dir_61af95113b1c3b9440ec0074b124f011.html | 121 +++ .../dir_61af95113b1c3b9440ec0074b124f011.js | 9 + .../dir_630fcb25634efa01e994e9aef2f3e6ee.html | 129 +++ .../dir_630fcb25634efa01e994e9aef2f3e6ee.js | 13 + .../dir_634a8ed938b77d81360973e3e254e296.html | 119 +++ .../dir_634a8ed938b77d81360973e3e254e296.js | 8 + .../dir_671c42cbbb63ff19748c8b235d022dd2.html | 111 +++ .../dir_671c42cbbb63ff19748c8b235d022dd2.js | 4 + .../dir_6a614e991455c38c24c39f1c281482b8.html | 111 +++ .../dir_6a614e991455c38c24c39f1c281482b8.js | 4 + .../dir_6ad900e8c05a48e8be1ee4ac03e4b4f7.html | 111 +++ .../dir_6ad900e8c05a48e8be1ee4ac03e4b4f7.js | 4 + .../dir_6b2cccbd1d15715bde7f0ce90277f7bd.html | 111 +++ .../dir_6b2cccbd1d15715bde7f0ce90277f7bd.js | 4 + .../dir_6b9671e3c9b220273878dafaffd150ca.html | 113 +++ .../dir_6b9671e3c9b220273878dafaffd150ca.js | 5 + .../dir_6cc751a9e685a986d41d35de353de328.html | 2 +- .../dir_6da89819271f0a19271417f22567ac14.html | 121 +++ .../dir_6da89819271f0a19271417f22567ac14.js | 9 + .../dir_6dd7a4a9281b42b5ea66482ce4ab570d.html | 113 +++ .../dir_6dd7a4a9281b42b5ea66482ce4ab570d.js | 5 + .../dir_70428d3c5958c16802133545478a5cfb.html | 2 +- .../dir_70714d2aca86afc563a34e5a9827e459.html | 113 +++ .../dir_70714d2aca86afc563a34e5a9827e459.js | 5 + .../dir_72b3b577103c4e1d818c29293ca64182.html | 139 +++ .../dir_72b3b577103c4e1d818c29293ca64182.js | 18 + .../dir_749f43066334c41d074768d87138b910.html | 115 +++ .../dir_749f43066334c41d074768d87138b910.js | 6 + .../dir_74d81e3051d166463177e7d329645fd7.html | 117 +++ .../dir_74d81e3051d166463177e7d329645fd7.js | 7 + .../dir_759b7552192ad4c73f4203223d9fa7bd.html | 111 +++ .../dir_759b7552192ad4c73f4203223d9fa7bd.js | 4 + .../dir_762ab1aaffcdc16c534d7f44ec94ed85.html | 117 +++ .../dir_762ab1aaffcdc16c534d7f44ec94ed85.js | 7 + .../dir_779215781e0c56b2dbe71db7dc4ffde1.html | 111 +++ .../dir_779215781e0c56b2dbe71db7dc4ffde1.js | 4 + .../dir_7795a02a4813dcd036f04e5f7854f185.html | 2 +- .../dir_78cb9699776baeaa5a3078007071323f.html | 115 +++ .../dir_78cb9699776baeaa5a3078007071323f.js | 6 + .../dir_7d80b55b8874981d2c05fea5bbc460de.html | 135 +++ .../dir_7d80b55b8874981d2c05fea5bbc460de.js | 16 + .../dir_7e35627299eadc140fa9f5b7bf8b752f.html | 115 +++ .../dir_7e35627299eadc140fa9f5b7bf8b752f.js | 8 + .../dir_7f0790c84fb90bf7e23bc1b5170de075.html | 113 +++ .../dir_7f0790c84fb90bf7e23bc1b5170de075.js | 5 + .../dir_7f3d2c3741e3cebf940be7b1b5e1e296.html | 113 +++ .../dir_7f3d2c3741e3cebf940be7b1b5e1e296.js | 5 + .../dir_833dd6cfcfb93ae3949f725b30f9f0b3.html | 121 +++ .../dir_833dd6cfcfb93ae3949f725b30f9f0b3.js | 9 + .../dir_843369d2751018e7d78858c9a71e64cd.html | 111 +++ .../dir_843369d2751018e7d78858c9a71e64cd.js | 4 + .../dir_85d95bcfdae2672eb6e746472fb99deb.html | 111 +++ .../dir_85d95bcfdae2672eb6e746472fb99deb.js | 4 + .../dir_88765eb59bb63182d83beb82b232fd6a.html | 111 +++ .../dir_88765eb59bb63182d83beb82b232fd6a.js | 4 + .../dir_8c50fd412e5423dbdcf739a7e016f159.html | 113 +++ .../dir_8c50fd412e5423dbdcf739a7e016f159.js | 5 + .../dir_93fd190f9784dd3dd42f9b99be91f00f.html | 115 +++ .../dir_93fd190f9784dd3dd42f9b99be91f00f.js | 6 + .../dir_98608e1fdd8c96ffd63941cc9a97da72.html | 113 +++ .../dir_98608e1fdd8c96ffd63941cc9a97da72.js | 5 + .../dir_9ce6686f5bf5a431b61c5e3d2d4edf5f.html | 113 +++ .../dir_9ce6686f5bf5a431b61c5e3d2d4edf5f.js | 5 + .../dir_a154d89777d2ada6b1db063fa79917f4.html | 117 +++ .../dir_a154d89777d2ada6b1db063fa79917f4.js | 7 + .../dir_a1bfd36036f718300d642d927b53a244.html | 119 +++ .../dir_a1bfd36036f718300d642d927b53a244.js | 8 + .../dir_a5460467d48412bac8a5d370a0db913c.html | 111 +++ .../dir_a5460467d48412bac8a5d370a0db913c.js | 4 + .../dir_a59373bc14508c66c1aa06e8d8bc8f86.html | 111 +++ .../dir_a59373bc14508c66c1aa06e8d8bc8f86.js | 4 + .../dir_a7080a07f6c13140b95a96f2e4f9f58e.html | 117 +++ .../dir_a7080a07f6c13140b95a96f2e4f9f58e.js | 7 + .../dir_a8437566e3ea5ecb62f55f67b9e4dc7a.html | 111 +++ .../dir_a8437566e3ea5ecb62f55f67b9e4dc7a.js | 4 + .../dir_a8c71ea87835c0d8a05c4d4cfe708aa4.html | 113 +++ .../dir_a8c71ea87835c0d8a05c4d4cfe708aa4.js | 5 + .../dir_a995487c8d63d1383a78289498ad6a65.html | 111 +++ .../dir_a995487c8d63d1383a78289498ad6a65.js | 4 + .../dir_ab0c921bdd9a9e5f1288a99c079e4979.html | 111 +++ .../dir_ab0c921bdd9a9e5f1288a99c079e4979.js | 4 + .../dir_ae8b9a58c4fbe997ebbfd3d6682707a5.html | 111 +++ .../dir_ae8b9a58c4fbe997ebbfd3d6682707a5.js | 4 + .../dir_af9069c38f2c19d58b3a8be371ba0f22.html | 111 +++ .../dir_af9069c38f2c19d58b3a8be371ba0f22.js | 4 + .../dir_afba8e1a2b546f24731d7f7c3e5b6ade.html | 115 +++ .../dir_afba8e1a2b546f24731d7f7c3e5b6ade.js | 6 + .../dir_aff2a07b8353ec749f36856f01c7d4a6.html | 113 +++ .../dir_aff2a07b8353ec749f36856f01c7d4a6.js | 5 + .../dir_b3573a60974c7f178e0fb0a6a8a6c75f.html | 117 +++ .../dir_b3573a60974c7f178e0fb0a6a8a6c75f.js | 7 + .../dir_b365eb187f183b5df72a97d850f7180a.html | 111 +++ .../dir_b365eb187f183b5df72a97d850f7180a.js | 4 + .../dir_b4786a23037e6930f849d1b2151b2e07.html | 115 +++ .../dir_b4786a23037e6930f849d1b2151b2e07.js | 6 + .../dir_b65b9f777b5a5f6237a6c760eefe3795.html | 111 +++ .../dir_b65b9f777b5a5f6237a6c760eefe3795.js | 4 + .../dir_b74c14a59839bde55b254b6580d7dfe6.html | 111 +++ .../dir_b74c14a59839bde55b254b6580d7dfe6.js | 4 + .../dir_b9248ce9a2767a12c61d4d45f2280b32.html | 113 +++ .../dir_b9248ce9a2767a12c61d4d45f2280b32.js | 5 + .../dir_bb5bcff7a5bad458d8a7e628656fad56.html | 111 +++ .../dir_bb5bcff7a5bad458d8a7e628656fad56.js | 4 + .../dir_bde32bf976401edbce144c1ca78437b0.html | 111 +++ .../dir_bde32bf976401edbce144c1ca78437b0.js | 4 + .../dir_be8d20f8b92420c4109550e14991a9fb.html | 119 +++ .../dir_be8d20f8b92420c4109550e14991a9fb.js | 8 + .../dir_bea013136ac6d3f377c968c2beaaa893.html | 129 +++ .../dir_bea013136ac6d3f377c968c2beaaa893.js | 13 + .../dir_c03632983561d195ae60c8cc9da44571.html | 111 +++ .../dir_c03632983561d195ae60c8cc9da44571.js | 4 + .../dir_c04c9bebcd5da6ee4826760db194f738.html | 111 +++ .../dir_c04c9bebcd5da6ee4826760db194f738.js | 4 + .../dir_c0642c19cc2587483da76293a392fed9.html | 117 +++ .../dir_c0642c19cc2587483da76293a392fed9.js | 7 + .../dir_c161f571c8319861135bb5a2c903edf9.html | 2 +- .../dir_c2512795e3a4512bee9d568cc25983f1.html | 117 +++ .../dir_c2512795e3a4512bee9d568cc25983f1.js | 7 + .../dir_c252896fd4388b12116c6321cce38484.html | 125 +++ .../dir_c252896fd4388b12116c6321cce38484.js | 11 + .../dir_c35f050220a147549410dacfeb76a0d7.html | 115 +++ .../dir_c35f050220a147549410dacfeb76a0d7.js | 6 + .../dir_c3d2eb9dde46f0ea73f8afe6370f2777.html | 113 +++ .../dir_c3d2eb9dde46f0ea73f8afe6370f2777.js | 5 + .../dir_c3d61c7657b31db0d37f8715a88169d1.html | 111 +++ .../dir_c3d61c7657b31db0d37f8715a88169d1.js | 4 + .../dir_c44d038dcc0269d9192477c7773019a9.html | 111 +++ .../dir_c44d038dcc0269d9192477c7773019a9.js | 4 + .../dir_c52bf2e4596f9f72c1d98ba6dcbced26.html | 113 +++ .../dir_c52bf2e4596f9f72c1d98ba6dcbced26.js | 6 + .../dir_ceb3708e9b274deb981df4e08a597703.html | 121 +++ .../dir_ceb3708e9b274deb981df4e08a597703.js | 9 + .../dir_d1cdc94e4743062d51d03f2ab07fd0d2.html | 113 +++ .../dir_d1cdc94e4743062d51d03f2ab07fd0d2.js | 5 + .../dir_d34ca186a80f92f31027d832db95126c.html | 111 +++ .../dir_d34ca186a80f92f31027d832db95126c.js | 4 + .../dir_d35b6de7ba3ee658750082a39610a085.html | 111 +++ .../dir_d35b6de7ba3ee658750082a39610a085.js | 4 + .../dir_d499546f32b62e621cbb46a9bd7235a1.html | 129 +++ .../dir_d499546f32b62e621cbb46a9bd7235a1.js | 13 + .../dir_d87f7b488c593ccac8e50b6adb209b28.html | 111 +++ .../dir_d87f7b488c593ccac8e50b6adb209b28.js | 4 + .../dir_d9c187d8ae5f0bd15615fe91d1359a4a.html | 119 +++ .../dir_d9c187d8ae5f0bd15615fe91d1359a4a.js | 8 + .../dir_dbe3accc307b9bf6afea11f2c193cb27.html | 113 +++ .../dir_dbe3accc307b9bf6afea11f2c193cb27.js | 5 + .../dir_dd0a5b517506d8c0f057cfaecb7b3dc0.html | 111 +++ .../dir_dd0a5b517506d8c0f057cfaecb7b3dc0.js | 4 + .../dir_e05a0e25cf09c63f5adca92ff25f8b76.html | 111 +++ .../dir_e05a0e25cf09c63f5adca92ff25f8b76.js | 4 + .../dir_e09fccf4effa8ccdaa55ad5954043e6e.html | 111 +++ .../dir_e09fccf4effa8ccdaa55ad5954043e6e.js | 4 + .../dir_e256ef861b355381072786cf7d6ec888.html | 139 +++ .../dir_e256ef861b355381072786cf7d6ec888.js | 18 + .../dir_e504cc91e30efc744fb3203a7e8c72ab.html | 111 +++ .../dir_e504cc91e30efc744fb3203a7e8c72ab.js | 4 + .../dir_e54074d57bcfa9665c1a30adcc935096.html | 111 +++ .../dir_e54074d57bcfa9665c1a30adcc935096.js | 4 + .../dir_e63bd246281937e955d4714b96846de6.html | 115 +++ .../dir_e63bd246281937e955d4714b96846de6.js | 6 + .../dir_e81e95489ce2e46abb84fd29d6a72d62.html | 111 +++ .../dir_e81e95489ce2e46abb84fd29d6a72d62.js | 4 + .../dir_ead3f6887c571328b70ed30eb47cb8e9.html | 119 +++ .../dir_ead3f6887c571328b70ed30eb47cb8e9.js | 8 + .../dir_eae072b88d613e8d7b5192fe7d125af6.html | 121 +++ .../dir_eae072b88d613e8d7b5192fe7d125af6.js | 9 + .../dir_eb8ca45731295244f599d183ce849a41.html | 113 +++ .../dir_eb8ca45731295244f599d183ce849a41.js | 5 + .../dir_ed3596e77998d87ed8ef810021a85e9c.html | 173 ++++ .../dir_ed3596e77998d87ed8ef810021a85e9c.js | 35 + .../dir_eec688965624bb19de0a965b56266886.html | 113 +++ .../dir_eec688965624bb19de0a965b56266886.js | 5 + .../dir_ef94255a62432ae865475b379d8bd501.html | 4 +- .../dir_ef94255a62432ae865475b379d8bd501.js | 3 +- .../dir_f48266d516bf22e0f95921002a52f5e0.html | 115 +++ .../dir_f48266d516bf22e0f95921002a52f5e0.js | 6 + .../dir_fb333e6e1aef903e906ff887888876d0.html | 111 +++ .../dir_fb333e6e1aef903e906ff887888876d0.js | 4 + .../dir_fc112d82c1af6fd1c09d247ef04c25e6.html | 111 +++ .../dir_fc112d82c1af6fd1c09d247ef04c25e6.js | 4 + .../dir_fd957caaaf9933bd05516ec5a0d9bc40.html | 119 +++ .../dir_fd957caaaf9933bd05516ec5a0d9bc40.js | 8 + .../dir_fe7c91cff9293174cda4e8ad4e82d438.html | 115 +++ .../dir_fe7c91cff9293174cda4e8ad4e82d438.js | 6 + Generated Documentation/html/dma_8c.html | 2 +- .../html/dma_8c_source.html | 21 +- Generated Documentation/html/dma_8h.html | 2 +- .../html/dma_8h_source.html | 5 +- .../dma__ex2__repeated_block_u_a_r_t_8c.html | 139 +++ .../dma__ex2__repeated_block_u_a_r_t_8c.js | 4 + ...ex2__repeated_block_u_a_r_t_8c_source.html | 240 +++++ .../dma__ex3__single_transfer_s_p_i_8c.html | 231 +++++ .../dma__ex3__single_transfer_s_p_i_8c.js | 7 + ..._ex3__single_transfer_s_p_i_8c_source.html | 331 +++++++ .../dma__ex4__single_transfer_a_d_c12_8c.html | 206 +++++ .../dma__ex4__single_transfer_a_d_c12_8c.js | 6 + ...x4__single_transfer_a_d_c12_8c_source.html | 332 +++++++ .../html/documentation_guide.html | 12 +- .../html/driverlib_8h.html | 2 +- .../html/driverlib_8h_source.html | 2 +- ..._output_toggle_vcomp_vs_vref1_85_v_8c.html | 139 +++ ...1__output_toggle_vcomp_vs_vref1_85_v_8c.js | 4 + ..._toggle_vcomp_vs_vref1_85_v_8c_source.html | 214 +++++ ...omp__ex2__interrupt_vcomp_vs1_85_v_8c.html | 161 ++++ ...ecomp__ex2__interrupt_vcomp_vs1_85_v_8c.js | 5 + ...2__interrupt_vcomp_vs1_85_v_8c_source.html | 264 ++++++ .../html/eusci__a__spi_8c.html | 2 +- .../html/eusci__a__spi_8c_source.html | 36 +- .../html/eusci__a__spi_8h.html | 2 +- .../html/eusci__a__spi_8h_source.html | 12 +- .../eusci__a__spi__ex1__3_wire_master_8c.html | 208 +++++ .../eusci__a__spi__ex1__3_wire_master_8c.js | 7 + ..._a__spi__ex1__3_wire_master_8c_source.html | 241 +++++ .../eusci__a__spi__ex1__3_wire_slave_8c.html | 206 +++++ .../eusci__a__spi__ex1__3_wire_slave_8c.js | 7 + ...__a__spi__ex1__3_wire_slave_8c_source.html | 224 +++++ .../html/eusci__a__uart_8c.html | 2 +- .../html/eusci__a__uart_8c_source.html | 31 +- .../html/eusci__a__uart_8h.html | 2 +- .../html/eusci__a__uart_8h_source.html | 11 +- ..._a__uart__ex1__loopback115200_baud_8c.html | 208 +++++ ...i__a__uart__ex1__loopback115200_baud_8c.js | 7 + ...t__ex1__loopback115200_baud_8c_source.html | 256 ++++++ .../html/eusci__b__i2c_8c.html | 2 +- .../html/eusci__b__i2c_8c_source.html | 24 +- .../html/eusci__b__i2c_8h.html | 2 +- .../html/eusci__b__i2c_8h_source.html | 10 +- ...__b__i2c__ex1__master_t_x_multiple_8c.html | 184 ++++ ...ci__b__i2c__ex1__master_t_x_multiple_8c.js | 6 + ...c__ex1__master_t_x_multiple_8c_source.html | 267 ++++++ ...i__b__i2c__ex1__slave_r_x_multiple_8c.html | 202 +++++ ...sci__b__i2c__ex1__slave_r_x_multiple_8c.js | 7 + ...2c__ex1__slave_r_x_multiple_8c_source.html | 246 +++++ ...__b__i2c__ex2__master_r_x_multiple_8c.html | 206 +++++ ...ci__b__i2c__ex2__master_r_x_multiple_8c.js | 7 + ...c__ex2__master_r_x_multiple_8c_source.html | 311 +++++++ ...i__b__i2c__ex2__slave_t_x_multiple_8c.html | 232 +++++ ...sci__b__i2c__ex2__slave_t_x_multiple_8c.js | 8 + ...2c__ex2__slave_t_x_multiple_8c_source.html | 277 ++++++ .../html/eusci__b__spi_8c.html | 2 +- .../html/eusci__b__spi_8c_source.html | 36 +- .../html/eusci__b__spi_8h.html | 2 +- .../html/eusci__b__spi_8h_source.html | 12 +- .../eusci__b__spi__ex1__3_wire_master_8c.html | 208 +++++ .../eusci__b__spi__ex1__3_wire_master_8c.js | 7 + ..._b__spi__ex1__3_wire_master_8c_source.html | 242 +++++ .../eusci__b__spi__ex1__3_wire_slave_8c.html | 206 +++++ .../eusci__b__spi__ex1__3_wire_slave_8c.js | 7 + ...__b__spi__ex1__3_wire_slave_8c_source.html | 224 +++++ Generated Documentation/html/files.html | 745 ++++++++++++++-- Generated Documentation/html/files_dup.js | 1 + Generated Documentation/html/flashctl_8c.html | 2 +- .../html/flashctl_8c_source.html | 12 +- Generated Documentation/html/flashctl_8h.html | 2 +- .../html/flashctl_8h_source.html | 2 +- .../flashctl__ex1__info_segment_write_8c.html | 225 +++++ .../flashctl__ex1__info_segment_write_8c.js | 8 + ...tl__ex1__info_segment_write_8c_source.html | 202 +++++ .../flashctl__ex1__write_to_info_b_8c.html | 267 ++++++ .../html/flashctl__ex1__write_to_info_b_8c.js | 8 + ...shctl__ex1__write_to_info_b_8c_source.html | 253 ++++++ .../flashctl__ex2__erase_copy_write_8c.html | 304 +++++++ .../flashctl__ex2__erase_copy_write_8c.js | 11 + ...hctl__ex2__erase_copy_write_8c_source.html | 288 ++++++ .../flashctl__ex3__long_word_write_8c.html | 199 +++++ .../html/flashctl__ex3__long_word_write_8c.js | 6 + ...shctl__ex3__long_word_write_8c_source.html | 201 +++++ .../flashctl__ex4__write_to_info_a_8c.html | 267 ++++++ .../html/flashctl__ex4__write_to_info_a_8c.js | 8 + ...shctl__ex4__write_to_info_a_8c_source.html | 257 ++++++ .../html/framctl__a__ex1__write_8c.html | 150 ++++ .../html/framctl__a__ex1__write_8c.js | 4 + .../framctl__a__ex1__write_8c_source.html | 210 +++++ Generated Documentation/html/functions.html | 105 +++ .../html/functions_func.html | 105 +++ Generated Documentation/html/globals.html | 56 +- Generated Documentation/html/globals_a.html | 174 ++++ Generated Documentation/html/globals_b.html | 128 +++ Generated Documentation/html/globals_c.html | 230 +++++ Generated Documentation/html/globals_d.html | 211 +++++ .../html/globals_defs.html | 42 +- Generated Documentation/html/globals_defs.js | 17 + .../html/globals_defs_b.html | 113 +++ .../html/globals_defs_c.html | 149 ++++ .../html/globals_defs_d.html | 158 ++++ .../html/globals_defs_f.html | 110 +++ .../html/globals_defs_g.html | 110 +++ .../html/globals_defs_h.html | 116 +++ .../html/globals_defs_i.html | 120 +++ .../html/globals_defs_l.html | 107 +++ .../html/globals_defs_n.html | 128 +++ .../html/globals_defs_r.html | 114 +++ .../html/globals_defs_s.html | 169 ++++ .../html/globals_defs_t.html | 153 ++++ .../html/globals_defs_u.html | 136 +++ Generated Documentation/html/globals_dup.js | 25 + Generated Documentation/html/globals_e.html | 113 +++ Generated Documentation/html/globals_f.html | 122 +++ .../html/globals_func.html | 20 +- Generated Documentation/html/globals_func.js | 20 + .../html/globals_func_a.html | 134 +++ .../html/globals_func_c.html | 125 +++ .../html/globals_func_d.html | 118 +++ .../html/globals_func_e.html | 110 +++ .../html/globals_func_g.html | 110 +++ .../html/globals_func_h.html | 107 +++ .../html/globals_func_l.html | 108 +++ .../html/globals_func_m.html | 525 +++++++++++ .../html/globals_func_n.html | 114 +++ .../html/globals_func_p.html | 116 +++ .../html/globals_func_r.html | 131 +++ .../html/globals_func_s.html | 123 +++ .../html/globals_func_t.html | 158 ++++ .../html/globals_func_u.html | 189 ++++ .../html/globals_func_v.html | 107 +++ .../html/globals_func_w.html | 128 +++ Generated Documentation/html/globals_g.html | 116 +++ Generated Documentation/html/globals_h.html | 122 +++ Generated Documentation/html/globals_i.html | 137 +++ Generated Documentation/html/globals_l.html | 114 +++ Generated Documentation/html/globals_m.html | 543 ++++++++++++ Generated Documentation/html/globals_n.html | 150 ++++ Generated Documentation/html/globals_o.html | 111 +++ Generated Documentation/html/globals_p.html | 160 ++++ Generated Documentation/html/globals_r.html | 332 +++++++ Generated Documentation/html/globals_s.html | 228 +++++ Generated Documentation/html/globals_t.html | 314 +++++++ Generated Documentation/html/globals_u.html | 221 +++++ Generated Documentation/html/globals_v.html | 110 +++ .../html/globals_vars.html | 144 +++ Generated Documentation/html/globals_vars.js | 22 + .../html/globals_vars_b.html | 119 +++ .../html/globals_vars_c.html | 164 ++++ .../html/globals_vars_d.html | 143 +++ .../html/globals_vars_e.html | 107 +++ .../html/globals_vars_f.html | 116 +++ .../html/globals_vars_h.html | 107 +++ .../html/globals_vars_i.html | 121 +++ .../html/globals_vars_l.html | 107 +++ .../html/globals_vars_m.html | 122 +++ .../html/globals_vars_n.html | 116 +++ .../html/globals_vars_o.html | 111 +++ .../html/globals_vars_p.html | 148 ++++ .../html/globals_vars_r.html | 295 ++++++ .../html/globals_vars_s.html | 144 +++ .../html/globals_vars_t.html | 211 +++++ .../html/globals_vars_v.html | 107 +++ .../html/globals_vars_w.html | 107 +++ .../html/globals_vars_x.html | 113 +++ Generated Documentation/html/globals_w.html | 131 +++ Generated Documentation/html/globals_x.html | 113 +++ Generated Documentation/html/gpio_8c.html | 2 +- .../html/gpio_8c_source.html | 8 +- Generated Documentation/html/gpio_8h.html | 2 +- .../html/gpio_8h_source.html | 8 +- .../html/gpio__ex1__toggle_output_8c.html | 139 +++ .../html/gpio__ex1__toggle_output_8c.js | 4 + .../gpio__ex1__toggle_output_8c_source.html | 180 ++++ .../html/gpio__ex2__input_interrupt_8c.html | 159 ++++ .../html/gpio__ex2__input_interrupt_8c.js | 5 + .../gpio__ex2__input_interrupt_8c_source.html | 216 +++++ .../html/group__adc10__a__api.html | 2 +- .../html/group__adc12__a__api.html | 2 +- .../html/group__aes__api.html | 2 +- .../html/group__battbak__api.html | 2 +- .../html/group__comp__b__api.html | 2 +- .../html/group__crc__api.html | 2 +- .../html/group__ctsd16__api.html | 2 +- .../html/group__dac12__a__api.html | 2 +- .../html/group__dac12__examples__list.html | 123 +++ .../html/group__dma__api.html | 2 +- .../html/group__eusci__a__spi__api.html | 2 +- .../html/group__eusci__a__uart__api.html | 2 +- .../html/group__eusci__b__i2c__api.html | 2 +- .../html/group__eusci__b__spi__api.html | 2 +- .../html/group__flashctl__api.html | 2 +- .../html/group__gpio__api.html | 2 +- .../html/group__lcd__b__api.html | 2 +- .../html/group__lcd__c__api.html | 2 +- .../html/group__ldopwr__api.html | 2 +- .../html/group__mpy32__api.html | 2 +- .../html/group__oa__api.html | 2 +- .../html/group__pmap__api.html | 2 +- .../html/group__pmm__api.html | 2 +- .../html/group__ram__api.html | 2 +- .../html/group__ref__api.html | 2 +- .../html/group__ref__examples__list.html | 123 +++ .../html/group__rtc__a__api.html | 2 +- .../html/group__rtc__b__api.html | 2 +- .../html/group__rtc__c__api.html | 2 +- .../html/group__sd24__b__api.html | 2 +- .../html/group__sfr__api.html | 2 +- .../html/group__sysctl__api.html | 2 +- .../html/group__tec__api.html | 2 +- .../html/group__timer__a__api.html | 2 +- .../html/group__timer__b__api.html | 2 +- .../html/group__timer__d__api.html | 2 +- .../html/group__tlv__api.html | 2 +- .../html/group__ucs__api.html | 2 +- .../html/group__usci__a__spi__api.html | 2 +- .../html/group__usci__a__uart__api.html | 2 +- .../html/group__usci__b__i2c__api.html | 2 +- .../html/group__usci__b__spi__api.html | 2 +- .../html/group__wdt__a__api.html | 2 +- Generated Documentation/html/hardware.html | 3 +- Generated Documentation/html/hardware.js | 19 +- .../html/hspll__ex1__output__ussxtosc_8c.html | 182 ++++ .../html/hspll__ex1__output__ussxtosc_8c.js | 6 + ...spll__ex1__output__ussxtosc_8c_source.html | 248 ++++++ .../html/hw__memmap_8h.html | 2 +- .../html/hw__memmap_8h_source.html | 2 +- .../html/icc__ex1__nested_interrupt_8c.html | 309 +++++++ .../html/icc__ex1__nested_interrupt_8c.js | 9 + .../icc__ex1__nested_interrupt_8c_source.html | 327 +++++++ Generated Documentation/html/index.html | 12 +- Generated Documentation/html/lcd__b_8c.html | 2 +- .../html/lcd__b_8c_source.html | 9 +- Generated Documentation/html/lcd__b_8h.html | 2 +- .../html/lcd__b_8h_source.html | 2 +- .../html/lcd__b__ex1__4mux_8c.html | 147 +++ .../html/lcd__b__ex1__4mux_8c.js | 4 + .../html/lcd__b__ex1__4mux_8c_source.html | 203 +++++ Generated Documentation/html/lcd__c_8c.html | 2 +- .../html/lcd__c_8c_source.html | 9 +- Generated Documentation/html/lcd__c_8h.html | 2 +- .../html/lcd__c_8h_source.html | 2 +- .../html/lcd__c__ex1__4mux_8c.html | 150 ++++ .../html/lcd__c__ex1__4mux_8c.js | 4 + .../html/lcd__c__ex1__4mux_8c_source.html | 242 +++++ .../html/lcd__e__ex1__4__mux_8c.html | 148 ++++ .../html/lcd__e__ex1__4__mux_8c.js | 4 + .../html/lcd__e__ex1__4__mux_8c_source.html | 229 +++++ Generated Documentation/html/ldopwr_8c.html | 2 +- .../html/ldopwr_8c_source.html | 2 +- Generated Documentation/html/ldopwr_8h.html | 2 +- .../html/ldopwr_8h_source.html | 2 +- .../ldopwr__ex1__internal_l_d_o_power_8c.html | 181 ++++ .../ldopwr__ex1__internal_l_d_o_power_8c.js | 5 + ...__ex1__internal_l_d_o_power_8c_source.html | 229 +++++ .../html/ldopwr__ex2__software_poll_8c.html | 153 ++++ .../html/ldopwr__ex2__software_poll_8c.js | 4 + .../ldopwr__ex2__software_poll_8c_source.html | 187 ++++ ...dopwr__ex3__internal_l_d_o_enabled_8c.html | 184 ++++ .../ldopwr__ex3__internal_l_d_o_enabled_8c.js | 5 + ...ex3__internal_l_d_o_enabled_8c_source.html | 279 ++++++ Generated Documentation/html/lextab_8py.html | 2 +- .../html/lextab_8py_source.html | 2 +- Generated Documentation/html/menudata.js | 85 +- Generated Documentation/html/modules.html | 4 +- Generated Documentation/html/modules.js | 4 +- Generated Documentation/html/mpy32_8c.html | 2 +- .../html/mpy32_8c_source.html | 43 +- Generated Documentation/html/mpy32_8h.html | 2 +- .../html/mpy32_8h_source.html | 19 +- .../html/mtif__ex1__pulse_generation_8c.html | 184 ++++ .../html/mtif__ex1__pulse_generation_8c.js | 6 + ...mtif__ex1__pulse_generation_8c_source.html | 297 +++++++ .../html/namespacelextab.html | 2 +- Generated Documentation/html/namespaces.html | 2 +- .../html/namespaces_dup.js | 10 - .../html/namespaceyacctab.html | 2 +- Generated Documentation/html/navtreedata.js | 56 +- Generated Documentation/html/navtreeindex0.js | 500 +++++------ Generated Documentation/html/navtreeindex1.js | 313 +++++-- .../html/navtreeindex10.js | 145 +++ Generated Documentation/html/navtreeindex2.js | 253 ++++++ Generated Documentation/html/navtreeindex3.js | 253 ++++++ Generated Documentation/html/navtreeindex4.js | 253 ++++++ Generated Documentation/html/navtreeindex5.js | 253 ++++++ Generated Documentation/html/navtreeindex6.js | 253 ++++++ Generated Documentation/html/navtreeindex7.js | 253 ++++++ Generated Documentation/html/navtreeindex8.js | 253 ++++++ Generated Documentation/html/navtreeindex9.js | 253 ++++++ Generated Documentation/html/oa_8c.html | 2 +- .../html/oa_8c_source.html | 13 +- Generated Documentation/html/oa_8h.html | 2 +- .../html/oa_8h_source.html | 2 +- .../html/oa__ex1__general_purpose_8c.html | 139 +++ .../html/oa__ex1__general_purpose_8c.js | 4 + .../oa__ex1__general_purpose_8c_source.html | 202 +++++ .../html/oa__ex2__general_purpose_8c.html | 137 +++ .../html/oa__ex2__general_purpose_8c.js | 4 + .../oa__ex2__general_purpose_8c_source.html | 187 ++++ .../html/oa__ex3__unity_gain_buffer_8c.html | 137 +++ .../html/oa__ex3__unity_gain_buffer_8c.js | 4 + .../oa__ex3__unity_gain_buffer_8c_source.html | 194 ++++ .../html/package_8defs_8h.html | 107 +++ .../html/package_8defs_8h_source.html | 118 +++ ...i_8mcu_8msp430_8driverlib_8product_8c.html | 192 ++++ ..._ti_8mcu_8msp430_8driverlib_8product_8c.js | 7 + ...8msp430_8driverlib_8product_8c_source.html | 127 +++ Generated Documentation/html/pages.html | 8 +- Generated Documentation/html/pmap_8c.html | 2 +- .../html/pmap_8c_source.html | 14 +- Generated Documentation/html/pmap_8h.html | 2 +- .../html/pmap_8h_source.html | 5 +- .../pmap__ex1__single_runtime_config_8c.html | 198 +++++ .../pmap__ex1__single_runtime_config_8c.js | 5 + ..._ex1__single_runtime_config_8c_source.html | 273 ++++++ .../pmap__ex2__output_timer_b_signal_8c.html | 197 +++++ .../pmap__ex2__output_timer_b_signal_8c.js | 5 + ..._ex2__output_timer_b_signal_8c_source.html | 250 ++++++ ...__single_function_to_multiple_pins_8c.html | 234 +++++ ...x3__single_function_to_multiple_pins_8c.js | 6 + ...e_function_to_multiple_pins_8c_source.html | 303 +++++++ Generated Documentation/html/pmm_8c.html | 2 +- .../html/pmm_8c_source.html | 16 +- Generated Documentation/html/pmm_8h.html | 2 +- .../html/pmm_8h_source.html | 2 +- .../html/pmm__ex1__lpm4-5_8c.html | 164 ++++ .../html/pmm__ex1__lpm4-5_8c.js | 5 + .../html/pmm__ex1__lpm4-5_8c_source.html | 217 +++++ .../html/pmm__ex1__vcore3_8c.html | 179 ++++ .../html/pmm__ex1__vcore3_8c.js | 5 + .../html/pmm__ex1__vcore3_8c_source.html | 176 ++++ .../html/pmm__ex2__fast_wake_up_8c.html | 225 +++++ .../html/pmm__ex2__fast_wake_up_8c.js | 7 + .../pmm__ex2__fast_wake_up_8c_source.html | 281 ++++++ .../html/pmm__ex2__vmon1160m_v_8c.html | 163 ++++ .../html/pmm__ex2__vmon1160m_v_8c.js | 5 + .../html/pmm__ex2__vmon1160m_v_8c_source.html | 215 +++++ .../pmm__ex3__low_current_consumption_8c.html | 224 +++++ .../pmm__ex3__low_current_consumption_8c.js | 7 + ...x3__low_current_consumption_8c_source.html | 287 ++++++ .../html/power_design.html | 133 +++ Generated Documentation/html/ram_8c.html | 2 +- .../html/ram_8c_source.html | 2 +- Generated Documentation/html/ram_8h.html | 2 +- .../html/ram_8h_source.html | 2 +- .../html/ram__ex1__set_sector_off_8c.html | 205 +++++ .../html/ram__ex1__set_sector_off_8c.js | 6 + .../ram__ex1__set_sector_off_8c_source.html | 208 +++++ .../html/ram__ex1__turn_off_sector_8c.html | 200 +++++ .../html/ram__ex1__turn_off_sector_8c.js | 6 + .../ram__ex1__turn_off_sector_8c_source.html | 210 +++++ Generated Documentation/html/ref_8c.html | 2 +- .../html/ref_8c_source.html | 2 +- Generated Documentation/html/ref_8h.html | 2 +- .../html/ref_8h_source.html | 2 +- .../html/ref__a__ex1__ctl_a_d_c12_b_8c.html | 139 +++ .../html/ref__a__ex1__ctl_a_d_c12_b_8c.js | 4 + .../ref__a__ex1__ctl_a_d_c12_b_8c_source.html | 285 ++++++ .../html/ref__ex1___a_d_c12_ctl_8c.html | 139 +++ .../html/ref__ex1___a_d_c12_ctl_8c.js | 4 + .../ref__ex1___a_d_c12_ctl_8c_source.html | 236 +++++ .../html/ref__ex1__internal_reference_8c.html | 229 +++++ .../html/ref__ex1__internal_reference_8c.js | 7 + ...ef__ex1__internal_reference_8c_source.html | 366 ++++++++ Generated Documentation/html/resources.html | 133 +++ Generated Documentation/html/rtc__a_8c.html | 2 +- .../html/rtc__a_8c_source.html | 13 +- Generated Documentation/html/rtc__a_8h.html | 2 +- .../html/rtc__a_8h_source.html | 5 +- .../html/rtc__a__ex1__calendermode_8c.html | 205 +++++ .../html/rtc__a__ex1__calendermode_8c.js | 6 + .../rtc__a__ex1__calendermode_8c_source.html | 258 ++++++ .../html/rtc__a__ex2__countermode_8c.html | 176 ++++ .../html/rtc__a__ex2__countermode_8c.js | 5 + .../rtc__a__ex2__countermode_8c_source.html | 230 +++++ Generated Documentation/html/rtc__b_8c.html | 2 +- .../html/rtc__b_8c_source.html | 13 +- Generated Documentation/html/rtc__b_8h.html | 2 +- .../html/rtc__b_8h_source.html | 5 +- .../rtc__b__ex1__calendermode_l_p_m0_8c.html | 201 +++++ .../rtc__b__ex1__calendermode_l_p_m0_8c.js | 6 + ...b__ex1__calendermode_l_p_m0_8c_source.html | 249 ++++++ .../rtc__b__ex2__calendermode_l_p_m3_8c.html | 202 +++++ .../rtc__b__ex2__calendermode_l_p_m3_8c.js | 6 + ...b__ex2__calendermode_l_p_m3_8c_source.html | 255 ++++++ Generated Documentation/html/rtc__c_8c.html | 2 +- .../html/rtc__c_8c_source.html | 13 +- Generated Documentation/html/rtc__c_8h.html | 2 +- .../html/rtc__c_8h_source.html | 5 +- .../html/rtc__ex1__countmode_8c.html | 200 +++++ .../html/rtc__ex1__countmode_8c.js | 6 + .../html/rtc__ex1__countmode_8c_source.html | 223 +++++ .../html/sac__ex1__oa_g_p_mode_8c.html | 140 +++ .../html/sac__ex1__oa_g_p_mode_8c.js | 4 + .../html/sac__ex1__oa_g_p_mode_8c_source.html | 190 ++++ .../sac__ex2__unity_gain_buffer_mode_8c.html | 140 +++ .../sac__ex2__unity_gain_buffer_mode_8c.js | 4 + ...ex2__unity_gain_buffer_mode_8c_source.html | 190 ++++ .../sac__ex3__two_stage_amplifier_8c.html | 166 ++++ .../html/sac__ex3__two_stage_amplifier_8c.js | 5 + ...c__ex3__two_stage_amplifier_8c_source.html | 347 ++++++++ .../html/sac__ex4__ecomp_8c.html | 163 ++++ .../html/sac__ex4__ecomp_8c.js | 5 + .../html/sac__ex4__ecomp_8c_source.html | 313 +++++++ ...ph__a__ex3__pulse_generation_d_m_a_8c.html | 440 +++++++++ ...saph__a__ex3__pulse_generation_d_m_a_8c.js | 18 + ...ex3__pulse_generation_d_m_a_8c_source.html | 487 ++++++++++ .../html/saph__ex1__pulse_generation_8c.html | 139 +++ .../html/saph__ex1__pulse_generation_8c.js | 4 + ...saph__ex1__pulse_generation_8c_source.html | 325 +++++++ Generated Documentation/html/sd24__b_8c.html | 2 +- .../html/sd24__b_8c_source.html | 33 +- Generated Documentation/html/sd24__b_8h.html | 2 +- .../html/sd24__b_8h_source.html | 9 +- ...b__ex1__single_conv_single_channel_8c.html | 164 ++++ ...__b__ex1__single_conv_single_channel_8c.js | 5 + ..._single_conv_single_channel_8c_source.html | 222 +++++ ..._b__ex2__single_conv_channel_group_8c.html | 188 ++++ ...4__b__ex2__single_conv_channel_group_8c.js | 6 + ...__single_conv_channel_group_8c_source.html | 278 ++++++ ...__b__ex3__cont_conv_single_channel_8c.html | 207 +++++ ...24__b__ex3__cont_conv_single_channel_8c.js | 7 + ...3__cont_conv_single_channel_8c_source.html | 251 ++++++ ...ntinuous_conversion_group_channels_8c.html | 271 ++++++ ...continuous_conversion_group_channels_8c.js | 10 + ...s_conversion_group_channels_8c_source.html | 275 ++++++ ...__single_conversion_group_channels_8c.html | 188 ++++ ...x2__single_conversion_group_channels_8c.js | 6 + ...e_conversion_group_channels_8c_source.html | 265 ++++++ ...ntinuous_conversion_single_channel_8c.html | 188 ++++ ...continuous_conversion_single_channel_8c.js | 6 + ...s_conversion_single_channel_8c_source.html | 237 +++++ ..._conversion_single_channel_polling_8c.html | 164 ++++ ...le_conversion_single_channel_polling_8c.js | 5 + ...sion_single_channel_polling_8c_source.html | 216 +++++ ...onversion_single_channel_interrupt_8c.html | 208 +++++ ..._conversion_single_channel_interrupt_8c.js | 7 + ...on_single_channel_interrupt_8c_source.html | 241 +++++ ...sion_single_conversion_temp_sensor_8c.html | 208 +++++ ...ersion_single_conversion_temp_sensor_8c.js | 7 + ...ngle_conversion_temp_sensor_8c_source.html | 260 ++++++ .../html/sdhs__ex1__8msps__sampling_8c.html | 139 +++ .../html/sdhs__ex1__8msps__sampling_8c.js | 4 + .../sdhs__ex1__8msps__sampling_8c_source.html | 396 +++++++++ Generated Documentation/html/search/all_0.js | 3 +- Generated Documentation/html/search/all_1.js | 8 +- Generated Documentation/html/search/all_10.js | 78 +- Generated Documentation/html/search/all_11.js | 62 +- Generated Documentation/html/search/all_12.js | 93 +- Generated Documentation/html/search/all_13.js | 50 +- Generated Documentation/html/search/all_14.js | 6 +- Generated Documentation/html/search/all_15.js | 16 +- .../html/search/all_16.html | 37 + Generated Documentation/html/search/all_16.js | 6 + .../html/search/all_17.html | 37 + Generated Documentation/html/search/all_17.js | 5 + Generated Documentation/html/search/all_2.js | 64 +- Generated Documentation/html/search/all_3.js | 13 +- Generated Documentation/html/search/all_4.js | 82 +- Generated Documentation/html/search/all_5.js | 62 +- Generated Documentation/html/search/all_6.js | 54 +- Generated Documentation/html/search/all_7.js | 19 +- Generated Documentation/html/search/all_8.js | 17 +- Generated Documentation/html/search/all_9.js | 16 +- Generated Documentation/html/search/all_a.js | 21 +- Generated Documentation/html/search/all_b.js | 25 +- Generated Documentation/html/search/all_c.js | 36 +- Generated Documentation/html/search/all_d.js | 13 +- Generated Documentation/html/search/all_e.js | 14 +- Generated Documentation/html/search/all_f.js | 50 +- .../html/search/classes_0.html | 37 + .../html/search/classes_0.js | 4 + .../html/search/defines_0.js | 5 +- .../html/search/defines_1.js | 5 +- .../html/search/defines_2.js | 11 +- .../html/search/defines_3.js | 12 +- .../html/search/defines_4.js | 3 +- .../html/search/defines_5.js | 4 +- .../html/search/defines_6.html | 37 + .../html/search/defines_6.js | 7 + .../html/search/defines_7.html | 37 + .../html/search/defines_7.js | 8 + .../html/search/defines_8.html | 37 + .../html/search/defines_8.js | 4 + .../html/search/defines_9.html | 37 + .../html/search/defines_9.js | 10 + .../html/search/defines_a.html | 37 + .../html/search/defines_a.js | 5 + .../html/search/defines_b.html | 37 + .../html/search/defines_b.js | 10 + .../html/search/defines_c.html | 37 + .../html/search/defines_c.js | 8 + .../html/search/defines_d.html | 37 + .../html/search/defines_d.js | 10 + .../html/search/files_0.js | 5 +- .../html/search/files_1.js | 39 +- .../html/search/files_10.js | 53 +- .../html/search/files_11.js | 34 +- .../html/search/files_12.js | 3 +- .../html/search/files_13.js | 8 +- .../html/search/files_14.html | 37 + .../html/search/files_14.js | 4 + .../html/search/files_2.js | 6 +- .../html/search/files_3.js | 45 +- .../html/search/files_4.js | 24 +- .../html/search/files_5.js | 42 +- .../html/search/files_6.js | 11 +- .../html/search/files_7.js | 10 +- .../html/search/files_8.js | 3 +- .../html/search/files_9.js | 8 +- .../html/search/files_a.js | 16 +- .../html/search/files_b.js | 24 +- .../html/search/files_c.js | 9 +- .../html/search/files_d.js | 27 +- .../html/search/files_e.js | 29 +- .../html/search/files_f.js | 32 +- .../html/search/functions_0.js | 4 +- .../html/search/functions_1.html | 37 + .../html/search/functions_1.js | 9 + .../html/search/functions_10.html | 37 + .../html/search/functions_10.js | 8 + .../html/search/functions_2.html | 37 + .../html/search/functions_2.js | 9 + .../html/search/functions_3.html | 37 + .../html/search/functions_3.js | 7 + .../html/search/functions_4.html | 37 + .../html/search/functions_4.js | 6 + .../html/search/functions_5.html | 37 + .../html/search/functions_5.js | 5 + .../html/search/functions_6.html | 37 + .../html/search/functions_6.js | 4 + .../html/search/functions_7.html | 37 + .../html/search/functions_7.js | 4 + .../html/search/functions_8.html | 37 + .../html/search/functions_8.js | 9 + .../html/search/functions_9.html | 37 + .../html/search/functions_9.js | 4 + .../html/search/functions_a.html | 37 + .../html/search/functions_a.js | 7 + .../html/search/functions_b.html | 37 + .../html/search/functions_b.js | 10 + .../html/search/functions_c.html | 37 + .../html/search/functions_c.js | 7 + .../html/search/functions_d.html | 37 + .../html/search/functions_d.js | 15 + .../html/search/functions_e.html | 37 + .../html/search/functions_e.js | 7 + .../html/search/functions_f.html | 37 + .../html/search/functions_f.js | 4 + .../html/search/groups_0.js | 6 +- .../html/search/groups_1.js | 2 +- .../html/search/groups_2.js | 6 +- .../html/search/groups_3.js | 5 +- .../html/search/groups_4.js | 8 +- .../html/search/groups_5.js | 2 +- .../html/search/groups_6.js | 2 +- .../html/search/groups_7.js | 6 +- .../html/search/groups_8.js | 2 +- .../html/search/groups_9.js | 2 +- .../html/search/groups_a.js | 4 +- .../html/search/groups_b.js | 11 +- .../html/search/groups_c.js | 6 +- .../html/search/groups_d.js | 10 +- .../html/search/groups_e.js | 10 +- .../html/search/groups_f.js | 2 +- .../html/search/namespaces_0.js | 2 +- .../html/search/namespaces_1.js | 2 +- .../html/search/pages_0.js | 6 +- .../html/search/pages_1.js | 4 +- .../html/search/pages_2.js | 2 +- .../html/search/pages_3.js | 2 +- .../html/search/pages_4.js | 2 +- .../html/search/searchdata.js | 44 +- .../html/search/variables_0.html | 37 + .../html/search/variables_0.js | 16 + .../html/search/variables_1.html | 37 + .../html/search/variables_1.js | 7 + .../html/search/variables_10.html | 37 + .../html/search/variables_10.js | 4 + .../html/search/variables_11.html | 37 + .../html/search/variables_11.js | 4 + .../html/search/variables_12.html | 37 + .../html/search/variables_12.js | 6 + .../html/search/variables_2.html | 37 + .../html/search/variables_2.js | 18 + .../html/search/variables_3.html | 37 + .../html/search/variables_3.js | 13 + .../html/search/variables_4.html | 37 + .../html/search/variables_4.js | 4 + .../html/search/variables_5.html | 37 + .../html/search/variables_5.js | 7 + .../html/search/variables_6.html | 37 + .../html/search/variables_6.js | 4 + .../html/search/variables_7.html | 37 + .../html/search/variables_7.js | 7 + .../html/search/variables_8.html | 37 + .../html/search/variables_8.js | 4 + .../html/search/variables_9.html | 37 + .../html/search/variables_9.js | 9 + .../html/search/variables_a.html | 37 + .../html/search/variables_a.js | 5 + .../html/search/variables_b.html | 37 + .../html/search/variables_b.js | 5 + .../html/search/variables_c.html | 37 + .../html/search/variables_c.js | 14 + .../html/search/variables_d.html | 37 + .../html/search/variables_d.js | 30 + .../html/search/variables_e.html | 37 + .../html/search/variables_e.js | 13 + .../html/search/variables_f.html | 37 + .../html/search/variables_f.js | 15 + Generated Documentation/html/sfr_8c.html | 2 +- .../html/sfr_8c_source.html | 2 +- Generated Documentation/html/sfr_8h.html | 2 +- .../html/sfr_8h_source.html | 2 +- Generated Documentation/html/software.html | 2 +- Generated Documentation/html/sysctl_8c.html | 2 +- .../html/sysctl_8c_source.html | 2 +- Generated Documentation/html/sysctl_8h.html | 2 +- .../html/sysctl_8h_source.html | 2 +- Generated Documentation/html/tec_8c.html | 2 +- .../html/tec_8c_source.html | 17 +- Generated Documentation/html/tec_8h.html | 2 +- .../html/tec_8h_source.html | 5 +- .../html/tec__ex1__sync_timers_8c.html | 180 ++++ .../html/tec__ex1__sync_timers_8c.js | 6 + .../html/tec__ex1__sync_timers_8c_source.html | 311 +++++++ .../html/tec__ex2__ext_clear_input_8c.html | 180 ++++ .../html/tec__ex2__ext_clear_input_8c.js | 6 + .../tec__ex2__ext_clear_input_8c_source.html | 306 +++++++ ...mcu__msp430__driverlib__product_8java.html | 115 +++ ...p430__driverlib__product_8java_source.html | 504 +++++++++++ .../tia__ex1__two_external_inputs_8c.html | 139 +++ .../html/tia__ex1__two_external_inputs_8c.js | 4 + ...a__ex1__two_external_inputs_8c_source.html | 192 ++++ Generated Documentation/html/timer__a_8c.html | 2 +- .../html/timer__a_8c_source.html | 100 ++- Generated Documentation/html/timer__a_8h.html | 2 +- .../html/timer__a_8h_source.html | 15 +- ...ex1__continuous_overflow_interrupt_8c.html | 161 ++++ ...__ex1__continuous_overflow_interrupt_8c.js | 5 + ...ntinuous_overflow_interrupt_8c_source.html | 207 +++++ .../html/timer__a__ex2__single_p_w_m_8c.html | 180 ++++ .../html/timer__a__ex2__single_p_w_m_8c.js | 6 + ...timer__a__ex2__single_p_w_m_8c_source.html | 202 +++++ .../timer__a__ex3__up_mode_interrupt_8c.html | 184 ++++ .../timer__a__ex3__up_mode_interrupt_8c.js | 6 + ...__a__ex3__up_mode_interrupt_8c_source.html | 216 +++++ .../timer__a__ex4__period_capture_8c.html | 231 +++++ .../html/timer__a__ex4__period_capture_8c.js | 8 + ...mer__a__ex4__period_capture_8c_source.html | 268 ++++++ Generated Documentation/html/timer__b_8c.html | 2 +- .../html/timer__b_8c_source.html | 100 ++- Generated Documentation/html/timer__b_8h.html | 2 +- .../html/timer__b_8h_source.html | 15 +- Generated Documentation/html/timer__d_8c.html | 2 +- .../html/timer__d_8c_source.html | 138 +-- Generated Documentation/html/timer__d_8h.html | 2 +- .../html/timer__d_8h_source.html | 19 +- ..._ex10__duty_cycle_measurement_dual_8c.html | 328 +++++++ ...d__ex10__duty_cycle_measurement_dual_8c.js | 13 + ...duty_cycle_measurement_dual_8c_source.html | 355 ++++++++ .../html/timer__d__ex1__cont_c_r_r0_8c.html | 161 ++++ .../html/timer__d__ex1__cont_c_r_r0_8c.js | 5 + .../timer__d__ex1__cont_c_r_r0_8c_source.html | 225 +++++ .../timer__d__ex2__overflow_i_s_r_8c.html | 161 ++++ .../html/timer__d__ex2__overflow_i_s_r_8c.js | 5 + ...mer__d__ex2__overflow_i_s_r_8c_source.html | 227 +++++ .../html/timer__d__ex3__up_down_mode_8c.html | 139 +++ .../html/timer__d__ex3__up_down_mode_8c.js | 4 + ...timer__d__ex3__up_down_mode_8c_source.html | 218 +++++ .../timer__d__ex4__pwm_up_down_mode_8c.html | 139 +++ .../timer__d__ex4__pwm_up_down_mode_8c.js | 4 + ...r__d__ex4__pwm_up_down_mode_8c_source.html | 209 +++++ ..._d__ex5__hi_res_free_running_p_w_m_8c.html | 139 +++ ...r__d__ex5__hi_res_free_running_p_w_m_8c.js | 4 + ...__hi_res_free_running_p_w_m_8c_source.html | 241 +++++ ...er__d__ex6__hi_res_regulated_p_w_m_8c.html | 161 ++++ ...imer__d__ex6__hi_res_regulated_p_w_m_8c.js | 5 + ...ex6__hi_res_regulated_p_w_m_8c_source.html | 297 +++++++ .../timer__d__ex7__combine_regs_p_w_m_8c.html | 139 +++ .../timer__d__ex7__combine_regs_p_w_m_8c.js | 4 + ..._d__ex7__combine_regs_p_w_m_8c_source.html | 235 +++++ ...ex8__duty_cycle_measurement_single_8c.html | 328 +++++++ ...__ex8__duty_cycle_measurement_single_8c.js | 13 + ...ty_cycle_measurement_single_8c_source.html | 366 ++++++++ .../timer__d__ex9__period_measurement_8c.html | 259 ++++++ .../timer__d__ex9__period_measurement_8c.js | 9 + ..._d__ex9__period_measurement_8c_source.html | 339 +++++++ Generated Documentation/html/tlv_8c.html | 2 +- .../html/tlv_8c_source.html | 2 +- Generated Documentation/html/tlv_8h.html | 2 +- .../html/tlv_8h_source.html | 2 +- .../html/tlv__ex1__check_checksum_8c.html | 139 +++ .../html/tlv__ex1__check_checksum_8c.js | 4 + .../tlv__ex1__check_checksum_8c_source.html | 187 ++++ Generated Documentation/html/ucs_8c.html | 2 +- .../html/ucs_8c_source.html | 43 +- Generated Documentation/html/ucs_8h.html | 2 +- .../html/ucs_8h_source.html | 2 +- .../html/ucs__ex1___d_c_o12_m_hz_8c.html | 267 ++++++ .../html/ucs__ex1___d_c_o12_m_hz_8c.js | 9 + .../ucs__ex1___d_c_o12_m_hz_8c_source.html | 254 ++++++ .../ucs__ex2___v_l_o_sources_a_c_l_k_8c.html | 223 +++++ .../ucs__ex2___v_l_o_sources_a_c_l_k_8c.js | 7 + ...ex2___v_l_o_sources_a_c_l_k_8c_source.html | 215 +++++ .../ucs__ex3___x_t1_sources_a_c_l_k_8c.html | 205 +++++ .../ucs__ex3___x_t1_sources_a_c_l_k_8c.js | 6 + ..._ex3___x_t1_sources_a_c_l_k_8c_source.html | 215 +++++ ...__ex4___x_t_sources_d_c_o_internal_8c.html | 329 +++++++ ...cs__ex4___x_t_sources_d_c_o_internal_8c.js | 12 + ..._x_t_sources_d_c_o_internal_8c_source.html | 284 ++++++ .../html/usci__a__spi_8c.html | 2 +- .../html/usci__a__spi_8c_source.html | 24 +- .../html/usci__a__spi_8h.html | 2 +- .../html/usci__a__spi_8h_source.html | 10 +- .../html/usci__a__spi__ex1__master_8c.html | 267 ++++++ .../html/usci__a__spi__ex1__master_8c.js | 9 + .../usci__a__spi__ex1__master_8c_source.html | 278 ++++++ .../html/usci__a__spi__ex1__slave_8c.html | 244 +++++ .../html/usci__a__spi__ex1__slave_8c.js | 8 + .../usci__a__spi__ex1__slave_8c_source.html | 234 +++++ .../html/usci__a__uart_8c.html | 2 +- .../html/usci__a__uart_8c_source.html | 33 +- .../html/usci__a__uart_8h.html | 2 +- .../html/usci__a__uart_8h_source.html | 11 +- ...ci__a__uart__ex1__loopback_advance_8c.html | 267 ++++++ ...usci__a__uart__ex1__loopback_advance_8c.js | 9 + ...uart__ex1__loopback_advance_8c_source.html | 246 +++++ ...x2__address_bit_multiprocessor_r_x_8c.html | 285 ++++++ ..._ex2__address_bit_multiprocessor_r_x_8c.js | 10 + ...ress_bit_multiprocessor_r_x_8c_source.html | 248 ++++++ ...x2__address_bit_multiprocessor_t_x_8c.html | 325 +++++++ ..._ex2__address_bit_multiprocessor_t_x_8c.js | 12 + ...ress_bit_multiprocessor_t_x_8c_source.html | 244 +++++ ...__ex3__auto_baudrate_detection_r_x_8c.html | 285 ++++++ ...rt__ex3__auto_baudrate_detection_r_x_8c.js | 10 + ...auto_baudrate_detection_r_x_8c_source.html | 239 +++++ ...__ex3__auto_baudrate_detection_t_x_8c.html | 305 +++++++ ...rt__ex3__auto_baudrate_detection_t_x_8c.js | 11 + ...auto_baudrate_detection_t_x_8c_source.html | 259 ++++++ ..._ex4__idle_line_multiprocessor_r_x_8c.html | 303 +++++++ ...t__ex4__idle_line_multiprocessor_r_x_8c.js | 11 + ...dle_line_multiprocessor_r_x_8c_source.html | 255 ++++++ ...__ex4__idleline_multiprocessor_t_x_8c.html | 325 +++++++ ...rt__ex4__idleline_multiprocessor_t_x_8c.js | 12 + ...idleline_multiprocessor_t_x_8c_source.html | 247 ++++++ .../html/usci__b__i2c_8c.html | 2 +- .../html/usci__b__i2c_8c_source.html | 21 +- .../html/usci__b__i2c_8h.html | 2 +- .../html/usci__b__i2c_8h_source.html | 8 +- ...sci__b__i2c__ex1__master_rx_single_8c.html | 221 +++++ .../usci__b__i2c__ex1__master_rx_single_8c.js | 7 + ..._i2c__ex1__master_rx_single_8c_source.html | 246 +++++ ...usci__b__i2c__ex1__slave_tx_single_8c.html | 197 +++++ .../usci__b__i2c__ex1__slave_tx_single_8c.js | 6 + ...__i2c__ex1__slave_tx_single_8c_source.html | 204 +++++ ...i__b__i2c__ex2__master_tx_multiple_8c.html | 267 ++++++ ...sci__b__i2c__ex2__master_tx_multiple_8c.js | 9 + ...2c__ex2__master_tx_multiple_8c_source.html | 284 ++++++ ...ci__b__i2c__ex2__slave_rx_multiple_8c.html | 241 +++++ ...usci__b__i2c__ex2__slave_rx_multiple_8c.js | 8 + ...i2c__ex2__slave_rx_multiple_8c_source.html | 236 +++++ ...sci__b__i2c__ex3__master_tx_single_8c.html | 221 +++++ .../usci__b__i2c__ex3__master_tx_single_8c.js | 7 + ..._i2c__ex3__master_tx_single_8c_source.html | 248 ++++++ ...usci__b__i2c__ex3__slave_rx_single_8c.html | 221 +++++ .../usci__b__i2c__ex3__slave_rx_single_8c.js | 7 + ...__i2c__ex3__slave_rx_single_8c_source.html | 227 +++++ ...i__b__i2c__ex4__master_rx_multiple_8c.html | 281 ++++++ ...sci__b__i2c__ex4__master_rx_multiple_8c.js | 10 + ...2c__ex4__master_rx_multiple_8c_source.html | 276 ++++++ ...ci__b__i2c__ex4__slave_tx_multiple_8c.html | 281 ++++++ ...usci__b__i2c__ex4__slave_tx_multiple_8c.js | 10 + ...i2c__ex4__slave_tx_multiple_8c_source.html | 249 ++++++ .../html/usci__b__spi_8c.html | 2 +- .../html/usci__b__spi_8c_source.html | 24 +- .../html/usci__b__spi_8h.html | 2 +- .../html/usci__b__spi_8h_source.html | 10 +- .../html/usci__b__spi__ex1__master_8c.html | 267 ++++++ .../html/usci__b__spi__ex1__master_8c.js | 9 + .../usci__b__spi__ex1__master_8c_source.html | 276 ++++++ .../html/usci__b__spi__ex1__slave_8c.html | 244 +++++ .../html/usci__b__spi__ex1__slave_8c.js | 8 + .../usci__b__spi__ex1__slave_8c_source.html | 234 +++++ Generated Documentation/html/version_8h.html | 2 +- .../html/version_8h_source.html | 2 +- Generated Documentation/html/wdt__a_8c.html | 2 +- .../html/wdt__a_8c_source.html | 2 +- Generated Documentation/html/wdt__a_8h.html | 2 +- .../html/wdt__a_8h_source.html | 2 +- .../html/wdt__ex1__interval_mode_8c.html | 159 ++++ .../html/wdt__ex1__interval_mode_8c.js | 5 + .../wdt__ex1__interval_mode_8c_source.html | 199 +++++ .../html/wdt__ex2__watchdog_mode_8c.html | 139 +++ .../html/wdt__ex2__watchdog_mode_8c.js | 4 + .../wdt__ex2__watchdog_mode_8c_source.html | 198 +++++ Generated Documentation/html/yacctab_8py.html | 2 +- .../html/yacctab_8py_source.html | 2 +- .../latex/_9_resources_8markdown.tex | 2 + Generated Documentation/latex/_board_8h.tex | 2 + ...6xx_2crc_2crc__ex1__build_signature_8c.tex | 52 ++ ..._6xx_2dma_2dma__ex1__repeated_block_8c.tex | 39 + ..._a__spi_2eusci__a__spi__ex1__master_8c.tex | 97 ++ ...__a__spi_2eusci__a__spi__ex1__slave_8c.tex | 97 ++ ...ci__a__uart__ex1__loopback_advanced_8c.tex | 132 +++ ...ci__b__i2c__ex1__master_rx_multiple_8c.tex | 93 ++ ...sci__b__i2c__ex1__slave_tx_multiple_8c.tex | 99 +++ ...usci__b__i2c__ex2__master_rx_single_8c.tex | 88 ++ ...eusci__b__i2c__ex2__slave_tx_single_8c.tex | 97 ++ ...ci__b__i2c__ex3__master_tx_multiple_8c.tex | 122 +++ ...sci__b__i2c__ex3__slave_rx_multiple_8c.tex | 81 ++ ...usci__b__i2c__ex4__master_tx_single_8c.tex | 90 ++ ...eusci__b__i2c__ex4__slave_rx_single_8c.tex | 109 +++ ..._b__i2c__ex5__master_multiple_slave_8c.tex | 111 +++ ...__b__i2c__ex5__slave_multiple_slave_8c.tex | 111 +++ ..._b__spi_2eusci__b__spi__ex1__master_8c.tex | 97 ++ ...__b__spi_2eusci__b__spi__ex1__slave_8c.tex | 96 ++ ...xx__6xx_2gpio_2gpio__ex1__output_hi_8c.tex | 25 + ...6xx_2gpio_2gpio__ex2__input_capture_8c.tex | 37 + ...6xx_2gpio_2gpio__ex3__software_poll_8c.tex | 43 + ...xx_2gpio_2gpio__ex4__write_to_port1_8c.tex | 44 + ...2mpy32__ex10__32bit_signed_multiply_8c.tex | 52 ++ ...__ex11__32bit_signed_multiply_accum_8c.tex | 52 ++ ...ex12__32bit_unsigned_multiply_accum_8c.tex | 52 ++ ..._2mpy32__ex13__saturation_underflow_8c.tex | 106 +++ ...2_2mpy32__ex14__saturation_overflow_8c.tex | 106 +++ ..._2mpy32_2mpy32__ex15__fraction_mode_8c.tex | 90 ++ ...mpy32__ex1__16bit_unsigned_multiply_8c.tex | 52 ++ ...2mpy32__ex2__8bit_unsigned_multiply_8c.tex | 52 ++ ..._2mpy32__ex3__16bit_signed_multiply_8c.tex | 106 +++ ...2_2mpy32__ex4__8bit_signed_multiply_8c.tex | 52 ++ ..._ex5__16bit_unsigned_multiply_accum_8c.tex | 52 ++ ...__ex6__8bit_unsigned_multiply_accum_8c.tex | 50 ++ ...2__ex7__16bit_signed_multiply_accum_8c.tex | 52 ++ ...32__ex8__8bit_signed_multiply_accum_8c.tex | 52 ++ ...mpy32__ex9__32bit_unsigned_multiply_8c.tex | 74 ++ ..._2rtc__c_2rtc__c__ex1__calendarmode_8c.tex | 80 ++ ...timer__a_2timer__a__ex1__pwm_single_8c.tex | 81 ++ ...ode_operation_with_c_c_r0_interrupt_8c.tex | 85 ++ ...de_operation_with_t_a_i_e_interrupt_8c.tex | 63 ++ ...timer__a__ex4__pwm_multiple_up_down_8c.tex | 93 ++ ...__a_2timer__a__ex5__pwm_multiple_up_8c.tex | 91 ++ ...mer__a__ex6__up_down_mode_operation_8c.tex | 79 ++ ...mer__b__ex1__continuous_mode_c_c_r0_8c.tex | 74 ++ ...r__b_2timer__b__ex2__overflow_i_s_r_8c.tex | 52 ++ ...__6xx_2timer__b_2timer__b__ex3__pwm_8c.tex | 21 + ...b_2timer__b__ex4__up_mode_operation_8c.tex | 81 ++ ...mer__b_2timer__b__ex5__single_p_w_m_8c.tex | 81 ++ ...6xx_2tlv_2tlv__ex1__get_device_type_8c.tex | 36 + ...v_2tlv__ex2__read_t_l_v_descriptors_8c.tex | 584 ++++++++++++ ...lv_2tlv__ex3__calibrate_temp_sensor_8c.tex | 206 +++++ ..._a_2wdt__a__ex1__interval_s_m_c_l_k_8c.tex | 64 ++ ...t__a_2wdt__a__ex2__interval_a_c_l_k_8c.tex | 64 ++ ...t__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.tex | 52 ++ ...4xx_2crc_2crc__ex1__build_signature_8c.tex | 52 ++ ..._a__spi_2eusci__a__spi__ex1__master_8c.tex | 92 ++ ...__a__spi_2eusci__a__spi__ex1__slave_8c.tex | 92 ++ ...ci__a__uart__ex1__loopback_advanced_8c.tex | 121 +++ ...ci__b__i2c__ex1__master_rx_multiple_8c.tex | 137 +++ ...sci__b__i2c__ex1__slave_tx_multiple_8c.tex | 92 ++ ...usci__b__i2c__ex2__master_rx_single_8c.tex | 109 +++ ...eusci__b__i2c__ex2__slave_tx_single_8c.tex | 99 +++ ...ci__b__i2c__ex3__master_tx_multiple_8c.tex | 139 +++ ...sci__b__i2c__ex3__slave_rx_multiple_8c.tex | 103 +++ ...usci__b__i2c__ex4__master_tx_single_8c.tex | 111 +++ ...eusci__b__i2c__ex4__slave_rx_single_8c.tex | 103 +++ ..._b__i2c__ex5__master_multiple_slave_8c.tex | 125 +++ ...__b__i2c__ex5__slave_multiple_slave_8c.tex | 95 ++ ..._b__spi_2eusci__b__spi__ex1__master_8c.tex | 92 ++ ...__b__spi_2eusci__b__spi__ex1__slave_8c.tex | 92 ++ ...__4xx_2framctl_2framctl__ex1__write_8c.tex | 56 ++ ...xx__4xx_2gpio_2gpio__ex1__output_hi_8c.tex | 25 + ...4xx_2gpio_2gpio__ex2__input_capture_8c.tex | 42 + ...4xx_2gpio_2gpio__ex3__software_poll_8c.tex | 46 + ...xx_2gpio_2gpio__ex4__write_to_port1_8c.tex | 44 + ...2mpy32__ex10__32bit_signed_multiply_8c.tex | 52 ++ ...__ex11__32bit_signed_multiply_accum_8c.tex | 52 ++ ...ex12__32bit_unsigned_multiply_accum_8c.tex | 52 ++ ..._2mpy32__ex13__saturation_underflow_8c.tex | 94 ++ ...2_2mpy32__ex14__saturation_overflow_8c.tex | 94 ++ ..._2mpy32_2mpy32__ex15__fraction_mode_8c.tex | 82 ++ ...mpy32__ex1__16bit_unsigned_multiply_8c.tex | 52 ++ ...2mpy32__ex2__8bit_unsigned_multiply_8c.tex | 52 ++ ..._2mpy32__ex3__16bit_signed_multiply_8c.tex | 94 ++ ...2_2mpy32__ex4__8bit_signed_multiply_8c.tex | 52 ++ ..._ex5__16bit_unsigned_multiply_accum_8c.tex | 52 ++ ...__ex6__8bit_unsigned_multiply_accum_8c.tex | 50 ++ ...2__ex7__16bit_signed_multiply_accum_8c.tex | 52 ++ ...32__ex8__8bit_signed_multiply_accum_8c.tex | 52 ++ ...mpy32__ex9__32bit_unsigned_multiply_8c.tex | 70 ++ ...__4xx_2pmm_2pmm___reset___l_p_mx__5_8c.tex | 41 + ...timer__a_2timer__a__ex1__pwm_single_8c.tex | 81 ++ ...ode_operation_with_c_c_r0_interrupt_8c.tex | 79 ++ ...de_operation_with_t_a_i_e_interrupt_8c.tex | 63 ++ ...timer__a__ex4__pwm_multiple_up_down_8c.tex | 93 ++ ...__a_2timer__a__ex5__pwm_multiple_up_8c.tex | 91 ++ ...mer__a__ex6__up_down_mode_operation_8c.tex | 79 ++ ...mer__b__ex1__continuous_mode_c_c_r0_8c.tex | 59 ++ ...r__b_2timer__b__ex2__overflow_i_s_r_8c.tex | 37 + ...__4xx_2timer__b_2timer__b__ex3__pwm_8c.tex | 25 + ...b_2timer__b__ex4__up_mode_operation_8c.tex | 81 ++ ...mer__b_2timer__b__ex5__single_p_w_m_8c.tex | 81 ++ ...4xx_2tlv_2tlv__ex1__get_device_type_8c.tex | 36 + ..._a_2wdt__a__ex1__interval_s_m_c_l_k_8c.tex | 57 ++ ...t__a_2wdt__a__ex2__interval_a_c_l_k_8c.tex | 57 ++ ...t__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.tex | 45 + ...7xx_2crc_2crc__ex1__build_signature_8c.tex | 52 ++ ..._f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c.tex | 42 + ...57xx_2dma_2dma__ex1__repeated_block_8c.tex | 39 + ..._a__spi_2eusci__a__spi__ex1__master_8c.tex | 88 ++ ...__a__spi_2eusci__a__spi__ex1__slave_8c.tex | 88 ++ ...ci__a__uart__ex1__loopback_advanced_8c.tex | 120 +++ ...ci__b__i2c__ex1__master_rx_multiple_8c.tex | 104 +++ ...sci__b__i2c__ex1__slave_tx_multiple_8c.tex | 102 +++ ...usci__b__i2c__ex2__master_rx_single_8c.tex | 84 ++ ...eusci__b__i2c__ex2__slave_tx_single_8c.tex | 98 ++ ...ci__b__i2c__ex3__master_tx_multiple_8c.tex | 114 +++ ...sci__b__i2c__ex3__slave_rx_multiple_8c.tex | 77 ++ ...usci__b__i2c__ex4__master_tx_single_8c.tex | 86 ++ ...eusci__b__i2c__ex4__slave_rx_single_8c.tex | 105 +++ ..._b__i2c__ex5__master_multiple_slave_8c.tex | 95 ++ ...__b__i2c__ex5__slave_multiple_slave_8c.tex | 95 ++ ..._b__spi_2eusci__b__spi__ex1__master_8c.tex | 88 ++ ...__b__spi_2eusci__b__spi__ex1__slave_8c.tex | 88 ++ ...r57xx_2framctl_2framctl__ex1__write_8c.tex | 58 ++ ...f_r57xx_2gpio_2gpio__ex1__output_hi_8c.tex | 25 + ...7xx_2gpio_2gpio__ex2__input_capture_8c.tex | 37 + ...7xx_2gpio_2gpio__ex3__software_poll_8c.tex | 43 + ...xx_2gpio_2gpio__ex4__write_to_port1_8c.tex | 44 + ...0_f_r57xx_2mpu_2mpu__ex1__three_seg_8c.tex | 82 ++ ...430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c.tex | 82 ++ ...7xx_2mpu_2mpu__ex3__system_pre_init_8c.tex | 170 ++++ ...2mpy32__ex10__32bit_signed_multiply_8c.tex | 52 ++ ...__ex11__32bit_signed_multiply_accum_8c.tex | 52 ++ ...ex12__32bit_unsigned_multiply_accum_8c.tex | 52 ++ ..._2mpy32__ex13__saturation_underflow_8c.tex | 94 ++ ...2_2mpy32__ex14__saturation_overflow_8c.tex | 94 ++ ..._2mpy32_2mpy32__ex15__fraction_mode_8c.tex | 82 ++ ...mpy32__ex1__16bit_unsigned_multiply_8c.tex | 52 ++ ...2mpy32__ex2__8bit_unsigned_multiply_8c.tex | 52 ++ ..._2mpy32__ex3__16bit_signed_multiply_8c.tex | 94 ++ ...2_2mpy32__ex4__8bit_signed_multiply_8c.tex | 52 ++ ..._ex5__16bit_unsigned_multiply_accum_8c.tex | 52 ++ ...__ex6__8bit_unsigned_multiply_accum_8c.tex | 50 ++ ...2__ex7__16bit_signed_multiply_accum_8c.tex | 52 ++ ...32__ex8__8bit_signed_multiply_accum_8c.tex | 52 ++ ...mpy32__ex9__32bit_unsigned_multiply_8c.tex | 70 ++ ...r57xx_2pmm_2pmm___reset___l_p_mx__5_8c.tex | 25 + ..._2rtc__b_2rtc__b__ex1__calendermode_8c.tex | 78 ++ ...timer__a_2timer__a__ex1__pwm_single_8c.tex | 81 ++ ...ode_operation_with_c_c_r0_interrupt_8c.tex | 85 ++ ...de_operation_with_t_a_i_e_interrupt_8c.tex | 63 ++ ...timer__a__ex4__pwm_multiple_up_down_8c.tex | 93 ++ ...__a_2timer__a__ex5__pwm_multiple_up_8c.tex | 91 ++ ...mer__a__ex6__up_down_mode_operation_8c.tex | 79 ++ ...mer__b__ex1__continuous_mode_c_c_r0_8c.tex | 59 ++ ...r__b_2timer__b__ex2__overflow_i_s_r_8c.tex | 37 + ...r57xx_2timer__b_2timer__b__ex3__pwm_8c.tex | 21 + ...b_2timer__b__ex4__up_mode_operation_8c.tex | 81 ++ ...mer__b_2timer__b__ex5__single_p_w_m_8c.tex | 81 ++ ...7xx_2tlv_2tlv__ex1__get_device_type_8c.tex | 36 + ..._a_2wdt__a__ex1__interval_s_m_c_l_k_8c.tex | 64 ++ ...t__a_2wdt__a__ex2__interval_a_c_l_k_8c.tex | 64 ++ ...t__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.tex | 52 ++ ...6xx_2crc_2crc__ex1__build_signature_8c.tex | 52 ++ ...5xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c.tex | 25 + ..._6xx_2dma_2dma__ex1__repeated_block_8c.tex | 39 + ..._a__spi_2eusci__a__spi__ex1__master_8c.tex | 92 ++ ...__a__spi_2eusci__a__spi__ex1__slave_8c.tex | 88 ++ ...ci__a__uart__ex1__loopback_advanced_8c.tex | 120 +++ ...ci__b__i2c__ex1__master_rx_multiple_8c.tex | 104 +++ ...sci__b__i2c__ex1__slave_tx_multiple_8c.tex | 102 +++ ...usci__b__i2c__ex2__master_rx_single_8c.tex | 84 ++ ...eusci__b__i2c__ex2__slave_tx_single_8c.tex | 98 ++ ...ci__b__i2c__ex3__master_tx_multiple_8c.tex | 114 +++ ...sci__b__i2c__ex3__slave_rx_multiple_8c.tex | 77 ++ ...usci__b__i2c__ex4__master_tx_single_8c.tex | 86 ++ ...eusci__b__i2c__ex4__slave_rx_single_8c.tex | 105 +++ ..._b__i2c__ex5__master_multiple_slave_8c.tex | 95 ++ ...__b__i2c__ex5__slave_multiple_slave_8c.tex | 95 ++ ..._b__spi_2eusci__b__spi__ex1__master_8c.tex | 92 ++ ...__b__spi_2eusci__b__spi__ex1__slave_8c.tex | 92 ++ ...__6xx_2framctl_2framctl__ex1__write_8c.tex | 40 + ...xx__6xx_2gpio_2gpio__ex1__output_hi_8c.tex | 25 + ...6xx_2gpio_2gpio__ex2__input_capture_8c.tex | 37 + ...6xx_2gpio_2gpio__ex3__software_poll_8c.tex | 43 + ...xx_2gpio_2gpio__ex4__write_to_port1_8c.tex | 44 + ...r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c.tex | 87 ++ ...f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c.tex | 87 ++ ...6xx_2mpu_2mpu__ex3__system_pre_init_8c.tex | 151 ++++ ...2mpy32__ex10__32bit_signed_multiply_8c.tex | 52 ++ ...__ex11__32bit_signed_multiply_accum_8c.tex | 52 ++ ...ex12__32bit_unsigned_multiply_accum_8c.tex | 52 ++ ..._2mpy32__ex13__saturation_underflow_8c.tex | 94 ++ ...2_2mpy32__ex14__saturation_overflow_8c.tex | 94 ++ ..._2mpy32_2mpy32__ex15__fraction_mode_8c.tex | 82 ++ ...mpy32__ex1__16bit_unsigned_multiply_8c.tex | 52 ++ ...2mpy32__ex2__8bit_unsigned_multiply_8c.tex | 52 ++ ..._2mpy32__ex3__16bit_signed_multiply_8c.tex | 94 ++ ...2_2mpy32__ex4__8bit_signed_multiply_8c.tex | 52 ++ ..._ex5__16bit_unsigned_multiply_accum_8c.tex | 52 ++ ...__ex6__8bit_unsigned_multiply_accum_8c.tex | 50 ++ ...2__ex7__16bit_signed_multiply_accum_8c.tex | 52 ++ ...32__ex8__8bit_signed_multiply_accum_8c.tex | 52 ++ ...mpy32__ex9__32bit_unsigned_multiply_8c.tex | 70 ++ ...__6xx_2pmm_2pmm___reset___l_p_mx__5_8c.tex | 25 + ..._2rtc__b_2rtc__b__ex1__calendermode_8c.tex | 74 ++ ..._2rtc__c_2rtc__c__ex1__calendarmode_8c.tex | 74 ++ ...timer__a_2timer__a__ex1__pwm_single_8c.tex | 81 ++ ...ode_operation_with_c_c_r0_interrupt_8c.tex | 85 ++ ...de_operation_with_t_a_i_e_interrupt_8c.tex | 63 ++ ...timer__a__ex4__pwm_multiple_up_down_8c.tex | 93 ++ ...__a_2timer__a__ex5__pwm_multiple_up_8c.tex | 91 ++ ...mer__a__ex6__up_down_mode_operation_8c.tex | 79 ++ ...mer__b__ex1__continuous_mode_c_c_r0_8c.tex | 59 ++ ...r__b_2timer__b__ex2__overflow_i_s_r_8c.tex | 37 + ...__6xx_2timer__b_2timer__b__ex3__pwm_8c.tex | 25 + ...b_2timer__b__ex4__up_mode_operation_8c.tex | 81 ++ ...mer__b_2timer__b__ex5__single_p_w_m_8c.tex | 81 ++ ...6xx_2tlv_2tlv__ex1__get_device_type_8c.tex | 36 + ...v_2tlv__ex2__read_t_l_v_descriptors_8c.tex | 456 ++++++++++ ...lv_2tlv__ex3__calibrate_temp_sensor_8c.tex | 174 ++++ ..._a_2wdt__a__ex1__interval_s_m_c_l_k_8c.tex | 64 ++ ...t__a_2wdt__a__ex2__interval_a_c_l_k_8c.tex | 64 ++ ...t__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.tex | 52 ++ .../latex/_power_01_design_8markdown.tex | 2 + ..._f5xx__6xx_200__empty_project_2main_8c.tex | 21 + ..._r2xx__4xx_200__empty_project_2main_8c.tex | 21 + ...30_f_r57xx_200__empty_project_2main_8c.tex | 21 + ..._r5xx__6xx_200__empty_project_2main_8c.tex | 21 + ...s_p430i2xx_200__empty_project_2main_8c.tex | 21 + ...telemetry_and_lighting_system_2main_8c.tex | 21 + .../latex/adc10__a__ex1__avcc_ref_8c.tex | 64 ++ .../latex/adc10__a__ex2__int_ref_8c.tex | 95 ++ .../latex/adc10__a__ex3__window_comp_8c.tex | 155 ++++ .../latex/adc10__a__ex4__signed_data_8c.tex | 64 ++ .../latex/adc10__a__ex5__batt_monitor_8c.tex | 48 + .../latex/adc10__a__ex6__ref_toggle_8c.tex | 69 ++ .../adc10__a__ex7__repeat_single_d_m_a_8c.tex | 64 ++ .../adc10__a__ex8__sequence_d_m_a_8c.tex | 59 ++ .../latex/adc10__a__ex9__repeat_seq_8c.tex | 66 ++ .../latex/adc10__b__ex1__avcc_ref_8c.tex | 58 ++ .../latex/adc10__b__ex2__int_ref_8c.tex | 98 ++ .../latex/adc12__a__ex1__avcc_ref_8c.tex | 63 ++ .../latex/adc12__a__ex2__int_ref_8c.tex | 46 + .../latex/adc12__a__ex3__ext_ref_8c.tex | 40 + .../latex/adc12__a__ex4__repeated_seq_8c.tex | 137 +++ .../adc12__a__ex5__repeated_single_8c.tex | 94 ++ .../adc12__a__ex6__extended_inputs_8c.tex | 88 ++ .../latex/adc12__a__ex7__sequence_8c.tex | 89 ++ .../latex/adc12__a__ex8__temp_sensor_8c.tex | 118 +++ .../latex/adc12__b__ex1__avcc_ref_8c.tex | 41 + .../latex/adc12__b__ex2__shared_ref_8c.tex | 41 + .../latex/adc12__b__ex3__ext_ref_8c.tex | 25 + .../latex/adc__ex1__avcc_ref_8c.tex | 57 ++ .../latex/adc__ex2__int_ref_8c.tex | 97 ++ .../latex/aes256__ex1__encrypt_decrypt_8c.tex | 147 +++ .../latex/aes__ex1__encrypt_decrypt_8c.tex | 99 +++ ...ncrypt_decrypt_with_first_round_key_8c.tex | 79 ++ Generated Documentation/latex/annotated.tex | 4 + .../battbak__ex1__calendermode_l_p_m3_8c.tex | 79 ++ ...assti__mcu__msp430__driverlib__product.tex | 36 + .../latex/comp__b__ex1__2_v_ref_8c.tex | 48 + .../latex/comp__b__ex2__1_v5_ref_int_8c.tex | 58 ++ .../comp__b__ex3__avcc_ref_u_l_p_m_8c.tex | 43 + .../latex/comp__b__ex4__hysteresis_8c.tex | 43 + .../latex/comp__b__ex5___t_ax_8c.tex | 122 +++ .../latex/comp__b__ex6__ext_ref_8c.tex | 52 ++ ...ex1__output_toggle_vcomp_vs_vref2_v_8c.tex | 25 + ...ex2__output_toggle_vcomp_vs_vref25v_8c.tex | 25 + ...omp__d__ex3__interrupt_vcomp_vs15_v_8c.tex | 37 + ...x4__output_toggle_vcomp_vs_half_vcc_8c.tex | 25 + ...p__d__ex5__output_toggle_hysteresis_8c.tex | 25 + ...ex1__output_toggle_vcomp_vs_vref2_v_8c.tex | 25 + ...x2__output_toggle_vcomp_vs_vref25_v_8c.tex | 25 + ...omp__e__ex3__interrupt_vcomp_vs12_v_8c.tex | 37 + ...x4__output_toggle_vcomp_vs_half_vcc_8c.tex | 25 + ...p__e__ex5__output_toggle_hysteresis_8c.tex | 25 + .../latex/crc32__ex1__calculate_crc16_8c.tex | 81 ++ .../cs__ex1___d_c_o1_m_hz_s_w_trim_8c.tex | 132 +++ .../cs__ex1__output_clock_signals_8c.tex | 21 + .../latex/cs__ex2___d_c_o16_m_hz_8c.tex | 43 + .../latex/cs__ex2___d_c_o24_m_hz_8c.tex | 69 ++ .../cs__ex2___v_l_o_sources_m_c_l_k_8c.tex | 98 ++ .../cs__ex2__calculate_clock_signals_8c.tex | 25 + .../latex/cs__ex3___x_t1_fault_8c.tex | 98 ++ .../cs__ex3___x_t1_sources_a_c_l_k_8c.tex | 86 ++ ...s__ex4___x_t_sources_d_c_o_internal_8c.tex | 162 ++++ .../ctsd16__ex1__single_ch_cont_conv_8c.tex | 64 ++ ..._ex2__single_ch_single_conv_polling_8c.tex | 59 ++ ...x3__single_ch_single_conv_interrupt_8c.tex | 75 ++ .../ctsd16__ex4__internal_temp_sensor_8c.tex | 75 ++ .../ctsd16__ex5__three_ch_single_conv_8c.tex | 125 +++ .../latex/dac12__a__ex1__1_v5_out_8c.tex | 48 + .../latex/dac12__a__ex2__0_v75_out_8c.tex | 48 + .../dac12__a__ex3__positive_ramp_int_8c.tex | 37 + .../latex/dac12__a__ex4__grouped_8c.tex | 21 + .../dir_0175f9cbb4633b514b5514f21bec03a0.tex | 11 + .../dir_026cf2b502f8bbf86cefdc24803245a7.tex | 7 + .../dir_0471030c6c40e74c2aa9e23909a0aefd.tex | 7 + .../dir_04f69be1ff08eefe392fcaf09da102e4.tex | 7 + .../dir_06231492a7d233fc4a83ba7357554081.tex | 13 + .../dir_07e7a19cced4ca994622ecf053dbaebb.tex | 35 + .../dir_082cefa607877865df28aba5f85bc6fe.tex | 35 + .../dir_0951772c4bb174d3e698a7a501f39205.tex | 7 + .../dir_0bf1e8c1a0485b32b4ea3855c05c5e9f.tex | 9 + .../dir_10079ac620cbbd74c446f76890731701.tex | 9 + .../dir_109b57299c2f7cc571c23ddcc06a7c2e.tex | 7 + .../dir_11a78232b6b0b2534a0769fc18e029c9.tex | 13 + .../dir_14fcb402065fc02656148105e0b88af8.tex | 7 + .../dir_1565a4596743f346939089b01b134b85.tex | 11 + .../dir_1726e59edf0cdfc0cd477fe472a1d541.tex | 7 + .../dir_17daed8eeb6fb5022fcc96df7cc52430.tex | 7 + .../dir_1b03434fe1954bcac8b5ee387e9cbef9.tex | 7 + .../dir_1bbd2b7171cd7cf40620edab77a45e65.tex | 15 + .../dir_1dc93fad658d497d540ca6f49d4eae01.tex | 7 + .../dir_1e8a087624731203a4e03c56185a5ede.tex | 17 + .../dir_1f3a4db757d3e95a006fc493c3318364.tex | 7 + .../dir_1fb5ef0779154eaf786832488fc134cb.tex | 25 + .../dir_21f3df333188901ff8460d06725eaffa.tex | 11 + .../dir_25c248bdb2c4a10c020f8b7aee9fc291.tex | 7 + .../dir_27f6d00ac9f631b8de85eccb4b9708f1.tex | 9 + .../dir_295ec522445a072381cce51588ae06de.tex | 13 + .../dir_2aaf424bbcb07f5dded9ec249652df2c.tex | 7 + .../dir_2b7e865b343d6334dab389a0c4067e85.tex | 7 + .../dir_2bcdb68feb241a3616b904a7e7f95389.tex | 13 + .../dir_2dd3fc5c5508b4aa7f7cc27f9032e4c2.tex | 47 + .../dir_2e61e066929921851158d646dc727247.tex | 54 ++ .../dir_302d4a0d9a31e1dff21c7c222f7dfd5d.tex | 9 + .../dir_316389d960a63be80b1f1816e0c22eae.tex | 83 ++ .../dir_31688d51ab3625fd6f143fd30cc4d7bb.tex | 7 + .../dir_3225291aa21e87c4bb2bfb83325021b3.tex | 9 + .../dir_3645d7f8031073ad138ae29d5db24eae.tex | 7 + .../dir_3742855ec19362cf25065527c1fc030e.tex | 7 + .../dir_3911d8ee7cbc2334cb3f1227242ecfb5.tex | 7 + .../dir_3944c9284a587c1f4257344ed41687e0.tex | 13 + .../dir_3aaa32de3f366737f4163401f25ad36a.tex | 21 + .../dir_3c028bf27ff0ca18e6fef1c96c0b15e6.tex | 7 + .../dir_3fba8f4249fcded8acf0d58cb4b2908c.tex | 11 + .../dir_41b60d89ff3e63ab46a3e1149f733e71.tex | 9 + .../dir_4336da0f5495bbaf9d3e5dbf6dc34a3b.tex | 7 + .../dir_4600d35be30302c4f82c762933a95149.tex | 7 + .../dir_46bb5cba78f3d659357596b06de24bf6.tex | 9 + .../dir_4b117179b94f57436657819294870333.tex | 9 + .../dir_4dfbf0dfe91a70509baf4d63dfcfcc89.tex | 25 + .../dir_510be4f72cc28193897cc86401cba96f.tex | 11 + .../dir_543ba87a51cfd72533030917770f2e9b.tex | 15 + .../dir_5557d2dfca73451af42ecb1cc3f4abba.tex | 7 + .../dir_5cb3408a2640a05bbe5a2bd7ac1425c0.tex | 19 + .../dir_5d100c2ee59e1240a58e5c289fb89725.tex | 11 + .../dir_605117065d7c8c97aabf9f28515eba73.tex | 23 + .../dir_61af95113b1c3b9440ec0074b124f011.tex | 17 + .../dir_630fcb25634efa01e994e9aef2f3e6ee.tex | 25 + .../dir_634a8ed938b77d81360973e3e254e296.tex | 15 + .../dir_671c42cbbb63ff19748c8b235d022dd2.tex | 7 + .../dir_6a614e991455c38c24c39f1c281482b8.tex | 7 + .../dir_6ad900e8c05a48e8be1ee4ac03e4b4f7.tex | 7 + .../dir_6b2cccbd1d15715bde7f0ce90277f7bd.tex | 7 + .../dir_6b9671e3c9b220273878dafaffd150ca.tex | 9 + .../dir_6da89819271f0a19271417f22567ac14.tex | 17 + .../dir_6dd7a4a9281b42b5ea66482ce4ab570d.tex | 9 + .../dir_70714d2aca86afc563a34e5a9827e459.tex | 9 + .../dir_72b3b577103c4e1d818c29293ca64182.tex | 35 + .../dir_749f43066334c41d074768d87138b910.tex | 11 + .../dir_74d81e3051d166463177e7d329645fd7.tex | 13 + .../dir_759b7552192ad4c73f4203223d9fa7bd.tex | 7 + .../dir_762ab1aaffcdc16c534d7f44ec94ed85.tex | 13 + .../dir_779215781e0c56b2dbe71db7dc4ffde1.tex | 7 + .../dir_78cb9699776baeaa5a3078007071323f.tex | 11 + .../dir_7d80b55b8874981d2c05fea5bbc460de.tex | 31 + .../dir_7e35627299eadc140fa9f5b7bf8b752f.tex | 11 + .../dir_7f0790c84fb90bf7e23bc1b5170de075.tex | 9 + .../dir_7f3d2c3741e3cebf940be7b1b5e1e296.tex | 9 + .../dir_833dd6cfcfb93ae3949f725b30f9f0b3.tex | 17 + .../dir_843369d2751018e7d78858c9a71e64cd.tex | 7 + .../dir_85d95bcfdae2672eb6e746472fb99deb.tex | 7 + .../dir_88765eb59bb63182d83beb82b232fd6a.tex | 7 + .../dir_8c50fd412e5423dbdcf739a7e016f159.tex | 9 + .../dir_93fd190f9784dd3dd42f9b99be91f00f.tex | 11 + .../dir_98608e1fdd8c96ffd63941cc9a97da72.tex | 9 + .../dir_9ce6686f5bf5a431b61c5e3d2d4edf5f.tex | 9 + .../dir_a154d89777d2ada6b1db063fa79917f4.tex | 13 + .../dir_a1bfd36036f718300d642d927b53a244.tex | 15 + .../dir_a5460467d48412bac8a5d370a0db913c.tex | 7 + .../dir_a59373bc14508c66c1aa06e8d8bc8f86.tex | 7 + .../dir_a7080a07f6c13140b95a96f2e4f9f58e.tex | 13 + .../dir_a8437566e3ea5ecb62f55f67b9e4dc7a.tex | 7 + .../dir_a8c71ea87835c0d8a05c4d4cfe708aa4.tex | 9 + .../dir_a995487c8d63d1383a78289498ad6a65.tex | 7 + .../dir_ab0c921bdd9a9e5f1288a99c079e4979.tex | 7 + .../dir_ae8b9a58c4fbe997ebbfd3d6682707a5.tex | 7 + .../dir_af9069c38f2c19d58b3a8be371ba0f22.tex | 7 + .../dir_afba8e1a2b546f24731d7f7c3e5b6ade.tex | 11 + .../dir_aff2a07b8353ec749f36856f01c7d4a6.tex | 9 + .../dir_b3573a60974c7f178e0fb0a6a8a6c75f.tex | 13 + .../dir_b365eb187f183b5df72a97d850f7180a.tex | 7 + .../dir_b4786a23037e6930f849d1b2151b2e07.tex | 11 + .../dir_b65b9f777b5a5f6237a6c760eefe3795.tex | 7 + .../dir_b74c14a59839bde55b254b6580d7dfe6.tex | 7 + .../dir_b9248ce9a2767a12c61d4d45f2280b32.tex | 9 + .../dir_bb5bcff7a5bad458d8a7e628656fad56.tex | 7 + .../dir_bde32bf976401edbce144c1ca78437b0.tex | 7 + .../dir_be8d20f8b92420c4109550e14991a9fb.tex | 15 + .../dir_bea013136ac6d3f377c968c2beaaa893.tex | 25 + .../dir_c03632983561d195ae60c8cc9da44571.tex | 7 + .../dir_c04c9bebcd5da6ee4826760db194f738.tex | 7 + .../dir_c0642c19cc2587483da76293a392fed9.tex | 13 + .../dir_c2512795e3a4512bee9d568cc25983f1.tex | 13 + .../dir_c252896fd4388b12116c6321cce38484.tex | 21 + .../dir_c35f050220a147549410dacfeb76a0d7.tex | 11 + .../dir_c3d2eb9dde46f0ea73f8afe6370f2777.tex | 9 + .../dir_c3d61c7657b31db0d37f8715a88169d1.tex | 7 + .../dir_c44d038dcc0269d9192477c7773019a9.tex | 7 + .../dir_c52bf2e4596f9f72c1d98ba6dcbced26.tex | 9 + .../dir_ceb3708e9b274deb981df4e08a597703.tex | 17 + .../dir_d1cdc94e4743062d51d03f2ab07fd0d2.tex | 9 + .../dir_d34ca186a80f92f31027d832db95126c.tex | 7 + .../dir_d35b6de7ba3ee658750082a39610a085.tex | 7 + .../dir_d499546f32b62e621cbb46a9bd7235a1.tex | 25 + .../dir_d87f7b488c593ccac8e50b6adb209b28.tex | 7 + .../dir_d9c187d8ae5f0bd15615fe91d1359a4a.tex | 15 + .../dir_dbe3accc307b9bf6afea11f2c193cb27.tex | 9 + .../dir_dd0a5b517506d8c0f057cfaecb7b3dc0.tex | 7 + .../dir_e05a0e25cf09c63f5adca92ff25f8b76.tex | 7 + .../dir_e09fccf4effa8ccdaa55ad5954043e6e.tex | 7 + .../dir_e256ef861b355381072786cf7d6ec888.tex | 35 + .../dir_e504cc91e30efc744fb3203a7e8c72ab.tex | 7 + .../dir_e54074d57bcfa9665c1a30adcc935096.tex | 7 + .../dir_e63bd246281937e955d4714b96846de6.tex | 11 + .../dir_e81e95489ce2e46abb84fd29d6a72d62.tex | 7 + .../dir_ead3f6887c571328b70ed30eb47cb8e9.tex | 15 + .../dir_eae072b88d613e8d7b5192fe7d125af6.tex | 17 + .../dir_eb8ca45731295244f599d183ce849a41.tex | 9 + .../dir_ed3596e77998d87ed8ef810021a85e9c.tex | 69 ++ .../dir_eec688965624bb19de0a965b56266886.tex | 9 + .../dir_ef94255a62432ae865475b379d8bd501.tex | 2 +- .../dir_f48266d516bf22e0f95921002a52f5e0.tex | 11 + .../dir_fb333e6e1aef903e906ff887888876d0.tex | 7 + .../dir_fc112d82c1af6fd1c09d247ef04c25e6.tex | 7 + .../dir_fd957caaaf9933bd05516ec5a0d9bc40.tex | 15 + .../dir_fe7c91cff9293174cda4e8ad4e82d438.tex | 11 + .../dma__ex2__repeated_block_u_a_r_t_8c.tex | 25 + .../dma__ex3__single_transfer_s_p_i_8c.tex | 108 +++ .../dma__ex4__single_transfer_a_d_c12_8c.tex | 85 ++ .../latex/documentation_guide.tex | 10 +- ...__output_toggle_vcomp_vs_vref1_85_v_8c.tex | 25 + ...comp__ex2__interrupt_vcomp_vs1_85_v_8c.tex | 37 + .../eusci__a__spi__ex1__3_wire_master_8c.tex | 79 ++ .../eusci__a__spi__ex1__3_wire_slave_8c.tex | 75 ++ ...__a__uart__ex1__loopback115200_baud_8c.tex | 79 ++ ...i__b__i2c__ex1__master_t_x_multiple_8c.tex | 55 ++ ...ci__b__i2c__ex1__slave_r_x_multiple_8c.tex | 67 ++ ...i__b__i2c__ex2__master_r_x_multiple_8c.tex | 67 ++ ...ci__b__i2c__ex2__slave_t_x_multiple_8c.tex | 97 ++ .../eusci__b__spi__ex1__3_wire_master_8c.tex | 79 ++ .../eusci__b__spi__ex1__3_wire_slave_8c.tex | 75 ++ Generated Documentation/latex/files.tex | 410 ++++++++- .../flashctl__ex1__info_segment_write_8c.tex | 85 ++ .../flashctl__ex1__write_to_info_b_8c.tex | 151 ++++ .../flashctl__ex2__erase_copy_write_8c.tex | 153 ++++ .../flashctl__ex3__long_word_write_8c.tex | 79 ++ .../flashctl__ex4__write_to_info_a_8c.tex | 151 ++++ .../latex/framctl__a__ex1__write_8c.tex | 40 + .../latex/gpio__ex1__toggle_output_8c.tex | 25 + .../latex/gpio__ex2__input_interrupt_8c.tex | 33 + .../latex/group__dac12__examples__list.tex | 28 + .../latex/group__ref__examples__list.tex | 29 + Generated Documentation/latex/hardware.tex | 97 +- .../latex/hspll__ex1__output__ussxtosc_8c.tex | 49 + .../latex/icc__ex1__nested_interrupt_8c.tex | 106 +++ Generated Documentation/latex/index.tex | 10 +- .../latex/lcd__b__ex1__4mux_8c.tex | 34 + .../latex/lcd__c__ex1__4mux_8c.tex | 38 + .../latex/lcd__e__ex1__4__mux_8c.tex | 35 + .../ldopwr__ex1__internal_l_d_o_power_8c.tex | 63 ++ .../latex/ldopwr__ex2__software_poll_8c.tex | 44 + ...ldopwr__ex3__internal_l_d_o_enabled_8c.tex | 68 ++ Generated Documentation/latex/modules.tex | 2 + .../latex/mtif__ex1__pulse_generation_8c.tex | 63 ++ .../latex/oa__ex1__general_purpose_8c.tex | 25 + .../latex/oa__ex2__general_purpose_8c.tex | 21 + .../latex/oa__ex3__unity_gain_buffer_8c.tex | 21 + .../latex/package_8defs_8h.tex | 2 + ...ti_8mcu_8msp430_8driverlib_8product_8c.tex | 63 ++ .../pmap__ex1__single_runtime_config_8c.tex | 89 ++ .../pmap__ex2__output_timer_b_signal_8c.tex | 87 ++ ...3__single_function_to_multiple_pins_8c.tex | 114 +++ .../latex/pmm__ex1__lpm4-5_8c.tex | 49 + .../latex/pmm__ex1__vcore3_8c.tex | 68 ++ .../latex/pmm__ex2__fast_wake_up_8c.tex | 103 +++ .../latex/pmm__ex2__vmon1160m_v_8c.tex | 41 + .../pmm__ex3__low_current_consumption_8c.tex | 101 +++ .../latex/ram__ex1__set_sector_off_8c.tex | 83 ++ .../latex/ram__ex1__turn_off_sector_8c.tex | 77 ++ .../latex/ref__a__ex1__ctl_a_d_c12_b_8c.tex | 25 + .../latex/ref__ex1___a_d_c12_ctl_8c.tex | 25 + .../latex/ref__ex1__internal_reference_8c.tex | 98 ++ Generated Documentation/latex/refman.tex | 422 ++++++++- Generated Documentation/latex/resources.tex | 27 + .../latex/rtc__a__ex1__calendermode_8c.tex | 86 ++ .../latex/rtc__a__ex2__countermode_8c.tex | 58 ++ .../rtc__b__ex1__calendermode_l_p_m0_8c.tex | 78 ++ .../rtc__b__ex2__calendermode_l_p_m3_8c.tex | 79 ++ .../latex/rtc__ex1__countmode_8c.tex | 77 ++ .../latex/sac__ex1__oa_g_p_mode_8c.tex | 26 + .../sac__ex2__unity_gain_buffer_mode_8c.tex | 26 + .../sac__ex3__two_stage_amplifier_8c.tex | 48 + .../latex/sac__ex4__ecomp_8c.tex | 44 + ...aph__a__ex3__pulse_generation_d_m_a_8c.tex | 251 ++++++ .../latex/saph__ex1__pulse_generation_8c.tex | 25 + ..._b__ex1__single_conv_single_channel_8c.tex | 47 + ...__b__ex2__single_conv_channel_group_8c.tex | 63 ++ ...4__b__ex3__cont_conv_single_channel_8c.tex | 73 ++ ...ontinuous_conversion_group_channels_8c.tex | 129 +++ ...2__single_conversion_group_channels_8c.tex | 63 ++ ...ontinuous_conversion_single_channel_8c.tex | 63 ++ ...e_conversion_single_channel_polling_8c.tex | 47 + ...conversion_single_channel_interrupt_8c.tex | 71 ++ ...rsion_single_conversion_temp_sensor_8c.tex | 71 ++ .../latex/sdhs__ex1__8msps__sampling_8c.tex | 25 + .../latex/tec__ex1__sync_timers_8c.tex | 55 ++ .../latex/tec__ex2__ext_clear_input_8c.tex | 55 ++ ..._mcu__msp430__driverlib__product_8java.tex | 7 + .../tia__ex1__two_external_inputs_8c.tex | 25 + ..._ex1__continuous_overflow_interrupt_8c.tex | 37 + .../latex/timer__a__ex2__single_p_w_m_8c.tex | 55 ++ .../timer__a__ex3__up_mode_interrupt_8c.tex | 55 ++ .../timer__a__ex4__period_capture_8c.tex | 97 ++ ...__ex10__duty_cycle_measurement_dual_8c.tex | 175 ++++ .../latex/timer__d__ex1__cont_c_r_r0_8c.tex | 37 + .../timer__d__ex2__overflow_i_s_r_8c.tex | 37 + .../latex/timer__d__ex3__up_down_mode_8c.tex | 25 + .../timer__d__ex4__pwm_up_down_mode_8c.tex | 25 + ...__d__ex5__hi_res_free_running_p_w_m_8c.tex | 25 + ...mer__d__ex6__hi_res_regulated_p_w_m_8c.tex | 37 + .../timer__d__ex7__combine_regs_p_w_m_8c.tex | 25 + ..._ex8__duty_cycle_measurement_single_8c.tex | 175 ++++ .../timer__d__ex9__period_measurement_8c.tex | 126 +++ .../latex/tlv__ex1__check_checksum_8c.tex | 25 + .../latex/ucs__ex1___d_c_o12_m_hz_8c.tex | 133 +++ .../ucs__ex2___v_l_o_sources_a_c_l_k_8c.tex | 97 ++ .../ucs__ex3___x_t1_sources_a_c_l_k_8c.tex | 86 ++ ...s__ex4___x_t_sources_d_c_o_internal_8c.tex | 177 ++++ .../latex/usci__a__spi__ex1__master_8c.tex | 134 +++ .../latex/usci__a__spi__ex1__slave_8c.tex | 116 +++ ...sci__a__uart__ex1__loopback_advance_8c.tex | 134 +++ ...ex2__address_bit_multiprocessor_r_x_8c.tex | 144 +++ ...ex2__address_bit_multiprocessor_t_x_8c.tex | 176 ++++ ...t__ex3__auto_baudrate_detection_r_x_8c.tex | 144 +++ ...t__ex3__auto_baudrate_detection_t_x_8c.tex | 160 ++++ ...__ex4__idle_line_multiprocessor_r_x_8c.tex | 156 ++++ ...t__ex4__idleline_multiprocessor_t_x_8c.tex | 176 ++++ ...usci__b__i2c__ex1__master_rx_single_8c.tex | 94 ++ .../usci__b__i2c__ex1__slave_tx_single_8c.tex | 78 ++ ...ci__b__i2c__ex2__master_tx_multiple_8c.tex | 134 +++ ...sci__b__i2c__ex2__slave_rx_multiple_8c.tex | 110 +++ ...usci__b__i2c__ex3__master_tx_single_8c.tex | 94 ++ .../usci__b__i2c__ex3__slave_rx_single_8c.tex | 94 ++ ...ci__b__i2c__ex4__master_rx_multiple_8c.tex | 144 +++ ...sci__b__i2c__ex4__slave_tx_multiple_8c.tex | 144 +++ .../latex/usci__b__spi__ex1__master_8c.tex | 134 +++ .../latex/usci__b__spi__ex1__slave_8c.tex | 116 +++ .../latex/wdt__ex1__interval_mode_8c.tex | 33 + .../latex/wdt__ex2__watchdog_mode_8c.tex | 25 + Hardware/!Hardware.markdown | 1 + Hardware/Power Design.markdown | 33 + 2594 files changed, 248861 insertions(+), 1726 deletions(-) create mode 100644 Generated Documentation/html/_9_resources_8markdown.html create mode 100644 Generated Documentation/html/_board_8h.html create mode 100644 Generated Documentation/html/_board_8h_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2crc_2crc__ex1__build_signature_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2crc_2crc__ex1__build_signature_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2crc_2crc__ex1__build_signature_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2dma_2dma__ex1__repeated_block_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2dma_2dma__ex1__repeated_block_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2dma_2dma__ex1__repeated_block_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex1__output_hi_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex2__input_capture_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex3__software_poll_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2crc_2crc__ex1__build_signature_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2crc_2crc__ex1__build_signature_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2crc_2crc__ex1__build_signature_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2framctl_2framctl__ex1__write_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2framctl_2framctl__ex1__write_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2framctl_2framctl__ex1__write_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex1__output_hi_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex1__output_hi_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex1__output_hi_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex2__input_capture_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex2__input_capture_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex2__input_capture_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex3__software_poll_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex3__software_poll_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex3__software_poll_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex4__write_to_port1_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex4__write_to_port1_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex4__write_to_port1_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex15__fraction_mode_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex15__fraction_mode_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2pmm_2pmm___reset___l_p_mx__5_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2pmm_2pmm___reset___l_p_mx__5_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2pmm_2pmm___reset___l_p_mx__5_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex1__pwm_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex1__pwm_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex1__pwm_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex3__pwm_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex3__pwm_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex3__pwm_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex4__up_mode_operation_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex5__single_p_w_m_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2tlv_2tlv__ex1__get_device_type_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2tlv_2tlv__ex1__get_device_type_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2tlv_2tlv__ex1__get_device_type_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2crc_2crc__ex1__build_signature_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2crc_2crc__ex1__build_signature_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2crc_2crc__ex1__build_signature_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2dma_2dma__ex1__repeated_block_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2dma_2dma__ex1__repeated_block_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2dma_2dma__ex1__repeated_block_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2framctl_2framctl__ex1__write_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2framctl_2framctl__ex1__write_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2framctl_2framctl__ex1__write_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex1__output_hi_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex1__output_hi_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex1__output_hi_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex2__input_capture_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex2__input_capture_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex2__input_capture_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex3__software_poll_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex3__software_poll_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex3__software_poll_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex4__write_to_port1_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex4__write_to_port1_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex4__write_to_port1_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex1__three_seg_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex1__three_seg_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex1__three_seg_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex15__fraction_mode_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex15__fraction_mode_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2pmm_2pmm___reset___l_p_mx__5_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2pmm_2pmm___reset___l_p_mx__5_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2pmm_2pmm___reset___l_p_mx__5_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2rtc__b_2rtc__b__ex1__calendermode_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2rtc__b_2rtc__b__ex1__calendermode_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2rtc__b_2rtc__b__ex1__calendermode_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex1__pwm_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex1__pwm_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex1__pwm_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex3__pwm_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex3__pwm_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex3__pwm_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex4__up_mode_operation_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex5__single_p_w_m_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2tlv_2tlv__ex1__get_device_type_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2tlv_2tlv__ex1__get_device_type_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2tlv_2tlv__ex1__get_device_type_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2crc_2crc__ex1__build_signature_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2crc_2crc__ex1__build_signature_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2crc_2crc__ex1__build_signature_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2dma_2dma__ex1__repeated_block_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2dma_2dma__ex1__repeated_block_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2dma_2dma__ex1__repeated_block_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2framctl_2framctl__ex1__write_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2framctl_2framctl__ex1__write_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2framctl_2framctl__ex1__write_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex1__output_hi_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex2__input_capture_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex3__software_poll_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2pmm_2pmm___reset___l_p_mx__5_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2pmm_2pmm___reset___l_p_mx__5_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2pmm_2pmm___reset___l_p_mx__5_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__b_2rtc__b__ex1__calendermode_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__b_2rtc__b__ex1__calendermode_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__b_2rtc__b__ex1__calendermode_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c_source.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js create mode 100644 Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c_source.html create mode 100644 Generated Documentation/html/_power_01_design_8markdown.html create mode 100644 Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f5xx__6xx_200__empty_project_2main_8c.html create mode 100644 Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f5xx__6xx_200__empty_project_2main_8c.js create mode 100644 Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f5xx__6xx_200__empty_project_2main_8c_source.html create mode 100644 Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r2xx__4xx_200__empty_project_2main_8c.html create mode 100644 Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r2xx__4xx_200__empty_project_2main_8c.js create mode 100644 Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r2xx__4xx_200__empty_project_2main_8c_source.html create mode 100644 Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r57xx_200__empty_project_2main_8c.html create mode 100644 Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r57xx_200__empty_project_2main_8c.js create mode 100644 Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r57xx_200__empty_project_2main_8c_source.html create mode 100644 Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r5xx__6xx_200__empty_project_2main_8c.html create mode 100644 Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r5xx__6xx_200__empty_project_2main_8c.js create mode 100644 Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r5xx__6xx_200__empty_project_2main_8c_source.html create mode 100644 Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430i2xx_200__empty_project_2main_8c.html create mode 100644 Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430i2xx_200__empty_project_2main_8c.js create mode 100644 Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430i2xx_200__empty_project_2main_8c_source.html create mode 100644 Generated Documentation/html/_software_2_code_01_composer_01_studio_01_workspace_2_sunseeker_telemetry_and_lighting_system_2main_8c.html create mode 100644 Generated Documentation/html/_software_2_code_01_composer_01_studio_01_workspace_2_sunseeker_telemetry_and_lighting_system_2main_8c.js create mode 100644 Generated Documentation/html/_software_2_code_01_composer_01_studio_01_workspace_2_sunseeker_telemetry_and_lighting_system_2main_8c_source.html create mode 100644 Generated Documentation/html/adc10__a__ex1__avcc_ref_8c.html create mode 100644 Generated Documentation/html/adc10__a__ex1__avcc_ref_8c.js create mode 100644 Generated Documentation/html/adc10__a__ex1__avcc_ref_8c_source.html create mode 100644 Generated Documentation/html/adc10__a__ex2__int_ref_8c.html create mode 100644 Generated Documentation/html/adc10__a__ex2__int_ref_8c.js create mode 100644 Generated Documentation/html/adc10__a__ex2__int_ref_8c_source.html create mode 100644 Generated Documentation/html/adc10__a__ex3__window_comp_8c.html create mode 100644 Generated Documentation/html/adc10__a__ex3__window_comp_8c.js create mode 100644 Generated Documentation/html/adc10__a__ex3__window_comp_8c_source.html create mode 100644 Generated Documentation/html/adc10__a__ex4__signed_data_8c.html create mode 100644 Generated Documentation/html/adc10__a__ex4__signed_data_8c.js create mode 100644 Generated Documentation/html/adc10__a__ex4__signed_data_8c_source.html create mode 100644 Generated Documentation/html/adc10__a__ex5__batt_monitor_8c.html create mode 100644 Generated Documentation/html/adc10__a__ex5__batt_monitor_8c.js create mode 100644 Generated Documentation/html/adc10__a__ex5__batt_monitor_8c_source.html create mode 100644 Generated Documentation/html/adc10__a__ex6__ref_toggle_8c.html create mode 100644 Generated Documentation/html/adc10__a__ex6__ref_toggle_8c.js create mode 100644 Generated Documentation/html/adc10__a__ex6__ref_toggle_8c_source.html create mode 100644 Generated Documentation/html/adc10__a__ex7__repeat_single_d_m_a_8c.html create mode 100644 Generated Documentation/html/adc10__a__ex7__repeat_single_d_m_a_8c.js create mode 100644 Generated Documentation/html/adc10__a__ex7__repeat_single_d_m_a_8c_source.html create mode 100644 Generated Documentation/html/adc10__a__ex8__sequence_d_m_a_8c.html create mode 100644 Generated Documentation/html/adc10__a__ex8__sequence_d_m_a_8c.js create mode 100644 Generated Documentation/html/adc10__a__ex8__sequence_d_m_a_8c_source.html create mode 100644 Generated Documentation/html/adc10__a__ex9__repeat_seq_8c.html create mode 100644 Generated Documentation/html/adc10__a__ex9__repeat_seq_8c.js create mode 100644 Generated Documentation/html/adc10__a__ex9__repeat_seq_8c_source.html create mode 100644 Generated Documentation/html/adc10__b__ex1__avcc_ref_8c.html create mode 100644 Generated Documentation/html/adc10__b__ex1__avcc_ref_8c.js create mode 100644 Generated Documentation/html/adc10__b__ex1__avcc_ref_8c_source.html create mode 100644 Generated Documentation/html/adc10__b__ex2__int_ref_8c.html create mode 100644 Generated Documentation/html/adc10__b__ex2__int_ref_8c.js create mode 100644 Generated Documentation/html/adc10__b__ex2__int_ref_8c_source.html create mode 100644 Generated Documentation/html/adc12__a__ex1__avcc_ref_8c.html create mode 100644 Generated Documentation/html/adc12__a__ex1__avcc_ref_8c.js create mode 100644 Generated Documentation/html/adc12__a__ex1__avcc_ref_8c_source.html create mode 100644 Generated Documentation/html/adc12__a__ex2__int_ref_8c.html create mode 100644 Generated Documentation/html/adc12__a__ex2__int_ref_8c.js create mode 100644 Generated Documentation/html/adc12__a__ex2__int_ref_8c_source.html create mode 100644 Generated Documentation/html/adc12__a__ex3__ext_ref_8c.html create mode 100644 Generated Documentation/html/adc12__a__ex3__ext_ref_8c.js create mode 100644 Generated Documentation/html/adc12__a__ex3__ext_ref_8c_source.html create mode 100644 Generated Documentation/html/adc12__a__ex4__repeated_seq_8c.html create mode 100644 Generated Documentation/html/adc12__a__ex4__repeated_seq_8c.js create mode 100644 Generated Documentation/html/adc12__a__ex4__repeated_seq_8c_source.html create mode 100644 Generated Documentation/html/adc12__a__ex5__repeated_single_8c.html create mode 100644 Generated Documentation/html/adc12__a__ex5__repeated_single_8c.js create mode 100644 Generated Documentation/html/adc12__a__ex5__repeated_single_8c_source.html create mode 100644 Generated Documentation/html/adc12__a__ex6__extended_inputs_8c.html create mode 100644 Generated Documentation/html/adc12__a__ex6__extended_inputs_8c.js create mode 100644 Generated Documentation/html/adc12__a__ex6__extended_inputs_8c_source.html create mode 100644 Generated Documentation/html/adc12__a__ex7__sequence_8c.html create mode 100644 Generated Documentation/html/adc12__a__ex7__sequence_8c.js create mode 100644 Generated Documentation/html/adc12__a__ex7__sequence_8c_source.html create mode 100644 Generated Documentation/html/adc12__a__ex8__temp_sensor_8c.html create mode 100644 Generated Documentation/html/adc12__a__ex8__temp_sensor_8c.js create mode 100644 Generated Documentation/html/adc12__a__ex8__temp_sensor_8c_source.html create mode 100644 Generated Documentation/html/adc12__b__ex1__avcc_ref_8c.html create mode 100644 Generated Documentation/html/adc12__b__ex1__avcc_ref_8c.js create mode 100644 Generated Documentation/html/adc12__b__ex1__avcc_ref_8c_source.html create mode 100644 Generated Documentation/html/adc12__b__ex2__shared_ref_8c.html create mode 100644 Generated Documentation/html/adc12__b__ex2__shared_ref_8c.js create mode 100644 Generated Documentation/html/adc12__b__ex2__shared_ref_8c_source.html create mode 100644 Generated Documentation/html/adc12__b__ex3__ext_ref_8c.html create mode 100644 Generated Documentation/html/adc12__b__ex3__ext_ref_8c.js create mode 100644 Generated Documentation/html/adc12__b__ex3__ext_ref_8c_source.html create mode 100644 Generated Documentation/html/adc__ex1__avcc_ref_8c.html create mode 100644 Generated Documentation/html/adc__ex1__avcc_ref_8c.js create mode 100644 Generated Documentation/html/adc__ex1__avcc_ref_8c_source.html create mode 100644 Generated Documentation/html/adc__ex2__int_ref_8c.html create mode 100644 Generated Documentation/html/adc__ex2__int_ref_8c.js create mode 100644 Generated Documentation/html/adc__ex2__int_ref_8c_source.html create mode 100644 Generated Documentation/html/aes256__ex1__encrypt_decrypt_8c.html create mode 100644 Generated Documentation/html/aes256__ex1__encrypt_decrypt_8c.js create mode 100644 Generated Documentation/html/aes256__ex1__encrypt_decrypt_8c_source.html create mode 100644 Generated Documentation/html/aes__ex1__encrypt_decrypt_8c.html create mode 100644 Generated Documentation/html/aes__ex1__encrypt_decrypt_8c.js create mode 100644 Generated Documentation/html/aes__ex1__encrypt_decrypt_8c_source.html create mode 100644 Generated Documentation/html/aes__ex2__encrypt_decrypt_with_first_round_key_8c.html create mode 100644 Generated Documentation/html/aes__ex2__encrypt_decrypt_with_first_round_key_8c.js create mode 100644 Generated Documentation/html/aes__ex2__encrypt_decrypt_with_first_round_key_8c_source.html create mode 100644 Generated Documentation/html/annotated.html create mode 100644 Generated Documentation/html/annotated_dup.js create mode 100644 Generated Documentation/html/battbak__ex1__calendermode_l_p_m3_8c.html create mode 100644 Generated Documentation/html/battbak__ex1__calendermode_l_p_m3_8c.js create mode 100644 Generated Documentation/html/battbak__ex1__calendermode_l_p_m3_8c_source.html create mode 100644 Generated Documentation/html/classes.html create mode 100644 Generated Documentation/html/classti__mcu__msp430__driverlib__product.html create mode 100644 Generated Documentation/html/classti__mcu__msp430__driverlib__product.js create mode 100644 Generated Documentation/html/comp__b__ex1__2_v_ref_8c.html create mode 100644 Generated Documentation/html/comp__b__ex1__2_v_ref_8c.js create mode 100644 Generated Documentation/html/comp__b__ex1__2_v_ref_8c_source.html create mode 100644 Generated Documentation/html/comp__b__ex2__1_v5_ref_int_8c.html create mode 100644 Generated Documentation/html/comp__b__ex2__1_v5_ref_int_8c.js create mode 100644 Generated Documentation/html/comp__b__ex2__1_v5_ref_int_8c_source.html create mode 100644 Generated Documentation/html/comp__b__ex3__avcc_ref_u_l_p_m_8c.html create mode 100644 Generated Documentation/html/comp__b__ex3__avcc_ref_u_l_p_m_8c.js create mode 100644 Generated Documentation/html/comp__b__ex3__avcc_ref_u_l_p_m_8c_source.html create mode 100644 Generated Documentation/html/comp__b__ex4__hysteresis_8c.html create mode 100644 Generated Documentation/html/comp__b__ex4__hysteresis_8c.js create mode 100644 Generated Documentation/html/comp__b__ex4__hysteresis_8c_source.html create mode 100644 Generated Documentation/html/comp__b__ex5___t_ax_8c.html create mode 100644 Generated Documentation/html/comp__b__ex5___t_ax_8c.js create mode 100644 Generated Documentation/html/comp__b__ex5___t_ax_8c_source.html create mode 100644 Generated Documentation/html/comp__b__ex6__ext_ref_8c.html create mode 100644 Generated Documentation/html/comp__b__ex6__ext_ref_8c.js create mode 100644 Generated Documentation/html/comp__b__ex6__ext_ref_8c_source.html create mode 100644 Generated Documentation/html/comp__d__ex1__output_toggle_vcomp_vs_vref2_v_8c.html create mode 100644 Generated Documentation/html/comp__d__ex1__output_toggle_vcomp_vs_vref2_v_8c.js create mode 100644 Generated Documentation/html/comp__d__ex1__output_toggle_vcomp_vs_vref2_v_8c_source.html create mode 100644 Generated Documentation/html/comp__d__ex2__output_toggle_vcomp_vs_vref25v_8c.html create mode 100644 Generated Documentation/html/comp__d__ex2__output_toggle_vcomp_vs_vref25v_8c.js create mode 100644 Generated Documentation/html/comp__d__ex2__output_toggle_vcomp_vs_vref25v_8c_source.html create mode 100644 Generated Documentation/html/comp__d__ex3__interrupt_vcomp_vs15_v_8c.html create mode 100644 Generated Documentation/html/comp__d__ex3__interrupt_vcomp_vs15_v_8c.js create mode 100644 Generated Documentation/html/comp__d__ex3__interrupt_vcomp_vs15_v_8c_source.html create mode 100644 Generated Documentation/html/comp__d__ex4__output_toggle_vcomp_vs_half_vcc_8c.html create mode 100644 Generated Documentation/html/comp__d__ex4__output_toggle_vcomp_vs_half_vcc_8c.js create mode 100644 Generated Documentation/html/comp__d__ex4__output_toggle_vcomp_vs_half_vcc_8c_source.html create mode 100644 Generated Documentation/html/comp__d__ex5__output_toggle_hysteresis_8c.html create mode 100644 Generated Documentation/html/comp__d__ex5__output_toggle_hysteresis_8c.js create mode 100644 Generated Documentation/html/comp__d__ex5__output_toggle_hysteresis_8c_source.html create mode 100644 Generated Documentation/html/comp__e__ex1__output_toggle_vcomp_vs_vref2_v_8c.html create mode 100644 Generated Documentation/html/comp__e__ex1__output_toggle_vcomp_vs_vref2_v_8c.js create mode 100644 Generated Documentation/html/comp__e__ex1__output_toggle_vcomp_vs_vref2_v_8c_source.html create mode 100644 Generated Documentation/html/comp__e__ex2__output_toggle_vcomp_vs_vref25_v_8c.html create mode 100644 Generated Documentation/html/comp__e__ex2__output_toggle_vcomp_vs_vref25_v_8c.js create mode 100644 Generated Documentation/html/comp__e__ex2__output_toggle_vcomp_vs_vref25_v_8c_source.html create mode 100644 Generated Documentation/html/comp__e__ex3__interrupt_vcomp_vs12_v_8c.html create mode 100644 Generated Documentation/html/comp__e__ex3__interrupt_vcomp_vs12_v_8c.js create mode 100644 Generated Documentation/html/comp__e__ex3__interrupt_vcomp_vs12_v_8c_source.html create mode 100644 Generated Documentation/html/comp__e__ex4__output_toggle_vcomp_vs_half_vcc_8c.html create mode 100644 Generated Documentation/html/comp__e__ex4__output_toggle_vcomp_vs_half_vcc_8c.js create mode 100644 Generated Documentation/html/comp__e__ex4__output_toggle_vcomp_vs_half_vcc_8c_source.html create mode 100644 Generated Documentation/html/comp__e__ex5__output_toggle_hysteresis_8c.html create mode 100644 Generated Documentation/html/comp__e__ex5__output_toggle_hysteresis_8c.js create mode 100644 Generated Documentation/html/comp__e__ex5__output_toggle_hysteresis_8c_source.html create mode 100644 Generated Documentation/html/crc32__ex1__calculate_crc16_8c.html create mode 100644 Generated Documentation/html/crc32__ex1__calculate_crc16_8c.js create mode 100644 Generated Documentation/html/crc32__ex1__calculate_crc16_8c_source.html create mode 100644 Generated Documentation/html/cs__ex1___d_c_o1_m_hz_s_w_trim_8c.html create mode 100644 Generated Documentation/html/cs__ex1___d_c_o1_m_hz_s_w_trim_8c.js create mode 100644 Generated Documentation/html/cs__ex1___d_c_o1_m_hz_s_w_trim_8c_source.html create mode 100644 Generated Documentation/html/cs__ex1__output_clock_signals_8c.html create mode 100644 Generated Documentation/html/cs__ex1__output_clock_signals_8c.js create mode 100644 Generated Documentation/html/cs__ex1__output_clock_signals_8c_source.html create mode 100644 Generated Documentation/html/cs__ex2___d_c_o16_m_hz_8c.html create mode 100644 Generated Documentation/html/cs__ex2___d_c_o16_m_hz_8c.js create mode 100644 Generated Documentation/html/cs__ex2___d_c_o16_m_hz_8c_source.html create mode 100644 Generated Documentation/html/cs__ex2___d_c_o24_m_hz_8c.html create mode 100644 Generated Documentation/html/cs__ex2___d_c_o24_m_hz_8c.js create mode 100644 Generated Documentation/html/cs__ex2___d_c_o24_m_hz_8c_source.html create mode 100644 Generated Documentation/html/cs__ex2___v_l_o_sources_m_c_l_k_8c.html create mode 100644 Generated Documentation/html/cs__ex2___v_l_o_sources_m_c_l_k_8c.js create mode 100644 Generated Documentation/html/cs__ex2___v_l_o_sources_m_c_l_k_8c_source.html create mode 100644 Generated Documentation/html/cs__ex2__calculate_clock_signals_8c.html create mode 100644 Generated Documentation/html/cs__ex2__calculate_clock_signals_8c.js create mode 100644 Generated Documentation/html/cs__ex2__calculate_clock_signals_8c_source.html create mode 100644 Generated Documentation/html/cs__ex3___x_t1_fault_8c.html create mode 100644 Generated Documentation/html/cs__ex3___x_t1_fault_8c.js create mode 100644 Generated Documentation/html/cs__ex3___x_t1_fault_8c_source.html create mode 100644 Generated Documentation/html/cs__ex3___x_t1_sources_a_c_l_k_8c.html create mode 100644 Generated Documentation/html/cs__ex3___x_t1_sources_a_c_l_k_8c.js create mode 100644 Generated Documentation/html/cs__ex3___x_t1_sources_a_c_l_k_8c_source.html create mode 100644 Generated Documentation/html/cs__ex4___x_t_sources_d_c_o_internal_8c.html create mode 100644 Generated Documentation/html/cs__ex4___x_t_sources_d_c_o_internal_8c.js create mode 100644 Generated Documentation/html/cs__ex4___x_t_sources_d_c_o_internal_8c_source.html create mode 100644 Generated Documentation/html/ctsd16__ex1__single_ch_cont_conv_8c.html create mode 100644 Generated Documentation/html/ctsd16__ex1__single_ch_cont_conv_8c.js create mode 100644 Generated Documentation/html/ctsd16__ex1__single_ch_cont_conv_8c_source.html create mode 100644 Generated Documentation/html/ctsd16__ex2__single_ch_single_conv_polling_8c.html create mode 100644 Generated Documentation/html/ctsd16__ex2__single_ch_single_conv_polling_8c.js create mode 100644 Generated Documentation/html/ctsd16__ex2__single_ch_single_conv_polling_8c_source.html create mode 100644 Generated Documentation/html/ctsd16__ex3__single_ch_single_conv_interrupt_8c.html create mode 100644 Generated Documentation/html/ctsd16__ex3__single_ch_single_conv_interrupt_8c.js create mode 100644 Generated Documentation/html/ctsd16__ex3__single_ch_single_conv_interrupt_8c_source.html create mode 100644 Generated Documentation/html/ctsd16__ex4__internal_temp_sensor_8c.html create mode 100644 Generated Documentation/html/ctsd16__ex4__internal_temp_sensor_8c.js create mode 100644 Generated Documentation/html/ctsd16__ex4__internal_temp_sensor_8c_source.html create mode 100644 Generated Documentation/html/ctsd16__ex5__three_ch_single_conv_8c.html create mode 100644 Generated Documentation/html/ctsd16__ex5__three_ch_single_conv_8c.js create mode 100644 Generated Documentation/html/ctsd16__ex5__three_ch_single_conv_8c_source.html create mode 100644 Generated Documentation/html/dac12__a__ex1__1_v5_out_8c.html create mode 100644 Generated Documentation/html/dac12__a__ex1__1_v5_out_8c.js create mode 100644 Generated Documentation/html/dac12__a__ex1__1_v5_out_8c_source.html create mode 100644 Generated Documentation/html/dac12__a__ex2__0_v75_out_8c.html create mode 100644 Generated Documentation/html/dac12__a__ex2__0_v75_out_8c.js create mode 100644 Generated Documentation/html/dac12__a__ex2__0_v75_out_8c_source.html create mode 100644 Generated Documentation/html/dac12__a__ex3__positive_ramp_int_8c.html create mode 100644 Generated Documentation/html/dac12__a__ex3__positive_ramp_int_8c.js create mode 100644 Generated Documentation/html/dac12__a__ex3__positive_ramp_int_8c_source.html create mode 100644 Generated Documentation/html/dac12__a__ex4__grouped_8c.html create mode 100644 Generated Documentation/html/dac12__a__ex4__grouped_8c.js create mode 100644 Generated Documentation/html/dac12__a__ex4__grouped_8c_source.html create mode 100644 Generated Documentation/html/dir_0175f9cbb4633b514b5514f21bec03a0.html create mode 100644 Generated Documentation/html/dir_0175f9cbb4633b514b5514f21bec03a0.js create mode 100644 Generated Documentation/html/dir_026cf2b502f8bbf86cefdc24803245a7.html create mode 100644 Generated Documentation/html/dir_026cf2b502f8bbf86cefdc24803245a7.js create mode 100644 Generated Documentation/html/dir_0471030c6c40e74c2aa9e23909a0aefd.html create mode 100644 Generated Documentation/html/dir_0471030c6c40e74c2aa9e23909a0aefd.js create mode 100644 Generated Documentation/html/dir_04f69be1ff08eefe392fcaf09da102e4.html create mode 100644 Generated Documentation/html/dir_04f69be1ff08eefe392fcaf09da102e4.js create mode 100644 Generated Documentation/html/dir_06231492a7d233fc4a83ba7357554081.html create mode 100644 Generated Documentation/html/dir_06231492a7d233fc4a83ba7357554081.js create mode 100644 Generated Documentation/html/dir_07e7a19cced4ca994622ecf053dbaebb.html create mode 100644 Generated Documentation/html/dir_07e7a19cced4ca994622ecf053dbaebb.js create mode 100644 Generated Documentation/html/dir_082cefa607877865df28aba5f85bc6fe.html create mode 100644 Generated Documentation/html/dir_082cefa607877865df28aba5f85bc6fe.js create mode 100644 Generated Documentation/html/dir_0951772c4bb174d3e698a7a501f39205.html create mode 100644 Generated Documentation/html/dir_0951772c4bb174d3e698a7a501f39205.js create mode 100644 Generated Documentation/html/dir_0bf1e8c1a0485b32b4ea3855c05c5e9f.html create mode 100644 Generated Documentation/html/dir_0bf1e8c1a0485b32b4ea3855c05c5e9f.js create mode 100644 Generated Documentation/html/dir_10079ac620cbbd74c446f76890731701.html create mode 100644 Generated Documentation/html/dir_10079ac620cbbd74c446f76890731701.js create mode 100644 Generated Documentation/html/dir_109b57299c2f7cc571c23ddcc06a7c2e.html create mode 100644 Generated Documentation/html/dir_109b57299c2f7cc571c23ddcc06a7c2e.js create mode 100644 Generated Documentation/html/dir_11a78232b6b0b2534a0769fc18e029c9.html create mode 100644 Generated Documentation/html/dir_11a78232b6b0b2534a0769fc18e029c9.js create mode 100644 Generated Documentation/html/dir_14fcb402065fc02656148105e0b88af8.html create mode 100644 Generated Documentation/html/dir_14fcb402065fc02656148105e0b88af8.js create mode 100644 Generated Documentation/html/dir_1565a4596743f346939089b01b134b85.html create mode 100644 Generated Documentation/html/dir_1565a4596743f346939089b01b134b85.js create mode 100644 Generated Documentation/html/dir_1726e59edf0cdfc0cd477fe472a1d541.html create mode 100644 Generated Documentation/html/dir_1726e59edf0cdfc0cd477fe472a1d541.js create mode 100644 Generated Documentation/html/dir_17daed8eeb6fb5022fcc96df7cc52430.html create mode 100644 Generated Documentation/html/dir_17daed8eeb6fb5022fcc96df7cc52430.js create mode 100644 Generated Documentation/html/dir_1b03434fe1954bcac8b5ee387e9cbef9.html create mode 100644 Generated Documentation/html/dir_1b03434fe1954bcac8b5ee387e9cbef9.js create mode 100644 Generated Documentation/html/dir_1bbd2b7171cd7cf40620edab77a45e65.html create mode 100644 Generated Documentation/html/dir_1bbd2b7171cd7cf40620edab77a45e65.js create mode 100644 Generated Documentation/html/dir_1dc93fad658d497d540ca6f49d4eae01.html create mode 100644 Generated Documentation/html/dir_1dc93fad658d497d540ca6f49d4eae01.js create mode 100644 Generated Documentation/html/dir_1e8a087624731203a4e03c56185a5ede.html create mode 100644 Generated Documentation/html/dir_1e8a087624731203a4e03c56185a5ede.js create mode 100644 Generated Documentation/html/dir_1f3a4db757d3e95a006fc493c3318364.html create mode 100644 Generated Documentation/html/dir_1f3a4db757d3e95a006fc493c3318364.js create mode 100644 Generated Documentation/html/dir_1fb5ef0779154eaf786832488fc134cb.html create mode 100644 Generated Documentation/html/dir_1fb5ef0779154eaf786832488fc134cb.js create mode 100644 Generated Documentation/html/dir_21f3df333188901ff8460d06725eaffa.html create mode 100644 Generated Documentation/html/dir_21f3df333188901ff8460d06725eaffa.js create mode 100644 Generated Documentation/html/dir_25c248bdb2c4a10c020f8b7aee9fc291.html create mode 100644 Generated Documentation/html/dir_25c248bdb2c4a10c020f8b7aee9fc291.js create mode 100644 Generated Documentation/html/dir_27f6d00ac9f631b8de85eccb4b9708f1.html create mode 100644 Generated Documentation/html/dir_27f6d00ac9f631b8de85eccb4b9708f1.js create mode 100644 Generated Documentation/html/dir_295ec522445a072381cce51588ae06de.html create mode 100644 Generated Documentation/html/dir_295ec522445a072381cce51588ae06de.js create mode 100644 Generated Documentation/html/dir_2aaf424bbcb07f5dded9ec249652df2c.html create mode 100644 Generated Documentation/html/dir_2aaf424bbcb07f5dded9ec249652df2c.js create mode 100644 Generated Documentation/html/dir_2b7e865b343d6334dab389a0c4067e85.html create mode 100644 Generated Documentation/html/dir_2b7e865b343d6334dab389a0c4067e85.js create mode 100644 Generated Documentation/html/dir_2bcdb68feb241a3616b904a7e7f95389.html create mode 100644 Generated Documentation/html/dir_2bcdb68feb241a3616b904a7e7f95389.js create mode 100644 Generated Documentation/html/dir_2dd3fc5c5508b4aa7f7cc27f9032e4c2.html create mode 100644 Generated Documentation/html/dir_2dd3fc5c5508b4aa7f7cc27f9032e4c2.js create mode 100644 Generated Documentation/html/dir_2e61e066929921851158d646dc727247.html create mode 100644 Generated Documentation/html/dir_2e61e066929921851158d646dc727247.js create mode 100644 Generated Documentation/html/dir_302d4a0d9a31e1dff21c7c222f7dfd5d.html create mode 100644 Generated Documentation/html/dir_302d4a0d9a31e1dff21c7c222f7dfd5d.js create mode 100644 Generated Documentation/html/dir_316389d960a63be80b1f1816e0c22eae.html create mode 100644 Generated Documentation/html/dir_316389d960a63be80b1f1816e0c22eae.js create mode 100644 Generated Documentation/html/dir_31688d51ab3625fd6f143fd30cc4d7bb.html create mode 100644 Generated Documentation/html/dir_31688d51ab3625fd6f143fd30cc4d7bb.js create mode 100644 Generated Documentation/html/dir_3225291aa21e87c4bb2bfb83325021b3.html create mode 100644 Generated Documentation/html/dir_3225291aa21e87c4bb2bfb83325021b3.js create mode 100644 Generated Documentation/html/dir_3645d7f8031073ad138ae29d5db24eae.html create mode 100644 Generated Documentation/html/dir_3645d7f8031073ad138ae29d5db24eae.js create mode 100644 Generated Documentation/html/dir_3742855ec19362cf25065527c1fc030e.html create mode 100644 Generated Documentation/html/dir_3742855ec19362cf25065527c1fc030e.js create mode 100644 Generated Documentation/html/dir_3911d8ee7cbc2334cb3f1227242ecfb5.html create mode 100644 Generated Documentation/html/dir_3911d8ee7cbc2334cb3f1227242ecfb5.js create mode 100644 Generated Documentation/html/dir_3944c9284a587c1f4257344ed41687e0.html create mode 100644 Generated Documentation/html/dir_3944c9284a587c1f4257344ed41687e0.js create mode 100644 Generated Documentation/html/dir_3aaa32de3f366737f4163401f25ad36a.html create mode 100644 Generated Documentation/html/dir_3aaa32de3f366737f4163401f25ad36a.js create mode 100644 Generated Documentation/html/dir_3c028bf27ff0ca18e6fef1c96c0b15e6.html create mode 100644 Generated Documentation/html/dir_3c028bf27ff0ca18e6fef1c96c0b15e6.js create mode 100644 Generated Documentation/html/dir_3fba8f4249fcded8acf0d58cb4b2908c.html create mode 100644 Generated Documentation/html/dir_3fba8f4249fcded8acf0d58cb4b2908c.js create mode 100644 Generated Documentation/html/dir_41b60d89ff3e63ab46a3e1149f733e71.html create mode 100644 Generated Documentation/html/dir_41b60d89ff3e63ab46a3e1149f733e71.js create mode 100644 Generated Documentation/html/dir_4336da0f5495bbaf9d3e5dbf6dc34a3b.html create mode 100644 Generated Documentation/html/dir_4336da0f5495bbaf9d3e5dbf6dc34a3b.js create mode 100644 Generated Documentation/html/dir_4600d35be30302c4f82c762933a95149.html create mode 100644 Generated Documentation/html/dir_4600d35be30302c4f82c762933a95149.js create mode 100644 Generated Documentation/html/dir_46bb5cba78f3d659357596b06de24bf6.html create mode 100644 Generated Documentation/html/dir_46bb5cba78f3d659357596b06de24bf6.js create mode 100644 Generated Documentation/html/dir_4b117179b94f57436657819294870333.html create mode 100644 Generated Documentation/html/dir_4b117179b94f57436657819294870333.js create mode 100644 Generated Documentation/html/dir_4dfbf0dfe91a70509baf4d63dfcfcc89.html create mode 100644 Generated Documentation/html/dir_4dfbf0dfe91a70509baf4d63dfcfcc89.js create mode 100644 Generated Documentation/html/dir_510be4f72cc28193897cc86401cba96f.html create mode 100644 Generated Documentation/html/dir_510be4f72cc28193897cc86401cba96f.js create mode 100644 Generated Documentation/html/dir_543ba87a51cfd72533030917770f2e9b.html create mode 100644 Generated Documentation/html/dir_543ba87a51cfd72533030917770f2e9b.js create mode 100644 Generated Documentation/html/dir_5557d2dfca73451af42ecb1cc3f4abba.html create mode 100644 Generated Documentation/html/dir_5557d2dfca73451af42ecb1cc3f4abba.js create mode 100644 Generated Documentation/html/dir_5cb3408a2640a05bbe5a2bd7ac1425c0.html create mode 100644 Generated Documentation/html/dir_5cb3408a2640a05bbe5a2bd7ac1425c0.js create mode 100644 Generated Documentation/html/dir_5d100c2ee59e1240a58e5c289fb89725.html create mode 100644 Generated Documentation/html/dir_5d100c2ee59e1240a58e5c289fb89725.js create mode 100644 Generated Documentation/html/dir_605117065d7c8c97aabf9f28515eba73.html create mode 100644 Generated Documentation/html/dir_605117065d7c8c97aabf9f28515eba73.js create mode 100644 Generated Documentation/html/dir_61af95113b1c3b9440ec0074b124f011.html create mode 100644 Generated Documentation/html/dir_61af95113b1c3b9440ec0074b124f011.js create mode 100644 Generated Documentation/html/dir_630fcb25634efa01e994e9aef2f3e6ee.html create mode 100644 Generated Documentation/html/dir_630fcb25634efa01e994e9aef2f3e6ee.js create mode 100644 Generated Documentation/html/dir_634a8ed938b77d81360973e3e254e296.html create mode 100644 Generated Documentation/html/dir_634a8ed938b77d81360973e3e254e296.js create mode 100644 Generated Documentation/html/dir_671c42cbbb63ff19748c8b235d022dd2.html create mode 100644 Generated Documentation/html/dir_671c42cbbb63ff19748c8b235d022dd2.js create mode 100644 Generated Documentation/html/dir_6a614e991455c38c24c39f1c281482b8.html create mode 100644 Generated Documentation/html/dir_6a614e991455c38c24c39f1c281482b8.js create mode 100644 Generated Documentation/html/dir_6ad900e8c05a48e8be1ee4ac03e4b4f7.html create mode 100644 Generated Documentation/html/dir_6ad900e8c05a48e8be1ee4ac03e4b4f7.js create mode 100644 Generated Documentation/html/dir_6b2cccbd1d15715bde7f0ce90277f7bd.html create mode 100644 Generated Documentation/html/dir_6b2cccbd1d15715bde7f0ce90277f7bd.js create mode 100644 Generated Documentation/html/dir_6b9671e3c9b220273878dafaffd150ca.html create mode 100644 Generated Documentation/html/dir_6b9671e3c9b220273878dafaffd150ca.js create mode 100644 Generated Documentation/html/dir_6da89819271f0a19271417f22567ac14.html create mode 100644 Generated Documentation/html/dir_6da89819271f0a19271417f22567ac14.js create mode 100644 Generated Documentation/html/dir_6dd7a4a9281b42b5ea66482ce4ab570d.html create mode 100644 Generated Documentation/html/dir_6dd7a4a9281b42b5ea66482ce4ab570d.js create mode 100644 Generated Documentation/html/dir_70714d2aca86afc563a34e5a9827e459.html create mode 100644 Generated Documentation/html/dir_70714d2aca86afc563a34e5a9827e459.js create mode 100644 Generated Documentation/html/dir_72b3b577103c4e1d818c29293ca64182.html create mode 100644 Generated Documentation/html/dir_72b3b577103c4e1d818c29293ca64182.js create mode 100644 Generated Documentation/html/dir_749f43066334c41d074768d87138b910.html create mode 100644 Generated Documentation/html/dir_749f43066334c41d074768d87138b910.js create mode 100644 Generated Documentation/html/dir_74d81e3051d166463177e7d329645fd7.html create mode 100644 Generated Documentation/html/dir_74d81e3051d166463177e7d329645fd7.js create mode 100644 Generated Documentation/html/dir_759b7552192ad4c73f4203223d9fa7bd.html create mode 100644 Generated Documentation/html/dir_759b7552192ad4c73f4203223d9fa7bd.js create mode 100644 Generated Documentation/html/dir_762ab1aaffcdc16c534d7f44ec94ed85.html create mode 100644 Generated Documentation/html/dir_762ab1aaffcdc16c534d7f44ec94ed85.js create mode 100644 Generated Documentation/html/dir_779215781e0c56b2dbe71db7dc4ffde1.html create mode 100644 Generated Documentation/html/dir_779215781e0c56b2dbe71db7dc4ffde1.js create mode 100644 Generated Documentation/html/dir_78cb9699776baeaa5a3078007071323f.html create mode 100644 Generated Documentation/html/dir_78cb9699776baeaa5a3078007071323f.js create mode 100644 Generated Documentation/html/dir_7d80b55b8874981d2c05fea5bbc460de.html create mode 100644 Generated Documentation/html/dir_7d80b55b8874981d2c05fea5bbc460de.js create mode 100644 Generated Documentation/html/dir_7e35627299eadc140fa9f5b7bf8b752f.html create mode 100644 Generated Documentation/html/dir_7e35627299eadc140fa9f5b7bf8b752f.js create mode 100644 Generated Documentation/html/dir_7f0790c84fb90bf7e23bc1b5170de075.html create mode 100644 Generated Documentation/html/dir_7f0790c84fb90bf7e23bc1b5170de075.js create mode 100644 Generated Documentation/html/dir_7f3d2c3741e3cebf940be7b1b5e1e296.html create mode 100644 Generated Documentation/html/dir_7f3d2c3741e3cebf940be7b1b5e1e296.js create mode 100644 Generated Documentation/html/dir_833dd6cfcfb93ae3949f725b30f9f0b3.html create mode 100644 Generated Documentation/html/dir_833dd6cfcfb93ae3949f725b30f9f0b3.js create mode 100644 Generated Documentation/html/dir_843369d2751018e7d78858c9a71e64cd.html create mode 100644 Generated Documentation/html/dir_843369d2751018e7d78858c9a71e64cd.js create mode 100644 Generated Documentation/html/dir_85d95bcfdae2672eb6e746472fb99deb.html create mode 100644 Generated Documentation/html/dir_85d95bcfdae2672eb6e746472fb99deb.js create mode 100644 Generated Documentation/html/dir_88765eb59bb63182d83beb82b232fd6a.html create mode 100644 Generated Documentation/html/dir_88765eb59bb63182d83beb82b232fd6a.js create mode 100644 Generated Documentation/html/dir_8c50fd412e5423dbdcf739a7e016f159.html create mode 100644 Generated Documentation/html/dir_8c50fd412e5423dbdcf739a7e016f159.js create mode 100644 Generated Documentation/html/dir_93fd190f9784dd3dd42f9b99be91f00f.html create mode 100644 Generated Documentation/html/dir_93fd190f9784dd3dd42f9b99be91f00f.js create mode 100644 Generated Documentation/html/dir_98608e1fdd8c96ffd63941cc9a97da72.html create mode 100644 Generated Documentation/html/dir_98608e1fdd8c96ffd63941cc9a97da72.js create mode 100644 Generated Documentation/html/dir_9ce6686f5bf5a431b61c5e3d2d4edf5f.html create mode 100644 Generated Documentation/html/dir_9ce6686f5bf5a431b61c5e3d2d4edf5f.js create mode 100644 Generated Documentation/html/dir_a154d89777d2ada6b1db063fa79917f4.html create mode 100644 Generated Documentation/html/dir_a154d89777d2ada6b1db063fa79917f4.js create mode 100644 Generated Documentation/html/dir_a1bfd36036f718300d642d927b53a244.html create mode 100644 Generated Documentation/html/dir_a1bfd36036f718300d642d927b53a244.js create mode 100644 Generated Documentation/html/dir_a5460467d48412bac8a5d370a0db913c.html create mode 100644 Generated Documentation/html/dir_a5460467d48412bac8a5d370a0db913c.js create mode 100644 Generated Documentation/html/dir_a59373bc14508c66c1aa06e8d8bc8f86.html create mode 100644 Generated Documentation/html/dir_a59373bc14508c66c1aa06e8d8bc8f86.js create mode 100644 Generated Documentation/html/dir_a7080a07f6c13140b95a96f2e4f9f58e.html create mode 100644 Generated Documentation/html/dir_a7080a07f6c13140b95a96f2e4f9f58e.js create mode 100644 Generated Documentation/html/dir_a8437566e3ea5ecb62f55f67b9e4dc7a.html create mode 100644 Generated Documentation/html/dir_a8437566e3ea5ecb62f55f67b9e4dc7a.js create mode 100644 Generated Documentation/html/dir_a8c71ea87835c0d8a05c4d4cfe708aa4.html create mode 100644 Generated Documentation/html/dir_a8c71ea87835c0d8a05c4d4cfe708aa4.js create mode 100644 Generated Documentation/html/dir_a995487c8d63d1383a78289498ad6a65.html create mode 100644 Generated Documentation/html/dir_a995487c8d63d1383a78289498ad6a65.js create mode 100644 Generated Documentation/html/dir_ab0c921bdd9a9e5f1288a99c079e4979.html create mode 100644 Generated Documentation/html/dir_ab0c921bdd9a9e5f1288a99c079e4979.js create mode 100644 Generated Documentation/html/dir_ae8b9a58c4fbe997ebbfd3d6682707a5.html create mode 100644 Generated Documentation/html/dir_ae8b9a58c4fbe997ebbfd3d6682707a5.js create mode 100644 Generated Documentation/html/dir_af9069c38f2c19d58b3a8be371ba0f22.html create mode 100644 Generated Documentation/html/dir_af9069c38f2c19d58b3a8be371ba0f22.js create mode 100644 Generated Documentation/html/dir_afba8e1a2b546f24731d7f7c3e5b6ade.html create mode 100644 Generated Documentation/html/dir_afba8e1a2b546f24731d7f7c3e5b6ade.js create mode 100644 Generated Documentation/html/dir_aff2a07b8353ec749f36856f01c7d4a6.html create mode 100644 Generated Documentation/html/dir_aff2a07b8353ec749f36856f01c7d4a6.js create mode 100644 Generated Documentation/html/dir_b3573a60974c7f178e0fb0a6a8a6c75f.html create mode 100644 Generated Documentation/html/dir_b3573a60974c7f178e0fb0a6a8a6c75f.js create mode 100644 Generated Documentation/html/dir_b365eb187f183b5df72a97d850f7180a.html create mode 100644 Generated Documentation/html/dir_b365eb187f183b5df72a97d850f7180a.js create mode 100644 Generated Documentation/html/dir_b4786a23037e6930f849d1b2151b2e07.html create mode 100644 Generated Documentation/html/dir_b4786a23037e6930f849d1b2151b2e07.js create mode 100644 Generated Documentation/html/dir_b65b9f777b5a5f6237a6c760eefe3795.html create mode 100644 Generated Documentation/html/dir_b65b9f777b5a5f6237a6c760eefe3795.js create mode 100644 Generated Documentation/html/dir_b74c14a59839bde55b254b6580d7dfe6.html create mode 100644 Generated Documentation/html/dir_b74c14a59839bde55b254b6580d7dfe6.js create mode 100644 Generated Documentation/html/dir_b9248ce9a2767a12c61d4d45f2280b32.html create mode 100644 Generated Documentation/html/dir_b9248ce9a2767a12c61d4d45f2280b32.js create mode 100644 Generated Documentation/html/dir_bb5bcff7a5bad458d8a7e628656fad56.html create mode 100644 Generated Documentation/html/dir_bb5bcff7a5bad458d8a7e628656fad56.js create mode 100644 Generated Documentation/html/dir_bde32bf976401edbce144c1ca78437b0.html create mode 100644 Generated Documentation/html/dir_bde32bf976401edbce144c1ca78437b0.js create mode 100644 Generated Documentation/html/dir_be8d20f8b92420c4109550e14991a9fb.html create mode 100644 Generated Documentation/html/dir_be8d20f8b92420c4109550e14991a9fb.js create mode 100644 Generated Documentation/html/dir_bea013136ac6d3f377c968c2beaaa893.html create mode 100644 Generated Documentation/html/dir_bea013136ac6d3f377c968c2beaaa893.js create mode 100644 Generated Documentation/html/dir_c03632983561d195ae60c8cc9da44571.html create mode 100644 Generated Documentation/html/dir_c03632983561d195ae60c8cc9da44571.js create mode 100644 Generated Documentation/html/dir_c04c9bebcd5da6ee4826760db194f738.html create mode 100644 Generated Documentation/html/dir_c04c9bebcd5da6ee4826760db194f738.js create mode 100644 Generated Documentation/html/dir_c0642c19cc2587483da76293a392fed9.html create mode 100644 Generated Documentation/html/dir_c0642c19cc2587483da76293a392fed9.js create mode 100644 Generated Documentation/html/dir_c2512795e3a4512bee9d568cc25983f1.html create mode 100644 Generated Documentation/html/dir_c2512795e3a4512bee9d568cc25983f1.js create mode 100644 Generated Documentation/html/dir_c252896fd4388b12116c6321cce38484.html create mode 100644 Generated Documentation/html/dir_c252896fd4388b12116c6321cce38484.js create mode 100644 Generated Documentation/html/dir_c35f050220a147549410dacfeb76a0d7.html create mode 100644 Generated Documentation/html/dir_c35f050220a147549410dacfeb76a0d7.js create mode 100644 Generated Documentation/html/dir_c3d2eb9dde46f0ea73f8afe6370f2777.html create mode 100644 Generated Documentation/html/dir_c3d2eb9dde46f0ea73f8afe6370f2777.js create mode 100644 Generated Documentation/html/dir_c3d61c7657b31db0d37f8715a88169d1.html create mode 100644 Generated Documentation/html/dir_c3d61c7657b31db0d37f8715a88169d1.js create mode 100644 Generated Documentation/html/dir_c44d038dcc0269d9192477c7773019a9.html create mode 100644 Generated Documentation/html/dir_c44d038dcc0269d9192477c7773019a9.js create mode 100644 Generated Documentation/html/dir_c52bf2e4596f9f72c1d98ba6dcbced26.html create mode 100644 Generated Documentation/html/dir_c52bf2e4596f9f72c1d98ba6dcbced26.js create mode 100644 Generated Documentation/html/dir_ceb3708e9b274deb981df4e08a597703.html create mode 100644 Generated Documentation/html/dir_ceb3708e9b274deb981df4e08a597703.js create mode 100644 Generated Documentation/html/dir_d1cdc94e4743062d51d03f2ab07fd0d2.html create mode 100644 Generated Documentation/html/dir_d1cdc94e4743062d51d03f2ab07fd0d2.js create mode 100644 Generated Documentation/html/dir_d34ca186a80f92f31027d832db95126c.html create mode 100644 Generated Documentation/html/dir_d34ca186a80f92f31027d832db95126c.js create mode 100644 Generated Documentation/html/dir_d35b6de7ba3ee658750082a39610a085.html create mode 100644 Generated Documentation/html/dir_d35b6de7ba3ee658750082a39610a085.js create mode 100644 Generated Documentation/html/dir_d499546f32b62e621cbb46a9bd7235a1.html create mode 100644 Generated Documentation/html/dir_d499546f32b62e621cbb46a9bd7235a1.js create mode 100644 Generated Documentation/html/dir_d87f7b488c593ccac8e50b6adb209b28.html create mode 100644 Generated Documentation/html/dir_d87f7b488c593ccac8e50b6adb209b28.js create mode 100644 Generated Documentation/html/dir_d9c187d8ae5f0bd15615fe91d1359a4a.html create mode 100644 Generated Documentation/html/dir_d9c187d8ae5f0bd15615fe91d1359a4a.js create mode 100644 Generated Documentation/html/dir_dbe3accc307b9bf6afea11f2c193cb27.html create mode 100644 Generated Documentation/html/dir_dbe3accc307b9bf6afea11f2c193cb27.js create mode 100644 Generated Documentation/html/dir_dd0a5b517506d8c0f057cfaecb7b3dc0.html create mode 100644 Generated Documentation/html/dir_dd0a5b517506d8c0f057cfaecb7b3dc0.js create mode 100644 Generated Documentation/html/dir_e05a0e25cf09c63f5adca92ff25f8b76.html create mode 100644 Generated Documentation/html/dir_e05a0e25cf09c63f5adca92ff25f8b76.js create mode 100644 Generated Documentation/html/dir_e09fccf4effa8ccdaa55ad5954043e6e.html create mode 100644 Generated Documentation/html/dir_e09fccf4effa8ccdaa55ad5954043e6e.js create mode 100644 Generated Documentation/html/dir_e256ef861b355381072786cf7d6ec888.html create mode 100644 Generated Documentation/html/dir_e256ef861b355381072786cf7d6ec888.js create mode 100644 Generated Documentation/html/dir_e504cc91e30efc744fb3203a7e8c72ab.html create mode 100644 Generated Documentation/html/dir_e504cc91e30efc744fb3203a7e8c72ab.js create mode 100644 Generated Documentation/html/dir_e54074d57bcfa9665c1a30adcc935096.html create mode 100644 Generated Documentation/html/dir_e54074d57bcfa9665c1a30adcc935096.js create mode 100644 Generated Documentation/html/dir_e63bd246281937e955d4714b96846de6.html create mode 100644 Generated Documentation/html/dir_e63bd246281937e955d4714b96846de6.js create mode 100644 Generated Documentation/html/dir_e81e95489ce2e46abb84fd29d6a72d62.html create mode 100644 Generated Documentation/html/dir_e81e95489ce2e46abb84fd29d6a72d62.js create mode 100644 Generated Documentation/html/dir_ead3f6887c571328b70ed30eb47cb8e9.html create mode 100644 Generated Documentation/html/dir_ead3f6887c571328b70ed30eb47cb8e9.js create mode 100644 Generated Documentation/html/dir_eae072b88d613e8d7b5192fe7d125af6.html create mode 100644 Generated Documentation/html/dir_eae072b88d613e8d7b5192fe7d125af6.js create mode 100644 Generated Documentation/html/dir_eb8ca45731295244f599d183ce849a41.html create mode 100644 Generated Documentation/html/dir_eb8ca45731295244f599d183ce849a41.js create mode 100644 Generated Documentation/html/dir_ed3596e77998d87ed8ef810021a85e9c.html create mode 100644 Generated Documentation/html/dir_ed3596e77998d87ed8ef810021a85e9c.js create mode 100644 Generated Documentation/html/dir_eec688965624bb19de0a965b56266886.html create mode 100644 Generated Documentation/html/dir_eec688965624bb19de0a965b56266886.js create mode 100644 Generated Documentation/html/dir_f48266d516bf22e0f95921002a52f5e0.html create mode 100644 Generated Documentation/html/dir_f48266d516bf22e0f95921002a52f5e0.js create mode 100644 Generated Documentation/html/dir_fb333e6e1aef903e906ff887888876d0.html create mode 100644 Generated Documentation/html/dir_fb333e6e1aef903e906ff887888876d0.js create mode 100644 Generated Documentation/html/dir_fc112d82c1af6fd1c09d247ef04c25e6.html create mode 100644 Generated Documentation/html/dir_fc112d82c1af6fd1c09d247ef04c25e6.js create mode 100644 Generated Documentation/html/dir_fd957caaaf9933bd05516ec5a0d9bc40.html create mode 100644 Generated Documentation/html/dir_fd957caaaf9933bd05516ec5a0d9bc40.js create mode 100644 Generated Documentation/html/dir_fe7c91cff9293174cda4e8ad4e82d438.html create mode 100644 Generated Documentation/html/dir_fe7c91cff9293174cda4e8ad4e82d438.js create mode 100644 Generated Documentation/html/dma__ex2__repeated_block_u_a_r_t_8c.html create mode 100644 Generated Documentation/html/dma__ex2__repeated_block_u_a_r_t_8c.js create mode 100644 Generated Documentation/html/dma__ex2__repeated_block_u_a_r_t_8c_source.html create mode 100644 Generated Documentation/html/dma__ex3__single_transfer_s_p_i_8c.html create mode 100644 Generated Documentation/html/dma__ex3__single_transfer_s_p_i_8c.js create mode 100644 Generated Documentation/html/dma__ex3__single_transfer_s_p_i_8c_source.html create mode 100644 Generated Documentation/html/dma__ex4__single_transfer_a_d_c12_8c.html create mode 100644 Generated Documentation/html/dma__ex4__single_transfer_a_d_c12_8c.js create mode 100644 Generated Documentation/html/dma__ex4__single_transfer_a_d_c12_8c_source.html create mode 100644 Generated Documentation/html/ecomp__ex1__output_toggle_vcomp_vs_vref1_85_v_8c.html create mode 100644 Generated Documentation/html/ecomp__ex1__output_toggle_vcomp_vs_vref1_85_v_8c.js create mode 100644 Generated Documentation/html/ecomp__ex1__output_toggle_vcomp_vs_vref1_85_v_8c_source.html create mode 100644 Generated Documentation/html/ecomp__ex2__interrupt_vcomp_vs1_85_v_8c.html create mode 100644 Generated Documentation/html/ecomp__ex2__interrupt_vcomp_vs1_85_v_8c.js create mode 100644 Generated Documentation/html/ecomp__ex2__interrupt_vcomp_vs1_85_v_8c_source.html create mode 100644 Generated Documentation/html/eusci__a__spi__ex1__3_wire_master_8c.html create mode 100644 Generated Documentation/html/eusci__a__spi__ex1__3_wire_master_8c.js create mode 100644 Generated Documentation/html/eusci__a__spi__ex1__3_wire_master_8c_source.html create mode 100644 Generated Documentation/html/eusci__a__spi__ex1__3_wire_slave_8c.html create mode 100644 Generated Documentation/html/eusci__a__spi__ex1__3_wire_slave_8c.js create mode 100644 Generated Documentation/html/eusci__a__spi__ex1__3_wire_slave_8c_source.html create mode 100644 Generated Documentation/html/eusci__a__uart__ex1__loopback115200_baud_8c.html create mode 100644 Generated Documentation/html/eusci__a__uart__ex1__loopback115200_baud_8c.js create mode 100644 Generated Documentation/html/eusci__a__uart__ex1__loopback115200_baud_8c_source.html create mode 100644 Generated Documentation/html/eusci__b__i2c__ex1__master_t_x_multiple_8c.html create mode 100644 Generated Documentation/html/eusci__b__i2c__ex1__master_t_x_multiple_8c.js create mode 100644 Generated Documentation/html/eusci__b__i2c__ex1__master_t_x_multiple_8c_source.html create mode 100644 Generated Documentation/html/eusci__b__i2c__ex1__slave_r_x_multiple_8c.html create mode 100644 Generated Documentation/html/eusci__b__i2c__ex1__slave_r_x_multiple_8c.js create mode 100644 Generated Documentation/html/eusci__b__i2c__ex1__slave_r_x_multiple_8c_source.html create mode 100644 Generated Documentation/html/eusci__b__i2c__ex2__master_r_x_multiple_8c.html create mode 100644 Generated Documentation/html/eusci__b__i2c__ex2__master_r_x_multiple_8c.js create mode 100644 Generated Documentation/html/eusci__b__i2c__ex2__master_r_x_multiple_8c_source.html create mode 100644 Generated Documentation/html/eusci__b__i2c__ex2__slave_t_x_multiple_8c.html create mode 100644 Generated Documentation/html/eusci__b__i2c__ex2__slave_t_x_multiple_8c.js create mode 100644 Generated Documentation/html/eusci__b__i2c__ex2__slave_t_x_multiple_8c_source.html create mode 100644 Generated Documentation/html/eusci__b__spi__ex1__3_wire_master_8c.html create mode 100644 Generated Documentation/html/eusci__b__spi__ex1__3_wire_master_8c.js create mode 100644 Generated Documentation/html/eusci__b__spi__ex1__3_wire_master_8c_source.html create mode 100644 Generated Documentation/html/eusci__b__spi__ex1__3_wire_slave_8c.html create mode 100644 Generated Documentation/html/eusci__b__spi__ex1__3_wire_slave_8c.js create mode 100644 Generated Documentation/html/eusci__b__spi__ex1__3_wire_slave_8c_source.html create mode 100644 Generated Documentation/html/flashctl__ex1__info_segment_write_8c.html create mode 100644 Generated Documentation/html/flashctl__ex1__info_segment_write_8c.js create mode 100644 Generated Documentation/html/flashctl__ex1__info_segment_write_8c_source.html create mode 100644 Generated Documentation/html/flashctl__ex1__write_to_info_b_8c.html create mode 100644 Generated Documentation/html/flashctl__ex1__write_to_info_b_8c.js create mode 100644 Generated Documentation/html/flashctl__ex1__write_to_info_b_8c_source.html create mode 100644 Generated Documentation/html/flashctl__ex2__erase_copy_write_8c.html create mode 100644 Generated Documentation/html/flashctl__ex2__erase_copy_write_8c.js create mode 100644 Generated Documentation/html/flashctl__ex2__erase_copy_write_8c_source.html create mode 100644 Generated Documentation/html/flashctl__ex3__long_word_write_8c.html create mode 100644 Generated Documentation/html/flashctl__ex3__long_word_write_8c.js create mode 100644 Generated Documentation/html/flashctl__ex3__long_word_write_8c_source.html create mode 100644 Generated Documentation/html/flashctl__ex4__write_to_info_a_8c.html create mode 100644 Generated Documentation/html/flashctl__ex4__write_to_info_a_8c.js create mode 100644 Generated Documentation/html/flashctl__ex4__write_to_info_a_8c_source.html create mode 100644 Generated Documentation/html/framctl__a__ex1__write_8c.html create mode 100644 Generated Documentation/html/framctl__a__ex1__write_8c.js create mode 100644 Generated Documentation/html/framctl__a__ex1__write_8c_source.html create mode 100644 Generated Documentation/html/functions.html create mode 100644 Generated Documentation/html/functions_func.html create mode 100644 Generated Documentation/html/globals_a.html create mode 100644 Generated Documentation/html/globals_b.html create mode 100644 Generated Documentation/html/globals_c.html create mode 100644 Generated Documentation/html/globals_d.html create mode 100644 Generated Documentation/html/globals_defs.js create mode 100644 Generated Documentation/html/globals_defs_b.html create mode 100644 Generated Documentation/html/globals_defs_c.html create mode 100644 Generated Documentation/html/globals_defs_d.html create mode 100644 Generated Documentation/html/globals_defs_f.html create mode 100644 Generated Documentation/html/globals_defs_g.html create mode 100644 Generated Documentation/html/globals_defs_h.html create mode 100644 Generated Documentation/html/globals_defs_i.html create mode 100644 Generated Documentation/html/globals_defs_l.html create mode 100644 Generated Documentation/html/globals_defs_n.html create mode 100644 Generated Documentation/html/globals_defs_r.html create mode 100644 Generated Documentation/html/globals_defs_s.html create mode 100644 Generated Documentation/html/globals_defs_t.html create mode 100644 Generated Documentation/html/globals_defs_u.html create mode 100644 Generated Documentation/html/globals_dup.js create mode 100644 Generated Documentation/html/globals_e.html create mode 100644 Generated Documentation/html/globals_f.html create mode 100644 Generated Documentation/html/globals_func.js create mode 100644 Generated Documentation/html/globals_func_a.html create mode 100644 Generated Documentation/html/globals_func_c.html create mode 100644 Generated Documentation/html/globals_func_d.html create mode 100644 Generated Documentation/html/globals_func_e.html create mode 100644 Generated Documentation/html/globals_func_g.html create mode 100644 Generated Documentation/html/globals_func_h.html create mode 100644 Generated Documentation/html/globals_func_l.html create mode 100644 Generated Documentation/html/globals_func_m.html create mode 100644 Generated Documentation/html/globals_func_n.html create mode 100644 Generated Documentation/html/globals_func_p.html create mode 100644 Generated Documentation/html/globals_func_r.html create mode 100644 Generated Documentation/html/globals_func_s.html create mode 100644 Generated Documentation/html/globals_func_t.html create mode 100644 Generated Documentation/html/globals_func_u.html create mode 100644 Generated Documentation/html/globals_func_v.html create mode 100644 Generated Documentation/html/globals_func_w.html create mode 100644 Generated Documentation/html/globals_g.html create mode 100644 Generated Documentation/html/globals_h.html create mode 100644 Generated Documentation/html/globals_i.html create mode 100644 Generated Documentation/html/globals_l.html create mode 100644 Generated Documentation/html/globals_m.html create mode 100644 Generated Documentation/html/globals_n.html create mode 100644 Generated Documentation/html/globals_o.html create mode 100644 Generated Documentation/html/globals_p.html create mode 100644 Generated Documentation/html/globals_r.html create mode 100644 Generated Documentation/html/globals_s.html create mode 100644 Generated Documentation/html/globals_t.html create mode 100644 Generated Documentation/html/globals_u.html create mode 100644 Generated Documentation/html/globals_v.html create mode 100644 Generated Documentation/html/globals_vars.html create mode 100644 Generated Documentation/html/globals_vars.js create mode 100644 Generated Documentation/html/globals_vars_b.html create mode 100644 Generated Documentation/html/globals_vars_c.html create mode 100644 Generated Documentation/html/globals_vars_d.html create mode 100644 Generated Documentation/html/globals_vars_e.html create mode 100644 Generated Documentation/html/globals_vars_f.html create mode 100644 Generated Documentation/html/globals_vars_h.html create mode 100644 Generated Documentation/html/globals_vars_i.html create mode 100644 Generated Documentation/html/globals_vars_l.html create mode 100644 Generated Documentation/html/globals_vars_m.html create mode 100644 Generated Documentation/html/globals_vars_n.html create mode 100644 Generated Documentation/html/globals_vars_o.html create mode 100644 Generated Documentation/html/globals_vars_p.html create mode 100644 Generated Documentation/html/globals_vars_r.html create mode 100644 Generated Documentation/html/globals_vars_s.html create mode 100644 Generated Documentation/html/globals_vars_t.html create mode 100644 Generated Documentation/html/globals_vars_v.html create mode 100644 Generated Documentation/html/globals_vars_w.html create mode 100644 Generated Documentation/html/globals_vars_x.html create mode 100644 Generated Documentation/html/globals_w.html create mode 100644 Generated Documentation/html/globals_x.html create mode 100644 Generated Documentation/html/gpio__ex1__toggle_output_8c.html create mode 100644 Generated Documentation/html/gpio__ex1__toggle_output_8c.js create mode 100644 Generated Documentation/html/gpio__ex1__toggle_output_8c_source.html create mode 100644 Generated Documentation/html/gpio__ex2__input_interrupt_8c.html create mode 100644 Generated Documentation/html/gpio__ex2__input_interrupt_8c.js create mode 100644 Generated Documentation/html/gpio__ex2__input_interrupt_8c_source.html create mode 100644 Generated Documentation/html/group__dac12__examples__list.html create mode 100644 Generated Documentation/html/group__ref__examples__list.html create mode 100644 Generated Documentation/html/hspll__ex1__output__ussxtosc_8c.html create mode 100644 Generated Documentation/html/hspll__ex1__output__ussxtosc_8c.js create mode 100644 Generated Documentation/html/hspll__ex1__output__ussxtosc_8c_source.html create mode 100644 Generated Documentation/html/icc__ex1__nested_interrupt_8c.html create mode 100644 Generated Documentation/html/icc__ex1__nested_interrupt_8c.js create mode 100644 Generated Documentation/html/icc__ex1__nested_interrupt_8c_source.html create mode 100644 Generated Documentation/html/lcd__b__ex1__4mux_8c.html create mode 100644 Generated Documentation/html/lcd__b__ex1__4mux_8c.js create mode 100644 Generated Documentation/html/lcd__b__ex1__4mux_8c_source.html create mode 100644 Generated Documentation/html/lcd__c__ex1__4mux_8c.html create mode 100644 Generated Documentation/html/lcd__c__ex1__4mux_8c.js create mode 100644 Generated Documentation/html/lcd__c__ex1__4mux_8c_source.html create mode 100644 Generated Documentation/html/lcd__e__ex1__4__mux_8c.html create mode 100644 Generated Documentation/html/lcd__e__ex1__4__mux_8c.js create mode 100644 Generated Documentation/html/lcd__e__ex1__4__mux_8c_source.html create mode 100644 Generated Documentation/html/ldopwr__ex1__internal_l_d_o_power_8c.html create mode 100644 Generated Documentation/html/ldopwr__ex1__internal_l_d_o_power_8c.js create mode 100644 Generated Documentation/html/ldopwr__ex1__internal_l_d_o_power_8c_source.html create mode 100644 Generated Documentation/html/ldopwr__ex2__software_poll_8c.html create mode 100644 Generated Documentation/html/ldopwr__ex2__software_poll_8c.js create mode 100644 Generated Documentation/html/ldopwr__ex2__software_poll_8c_source.html create mode 100644 Generated Documentation/html/ldopwr__ex3__internal_l_d_o_enabled_8c.html create mode 100644 Generated Documentation/html/ldopwr__ex3__internal_l_d_o_enabled_8c.js create mode 100644 Generated Documentation/html/ldopwr__ex3__internal_l_d_o_enabled_8c_source.html create mode 100644 Generated Documentation/html/mtif__ex1__pulse_generation_8c.html create mode 100644 Generated Documentation/html/mtif__ex1__pulse_generation_8c.js create mode 100644 Generated Documentation/html/mtif__ex1__pulse_generation_8c_source.html create mode 100644 Generated Documentation/html/navtreeindex10.js create mode 100644 Generated Documentation/html/navtreeindex2.js create mode 100644 Generated Documentation/html/navtreeindex3.js create mode 100644 Generated Documentation/html/navtreeindex4.js create mode 100644 Generated Documentation/html/navtreeindex5.js create mode 100644 Generated Documentation/html/navtreeindex6.js create mode 100644 Generated Documentation/html/navtreeindex7.js create mode 100644 Generated Documentation/html/navtreeindex8.js create mode 100644 Generated Documentation/html/navtreeindex9.js create mode 100644 Generated Documentation/html/oa__ex1__general_purpose_8c.html create mode 100644 Generated Documentation/html/oa__ex1__general_purpose_8c.js create mode 100644 Generated Documentation/html/oa__ex1__general_purpose_8c_source.html create mode 100644 Generated Documentation/html/oa__ex2__general_purpose_8c.html create mode 100644 Generated Documentation/html/oa__ex2__general_purpose_8c.js create mode 100644 Generated Documentation/html/oa__ex2__general_purpose_8c_source.html create mode 100644 Generated Documentation/html/oa__ex3__unity_gain_buffer_8c.html create mode 100644 Generated Documentation/html/oa__ex3__unity_gain_buffer_8c.js create mode 100644 Generated Documentation/html/oa__ex3__unity_gain_buffer_8c_source.html create mode 100644 Generated Documentation/html/package_8defs_8h.html create mode 100644 Generated Documentation/html/package_8defs_8h_source.html create mode 100644 Generated Documentation/html/package__ti_8mcu_8msp430_8driverlib_8product_8c.html create mode 100644 Generated Documentation/html/package__ti_8mcu_8msp430_8driverlib_8product_8c.js create mode 100644 Generated Documentation/html/package__ti_8mcu_8msp430_8driverlib_8product_8c_source.html create mode 100644 Generated Documentation/html/pmap__ex1__single_runtime_config_8c.html create mode 100644 Generated Documentation/html/pmap__ex1__single_runtime_config_8c.js create mode 100644 Generated Documentation/html/pmap__ex1__single_runtime_config_8c_source.html create mode 100644 Generated Documentation/html/pmap__ex2__output_timer_b_signal_8c.html create mode 100644 Generated Documentation/html/pmap__ex2__output_timer_b_signal_8c.js create mode 100644 Generated Documentation/html/pmap__ex2__output_timer_b_signal_8c_source.html create mode 100644 Generated Documentation/html/pmap__ex3__single_function_to_multiple_pins_8c.html create mode 100644 Generated Documentation/html/pmap__ex3__single_function_to_multiple_pins_8c.js create mode 100644 Generated Documentation/html/pmap__ex3__single_function_to_multiple_pins_8c_source.html create mode 100644 Generated Documentation/html/pmm__ex1__lpm4-5_8c.html create mode 100644 Generated Documentation/html/pmm__ex1__lpm4-5_8c.js create mode 100644 Generated Documentation/html/pmm__ex1__lpm4-5_8c_source.html create mode 100644 Generated Documentation/html/pmm__ex1__vcore3_8c.html create mode 100644 Generated Documentation/html/pmm__ex1__vcore3_8c.js create mode 100644 Generated Documentation/html/pmm__ex1__vcore3_8c_source.html create mode 100644 Generated Documentation/html/pmm__ex2__fast_wake_up_8c.html create mode 100644 Generated Documentation/html/pmm__ex2__fast_wake_up_8c.js create mode 100644 Generated Documentation/html/pmm__ex2__fast_wake_up_8c_source.html create mode 100644 Generated Documentation/html/pmm__ex2__vmon1160m_v_8c.html create mode 100644 Generated Documentation/html/pmm__ex2__vmon1160m_v_8c.js create mode 100644 Generated Documentation/html/pmm__ex2__vmon1160m_v_8c_source.html create mode 100644 Generated Documentation/html/pmm__ex3__low_current_consumption_8c.html create mode 100644 Generated Documentation/html/pmm__ex3__low_current_consumption_8c.js create mode 100644 Generated Documentation/html/pmm__ex3__low_current_consumption_8c_source.html create mode 100644 Generated Documentation/html/power_design.html create mode 100644 Generated Documentation/html/ram__ex1__set_sector_off_8c.html create mode 100644 Generated Documentation/html/ram__ex1__set_sector_off_8c.js create mode 100644 Generated Documentation/html/ram__ex1__set_sector_off_8c_source.html create mode 100644 Generated Documentation/html/ram__ex1__turn_off_sector_8c.html create mode 100644 Generated Documentation/html/ram__ex1__turn_off_sector_8c.js create mode 100644 Generated Documentation/html/ram__ex1__turn_off_sector_8c_source.html create mode 100644 Generated Documentation/html/ref__a__ex1__ctl_a_d_c12_b_8c.html create mode 100644 Generated Documentation/html/ref__a__ex1__ctl_a_d_c12_b_8c.js create mode 100644 Generated Documentation/html/ref__a__ex1__ctl_a_d_c12_b_8c_source.html create mode 100644 Generated Documentation/html/ref__ex1___a_d_c12_ctl_8c.html create mode 100644 Generated Documentation/html/ref__ex1___a_d_c12_ctl_8c.js create mode 100644 Generated Documentation/html/ref__ex1___a_d_c12_ctl_8c_source.html create mode 100644 Generated Documentation/html/ref__ex1__internal_reference_8c.html create mode 100644 Generated Documentation/html/ref__ex1__internal_reference_8c.js create mode 100644 Generated Documentation/html/ref__ex1__internal_reference_8c_source.html create mode 100644 Generated Documentation/html/resources.html create mode 100644 Generated Documentation/html/rtc__a__ex1__calendermode_8c.html create mode 100644 Generated Documentation/html/rtc__a__ex1__calendermode_8c.js create mode 100644 Generated Documentation/html/rtc__a__ex1__calendermode_8c_source.html create mode 100644 Generated Documentation/html/rtc__a__ex2__countermode_8c.html create mode 100644 Generated Documentation/html/rtc__a__ex2__countermode_8c.js create mode 100644 Generated Documentation/html/rtc__a__ex2__countermode_8c_source.html create mode 100644 Generated Documentation/html/rtc__b__ex1__calendermode_l_p_m0_8c.html create mode 100644 Generated Documentation/html/rtc__b__ex1__calendermode_l_p_m0_8c.js create mode 100644 Generated Documentation/html/rtc__b__ex1__calendermode_l_p_m0_8c_source.html create mode 100644 Generated Documentation/html/rtc__b__ex2__calendermode_l_p_m3_8c.html create mode 100644 Generated Documentation/html/rtc__b__ex2__calendermode_l_p_m3_8c.js create mode 100644 Generated Documentation/html/rtc__b__ex2__calendermode_l_p_m3_8c_source.html create mode 100644 Generated Documentation/html/rtc__ex1__countmode_8c.html create mode 100644 Generated Documentation/html/rtc__ex1__countmode_8c.js create mode 100644 Generated Documentation/html/rtc__ex1__countmode_8c_source.html create mode 100644 Generated Documentation/html/sac__ex1__oa_g_p_mode_8c.html create mode 100644 Generated Documentation/html/sac__ex1__oa_g_p_mode_8c.js create mode 100644 Generated Documentation/html/sac__ex1__oa_g_p_mode_8c_source.html create mode 100644 Generated Documentation/html/sac__ex2__unity_gain_buffer_mode_8c.html create mode 100644 Generated Documentation/html/sac__ex2__unity_gain_buffer_mode_8c.js create mode 100644 Generated Documentation/html/sac__ex2__unity_gain_buffer_mode_8c_source.html create mode 100644 Generated Documentation/html/sac__ex3__two_stage_amplifier_8c.html create mode 100644 Generated Documentation/html/sac__ex3__two_stage_amplifier_8c.js create mode 100644 Generated Documentation/html/sac__ex3__two_stage_amplifier_8c_source.html create mode 100644 Generated Documentation/html/sac__ex4__ecomp_8c.html create mode 100644 Generated Documentation/html/sac__ex4__ecomp_8c.js create mode 100644 Generated Documentation/html/sac__ex4__ecomp_8c_source.html create mode 100644 Generated Documentation/html/saph__a__ex3__pulse_generation_d_m_a_8c.html create mode 100644 Generated Documentation/html/saph__a__ex3__pulse_generation_d_m_a_8c.js create mode 100644 Generated Documentation/html/saph__a__ex3__pulse_generation_d_m_a_8c_source.html create mode 100644 Generated Documentation/html/saph__ex1__pulse_generation_8c.html create mode 100644 Generated Documentation/html/saph__ex1__pulse_generation_8c.js create mode 100644 Generated Documentation/html/saph__ex1__pulse_generation_8c_source.html create mode 100644 Generated Documentation/html/sd24__b__ex1__single_conv_single_channel_8c.html create mode 100644 Generated Documentation/html/sd24__b__ex1__single_conv_single_channel_8c.js create mode 100644 Generated Documentation/html/sd24__b__ex1__single_conv_single_channel_8c_source.html create mode 100644 Generated Documentation/html/sd24__b__ex2__single_conv_channel_group_8c.html create mode 100644 Generated Documentation/html/sd24__b__ex2__single_conv_channel_group_8c.js create mode 100644 Generated Documentation/html/sd24__b__ex2__single_conv_channel_group_8c_source.html create mode 100644 Generated Documentation/html/sd24__b__ex3__cont_conv_single_channel_8c.html create mode 100644 Generated Documentation/html/sd24__b__ex3__cont_conv_single_channel_8c.js create mode 100644 Generated Documentation/html/sd24__b__ex3__cont_conv_single_channel_8c_source.html create mode 100644 Generated Documentation/html/sd24__ex1__continuous_conversion_group_channels_8c.html create mode 100644 Generated Documentation/html/sd24__ex1__continuous_conversion_group_channels_8c.js create mode 100644 Generated Documentation/html/sd24__ex1__continuous_conversion_group_channels_8c_source.html create mode 100644 Generated Documentation/html/sd24__ex2__single_conversion_group_channels_8c.html create mode 100644 Generated Documentation/html/sd24__ex2__single_conversion_group_channels_8c.js create mode 100644 Generated Documentation/html/sd24__ex2__single_conversion_group_channels_8c_source.html create mode 100644 Generated Documentation/html/sd24__ex3__continuous_conversion_single_channel_8c.html create mode 100644 Generated Documentation/html/sd24__ex3__continuous_conversion_single_channel_8c.js create mode 100644 Generated Documentation/html/sd24__ex3__continuous_conversion_single_channel_8c_source.html create mode 100644 Generated Documentation/html/sd24__ex4__single_conversion_single_channel_polling_8c.html create mode 100644 Generated Documentation/html/sd24__ex4__single_conversion_single_channel_polling_8c.js create mode 100644 Generated Documentation/html/sd24__ex4__single_conversion_single_channel_polling_8c_source.html create mode 100644 Generated Documentation/html/sd24__ex5__single_conversion_single_channel_interrupt_8c.html create mode 100644 Generated Documentation/html/sd24__ex5__single_conversion_single_channel_interrupt_8c.js create mode 100644 Generated Documentation/html/sd24__ex5__single_conversion_single_channel_interrupt_8c_source.html create mode 100644 Generated Documentation/html/sd24__ex6__single_conversion_single_conversion_temp_sensor_8c.html create mode 100644 Generated Documentation/html/sd24__ex6__single_conversion_single_conversion_temp_sensor_8c.js create mode 100644 Generated Documentation/html/sd24__ex6__single_conversion_single_conversion_temp_sensor_8c_source.html create mode 100644 Generated Documentation/html/sdhs__ex1__8msps__sampling_8c.html create mode 100644 Generated Documentation/html/sdhs__ex1__8msps__sampling_8c.js create mode 100644 Generated Documentation/html/sdhs__ex1__8msps__sampling_8c_source.html create mode 100644 Generated Documentation/html/search/all_16.html create mode 100644 Generated Documentation/html/search/all_16.js create mode 100644 Generated Documentation/html/search/all_17.html create mode 100644 Generated Documentation/html/search/all_17.js create mode 100644 Generated Documentation/html/search/classes_0.html create mode 100644 Generated Documentation/html/search/classes_0.js create mode 100644 Generated Documentation/html/search/defines_6.html create mode 100644 Generated Documentation/html/search/defines_6.js create mode 100644 Generated Documentation/html/search/defines_7.html create mode 100644 Generated Documentation/html/search/defines_7.js create mode 100644 Generated Documentation/html/search/defines_8.html create mode 100644 Generated Documentation/html/search/defines_8.js create mode 100644 Generated Documentation/html/search/defines_9.html create mode 100644 Generated Documentation/html/search/defines_9.js create mode 100644 Generated Documentation/html/search/defines_a.html create mode 100644 Generated Documentation/html/search/defines_a.js create mode 100644 Generated Documentation/html/search/defines_b.html create mode 100644 Generated Documentation/html/search/defines_b.js create mode 100644 Generated Documentation/html/search/defines_c.html create mode 100644 Generated Documentation/html/search/defines_c.js create mode 100644 Generated Documentation/html/search/defines_d.html create mode 100644 Generated Documentation/html/search/defines_d.js create mode 100644 Generated Documentation/html/search/files_14.html create mode 100644 Generated Documentation/html/search/files_14.js create mode 100644 Generated Documentation/html/search/functions_1.html create mode 100644 Generated Documentation/html/search/functions_1.js create mode 100644 Generated Documentation/html/search/functions_10.html create mode 100644 Generated Documentation/html/search/functions_10.js create mode 100644 Generated Documentation/html/search/functions_2.html create mode 100644 Generated Documentation/html/search/functions_2.js create mode 100644 Generated Documentation/html/search/functions_3.html create mode 100644 Generated Documentation/html/search/functions_3.js create mode 100644 Generated Documentation/html/search/functions_4.html create mode 100644 Generated Documentation/html/search/functions_4.js create mode 100644 Generated Documentation/html/search/functions_5.html create mode 100644 Generated Documentation/html/search/functions_5.js create mode 100644 Generated Documentation/html/search/functions_6.html create mode 100644 Generated Documentation/html/search/functions_6.js create mode 100644 Generated Documentation/html/search/functions_7.html create mode 100644 Generated Documentation/html/search/functions_7.js create mode 100644 Generated Documentation/html/search/functions_8.html create mode 100644 Generated Documentation/html/search/functions_8.js create mode 100644 Generated Documentation/html/search/functions_9.html create mode 100644 Generated Documentation/html/search/functions_9.js create mode 100644 Generated Documentation/html/search/functions_a.html create mode 100644 Generated Documentation/html/search/functions_a.js create mode 100644 Generated Documentation/html/search/functions_b.html create mode 100644 Generated Documentation/html/search/functions_b.js create mode 100644 Generated Documentation/html/search/functions_c.html create mode 100644 Generated Documentation/html/search/functions_c.js create mode 100644 Generated Documentation/html/search/functions_d.html create mode 100644 Generated Documentation/html/search/functions_d.js create mode 100644 Generated Documentation/html/search/functions_e.html create mode 100644 Generated Documentation/html/search/functions_e.js create mode 100644 Generated Documentation/html/search/functions_f.html create mode 100644 Generated Documentation/html/search/functions_f.js create mode 100644 Generated Documentation/html/search/variables_0.html create mode 100644 Generated Documentation/html/search/variables_0.js create mode 100644 Generated Documentation/html/search/variables_1.html create mode 100644 Generated Documentation/html/search/variables_1.js create mode 100644 Generated Documentation/html/search/variables_10.html create mode 100644 Generated Documentation/html/search/variables_10.js create mode 100644 Generated Documentation/html/search/variables_11.html create mode 100644 Generated Documentation/html/search/variables_11.js create mode 100644 Generated Documentation/html/search/variables_12.html create mode 100644 Generated Documentation/html/search/variables_12.js create mode 100644 Generated Documentation/html/search/variables_2.html create mode 100644 Generated Documentation/html/search/variables_2.js create mode 100644 Generated Documentation/html/search/variables_3.html create mode 100644 Generated Documentation/html/search/variables_3.js create mode 100644 Generated Documentation/html/search/variables_4.html create mode 100644 Generated Documentation/html/search/variables_4.js create mode 100644 Generated Documentation/html/search/variables_5.html create mode 100644 Generated Documentation/html/search/variables_5.js create mode 100644 Generated Documentation/html/search/variables_6.html create mode 100644 Generated Documentation/html/search/variables_6.js create mode 100644 Generated Documentation/html/search/variables_7.html create mode 100644 Generated Documentation/html/search/variables_7.js create mode 100644 Generated Documentation/html/search/variables_8.html create mode 100644 Generated Documentation/html/search/variables_8.js create mode 100644 Generated Documentation/html/search/variables_9.html create mode 100644 Generated Documentation/html/search/variables_9.js create mode 100644 Generated Documentation/html/search/variables_a.html create mode 100644 Generated Documentation/html/search/variables_a.js create mode 100644 Generated Documentation/html/search/variables_b.html create mode 100644 Generated Documentation/html/search/variables_b.js create mode 100644 Generated Documentation/html/search/variables_c.html create mode 100644 Generated Documentation/html/search/variables_c.js create mode 100644 Generated Documentation/html/search/variables_d.html create mode 100644 Generated Documentation/html/search/variables_d.js create mode 100644 Generated Documentation/html/search/variables_e.html create mode 100644 Generated Documentation/html/search/variables_e.js create mode 100644 Generated Documentation/html/search/variables_f.html create mode 100644 Generated Documentation/html/search/variables_f.js create mode 100644 Generated Documentation/html/tec__ex1__sync_timers_8c.html create mode 100644 Generated Documentation/html/tec__ex1__sync_timers_8c.js create mode 100644 Generated Documentation/html/tec__ex1__sync_timers_8c_source.html create mode 100644 Generated Documentation/html/tec__ex2__ext_clear_input_8c.html create mode 100644 Generated Documentation/html/tec__ex2__ext_clear_input_8c.js create mode 100644 Generated Documentation/html/tec__ex2__ext_clear_input_8c_source.html create mode 100644 Generated Documentation/html/ti__mcu__msp430__driverlib__product_8java.html create mode 100644 Generated Documentation/html/ti__mcu__msp430__driverlib__product_8java_source.html create mode 100644 Generated Documentation/html/tia__ex1__two_external_inputs_8c.html create mode 100644 Generated Documentation/html/tia__ex1__two_external_inputs_8c.js create mode 100644 Generated Documentation/html/tia__ex1__two_external_inputs_8c_source.html create mode 100644 Generated Documentation/html/timer__a__ex1__continuous_overflow_interrupt_8c.html create mode 100644 Generated Documentation/html/timer__a__ex1__continuous_overflow_interrupt_8c.js create mode 100644 Generated Documentation/html/timer__a__ex1__continuous_overflow_interrupt_8c_source.html create mode 100644 Generated Documentation/html/timer__a__ex2__single_p_w_m_8c.html create mode 100644 Generated Documentation/html/timer__a__ex2__single_p_w_m_8c.js create mode 100644 Generated Documentation/html/timer__a__ex2__single_p_w_m_8c_source.html create mode 100644 Generated Documentation/html/timer__a__ex3__up_mode_interrupt_8c.html create mode 100644 Generated Documentation/html/timer__a__ex3__up_mode_interrupt_8c.js create mode 100644 Generated Documentation/html/timer__a__ex3__up_mode_interrupt_8c_source.html create mode 100644 Generated Documentation/html/timer__a__ex4__period_capture_8c.html create mode 100644 Generated Documentation/html/timer__a__ex4__period_capture_8c.js create mode 100644 Generated Documentation/html/timer__a__ex4__period_capture_8c_source.html create mode 100644 Generated Documentation/html/timer__d__ex10__duty_cycle_measurement_dual_8c.html create mode 100644 Generated Documentation/html/timer__d__ex10__duty_cycle_measurement_dual_8c.js create mode 100644 Generated Documentation/html/timer__d__ex10__duty_cycle_measurement_dual_8c_source.html create mode 100644 Generated Documentation/html/timer__d__ex1__cont_c_r_r0_8c.html create mode 100644 Generated Documentation/html/timer__d__ex1__cont_c_r_r0_8c.js create mode 100644 Generated Documentation/html/timer__d__ex1__cont_c_r_r0_8c_source.html create mode 100644 Generated Documentation/html/timer__d__ex2__overflow_i_s_r_8c.html create mode 100644 Generated Documentation/html/timer__d__ex2__overflow_i_s_r_8c.js create mode 100644 Generated Documentation/html/timer__d__ex2__overflow_i_s_r_8c_source.html create mode 100644 Generated Documentation/html/timer__d__ex3__up_down_mode_8c.html create mode 100644 Generated Documentation/html/timer__d__ex3__up_down_mode_8c.js create mode 100644 Generated Documentation/html/timer__d__ex3__up_down_mode_8c_source.html create mode 100644 Generated Documentation/html/timer__d__ex4__pwm_up_down_mode_8c.html create mode 100644 Generated Documentation/html/timer__d__ex4__pwm_up_down_mode_8c.js create mode 100644 Generated Documentation/html/timer__d__ex4__pwm_up_down_mode_8c_source.html create mode 100644 Generated Documentation/html/timer__d__ex5__hi_res_free_running_p_w_m_8c.html create mode 100644 Generated Documentation/html/timer__d__ex5__hi_res_free_running_p_w_m_8c.js create mode 100644 Generated Documentation/html/timer__d__ex5__hi_res_free_running_p_w_m_8c_source.html create mode 100644 Generated Documentation/html/timer__d__ex6__hi_res_regulated_p_w_m_8c.html create mode 100644 Generated Documentation/html/timer__d__ex6__hi_res_regulated_p_w_m_8c.js create mode 100644 Generated Documentation/html/timer__d__ex6__hi_res_regulated_p_w_m_8c_source.html create mode 100644 Generated Documentation/html/timer__d__ex7__combine_regs_p_w_m_8c.html create mode 100644 Generated Documentation/html/timer__d__ex7__combine_regs_p_w_m_8c.js create mode 100644 Generated Documentation/html/timer__d__ex7__combine_regs_p_w_m_8c_source.html create mode 100644 Generated Documentation/html/timer__d__ex8__duty_cycle_measurement_single_8c.html create mode 100644 Generated Documentation/html/timer__d__ex8__duty_cycle_measurement_single_8c.js create mode 100644 Generated Documentation/html/timer__d__ex8__duty_cycle_measurement_single_8c_source.html create mode 100644 Generated Documentation/html/timer__d__ex9__period_measurement_8c.html create mode 100644 Generated Documentation/html/timer__d__ex9__period_measurement_8c.js create mode 100644 Generated Documentation/html/timer__d__ex9__period_measurement_8c_source.html create mode 100644 Generated Documentation/html/tlv__ex1__check_checksum_8c.html create mode 100644 Generated Documentation/html/tlv__ex1__check_checksum_8c.js create mode 100644 Generated Documentation/html/tlv__ex1__check_checksum_8c_source.html create mode 100644 Generated Documentation/html/ucs__ex1___d_c_o12_m_hz_8c.html create mode 100644 Generated Documentation/html/ucs__ex1___d_c_o12_m_hz_8c.js create mode 100644 Generated Documentation/html/ucs__ex1___d_c_o12_m_hz_8c_source.html create mode 100644 Generated Documentation/html/ucs__ex2___v_l_o_sources_a_c_l_k_8c.html create mode 100644 Generated Documentation/html/ucs__ex2___v_l_o_sources_a_c_l_k_8c.js create mode 100644 Generated Documentation/html/ucs__ex2___v_l_o_sources_a_c_l_k_8c_source.html create mode 100644 Generated Documentation/html/ucs__ex3___x_t1_sources_a_c_l_k_8c.html create mode 100644 Generated Documentation/html/ucs__ex3___x_t1_sources_a_c_l_k_8c.js create mode 100644 Generated Documentation/html/ucs__ex3___x_t1_sources_a_c_l_k_8c_source.html create mode 100644 Generated Documentation/html/ucs__ex4___x_t_sources_d_c_o_internal_8c.html create mode 100644 Generated Documentation/html/ucs__ex4___x_t_sources_d_c_o_internal_8c.js create mode 100644 Generated Documentation/html/ucs__ex4___x_t_sources_d_c_o_internal_8c_source.html create mode 100644 Generated Documentation/html/usci__a__spi__ex1__master_8c.html create mode 100644 Generated Documentation/html/usci__a__spi__ex1__master_8c.js create mode 100644 Generated Documentation/html/usci__a__spi__ex1__master_8c_source.html create mode 100644 Generated Documentation/html/usci__a__spi__ex1__slave_8c.html create mode 100644 Generated Documentation/html/usci__a__spi__ex1__slave_8c.js create mode 100644 Generated Documentation/html/usci__a__spi__ex1__slave_8c_source.html create mode 100644 Generated Documentation/html/usci__a__uart__ex1__loopback_advance_8c.html create mode 100644 Generated Documentation/html/usci__a__uart__ex1__loopback_advance_8c.js create mode 100644 Generated Documentation/html/usci__a__uart__ex1__loopback_advance_8c_source.html create mode 100644 Generated Documentation/html/usci__a__uart__ex2__address_bit_multiprocessor_r_x_8c.html create mode 100644 Generated Documentation/html/usci__a__uart__ex2__address_bit_multiprocessor_r_x_8c.js create mode 100644 Generated Documentation/html/usci__a__uart__ex2__address_bit_multiprocessor_r_x_8c_source.html create mode 100644 Generated Documentation/html/usci__a__uart__ex2__address_bit_multiprocessor_t_x_8c.html create mode 100644 Generated Documentation/html/usci__a__uart__ex2__address_bit_multiprocessor_t_x_8c.js create mode 100644 Generated Documentation/html/usci__a__uart__ex2__address_bit_multiprocessor_t_x_8c_source.html create mode 100644 Generated Documentation/html/usci__a__uart__ex3__auto_baudrate_detection_r_x_8c.html create mode 100644 Generated Documentation/html/usci__a__uart__ex3__auto_baudrate_detection_r_x_8c.js create mode 100644 Generated Documentation/html/usci__a__uart__ex3__auto_baudrate_detection_r_x_8c_source.html create mode 100644 Generated Documentation/html/usci__a__uart__ex3__auto_baudrate_detection_t_x_8c.html create mode 100644 Generated Documentation/html/usci__a__uart__ex3__auto_baudrate_detection_t_x_8c.js create mode 100644 Generated Documentation/html/usci__a__uart__ex3__auto_baudrate_detection_t_x_8c_source.html create mode 100644 Generated Documentation/html/usci__a__uart__ex4__idle_line_multiprocessor_r_x_8c.html create mode 100644 Generated Documentation/html/usci__a__uart__ex4__idle_line_multiprocessor_r_x_8c.js create mode 100644 Generated Documentation/html/usci__a__uart__ex4__idle_line_multiprocessor_r_x_8c_source.html create mode 100644 Generated Documentation/html/usci__a__uart__ex4__idleline_multiprocessor_t_x_8c.html create mode 100644 Generated Documentation/html/usci__a__uart__ex4__idleline_multiprocessor_t_x_8c.js create mode 100644 Generated Documentation/html/usci__a__uart__ex4__idleline_multiprocessor_t_x_8c_source.html create mode 100644 Generated Documentation/html/usci__b__i2c__ex1__master_rx_single_8c.html create mode 100644 Generated Documentation/html/usci__b__i2c__ex1__master_rx_single_8c.js create mode 100644 Generated Documentation/html/usci__b__i2c__ex1__master_rx_single_8c_source.html create mode 100644 Generated Documentation/html/usci__b__i2c__ex1__slave_tx_single_8c.html create mode 100644 Generated Documentation/html/usci__b__i2c__ex1__slave_tx_single_8c.js create mode 100644 Generated Documentation/html/usci__b__i2c__ex1__slave_tx_single_8c_source.html create mode 100644 Generated Documentation/html/usci__b__i2c__ex2__master_tx_multiple_8c.html create mode 100644 Generated Documentation/html/usci__b__i2c__ex2__master_tx_multiple_8c.js create mode 100644 Generated Documentation/html/usci__b__i2c__ex2__master_tx_multiple_8c_source.html create mode 100644 Generated Documentation/html/usci__b__i2c__ex2__slave_rx_multiple_8c.html create mode 100644 Generated Documentation/html/usci__b__i2c__ex2__slave_rx_multiple_8c.js create mode 100644 Generated Documentation/html/usci__b__i2c__ex2__slave_rx_multiple_8c_source.html create mode 100644 Generated Documentation/html/usci__b__i2c__ex3__master_tx_single_8c.html create mode 100644 Generated Documentation/html/usci__b__i2c__ex3__master_tx_single_8c.js create mode 100644 Generated Documentation/html/usci__b__i2c__ex3__master_tx_single_8c_source.html create mode 100644 Generated Documentation/html/usci__b__i2c__ex3__slave_rx_single_8c.html create mode 100644 Generated Documentation/html/usci__b__i2c__ex3__slave_rx_single_8c.js create mode 100644 Generated Documentation/html/usci__b__i2c__ex3__slave_rx_single_8c_source.html create mode 100644 Generated Documentation/html/usci__b__i2c__ex4__master_rx_multiple_8c.html create mode 100644 Generated Documentation/html/usci__b__i2c__ex4__master_rx_multiple_8c.js create mode 100644 Generated Documentation/html/usci__b__i2c__ex4__master_rx_multiple_8c_source.html create mode 100644 Generated Documentation/html/usci__b__i2c__ex4__slave_tx_multiple_8c.html create mode 100644 Generated Documentation/html/usci__b__i2c__ex4__slave_tx_multiple_8c.js create mode 100644 Generated Documentation/html/usci__b__i2c__ex4__slave_tx_multiple_8c_source.html create mode 100644 Generated Documentation/html/usci__b__spi__ex1__master_8c.html create mode 100644 Generated Documentation/html/usci__b__spi__ex1__master_8c.js create mode 100644 Generated Documentation/html/usci__b__spi__ex1__master_8c_source.html create mode 100644 Generated Documentation/html/usci__b__spi__ex1__slave_8c.html create mode 100644 Generated Documentation/html/usci__b__spi__ex1__slave_8c.js create mode 100644 Generated Documentation/html/usci__b__spi__ex1__slave_8c_source.html create mode 100644 Generated Documentation/html/wdt__ex1__interval_mode_8c.html create mode 100644 Generated Documentation/html/wdt__ex1__interval_mode_8c.js create mode 100644 Generated Documentation/html/wdt__ex1__interval_mode_8c_source.html create mode 100644 Generated Documentation/html/wdt__ex2__watchdog_mode_8c.html create mode 100644 Generated Documentation/html/wdt__ex2__watchdog_mode_8c.js create mode 100644 Generated Documentation/html/wdt__ex2__watchdog_mode_8c_source.html create mode 100644 Generated Documentation/latex/_9_resources_8markdown.tex create mode 100644 Generated Documentation/latex/_board_8h.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2crc_2crc__ex1__build_signature_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2dma_2dma__ex1__repeated_block_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2crc_2crc__ex1__build_signature_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2framctl_2framctl__ex1__write_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex1__output_hi_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex2__input_capture_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex3__software_poll_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex4__write_to_port1_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex15__fraction_mode_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2pmm_2pmm___reset___l_p_mx__5_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex1__pwm_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex3__pwm_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2tlv_2tlv__ex1__get_device_type_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2crc_2crc__ex1__build_signature_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2dma_2dma__ex1__repeated_block_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2framctl_2framctl__ex1__write_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2gpio_2gpio__ex1__output_hi_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2gpio_2gpio__ex2__input_capture_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2gpio_2gpio__ex3__software_poll_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2gpio_2gpio__ex4__write_to_port1_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpu_2mpu__ex1__three_seg_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex15__fraction_mode_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2pmm_2pmm___reset___l_p_mx__5_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2rtc__b_2rtc__b__ex1__calendermode_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex1__pwm_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex3__pwm_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2tlv_2tlv__ex1__get_device_type_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2crc_2crc__ex1__build_signature_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2dma_2dma__ex1__repeated_block_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2framctl_2framctl__ex1__write_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2pmm_2pmm___reset___l_p_mx__5_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2rtc__b_2rtc__b__ex1__calendermode_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.tex create mode 100644 Generated Documentation/latex/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.tex create mode 100644 Generated Documentation/latex/_power_01_design_8markdown.tex create mode 100644 Generated Documentation/latex/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f5xx__6xx_200__empty_project_2main_8c.tex create mode 100644 Generated Documentation/latex/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r2xx__4xx_200__empty_project_2main_8c.tex create mode 100644 Generated Documentation/latex/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r57xx_200__empty_project_2main_8c.tex create mode 100644 Generated Documentation/latex/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r5xx__6xx_200__empty_project_2main_8c.tex create mode 100644 Generated Documentation/latex/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430i2xx_200__empty_project_2main_8c.tex create mode 100644 Generated Documentation/latex/_software_2_code_01_composer_01_studio_01_workspace_2_sunseeker_telemetry_and_lighting_system_2main_8c.tex create mode 100644 Generated Documentation/latex/adc10__a__ex1__avcc_ref_8c.tex create mode 100644 Generated Documentation/latex/adc10__a__ex2__int_ref_8c.tex create mode 100644 Generated Documentation/latex/adc10__a__ex3__window_comp_8c.tex create mode 100644 Generated Documentation/latex/adc10__a__ex4__signed_data_8c.tex create mode 100644 Generated Documentation/latex/adc10__a__ex5__batt_monitor_8c.tex create mode 100644 Generated Documentation/latex/adc10__a__ex6__ref_toggle_8c.tex create mode 100644 Generated Documentation/latex/adc10__a__ex7__repeat_single_d_m_a_8c.tex create mode 100644 Generated Documentation/latex/adc10__a__ex8__sequence_d_m_a_8c.tex create mode 100644 Generated Documentation/latex/adc10__a__ex9__repeat_seq_8c.tex create mode 100644 Generated Documentation/latex/adc10__b__ex1__avcc_ref_8c.tex create mode 100644 Generated Documentation/latex/adc10__b__ex2__int_ref_8c.tex create mode 100644 Generated Documentation/latex/adc12__a__ex1__avcc_ref_8c.tex create mode 100644 Generated Documentation/latex/adc12__a__ex2__int_ref_8c.tex create mode 100644 Generated Documentation/latex/adc12__a__ex3__ext_ref_8c.tex create mode 100644 Generated Documentation/latex/adc12__a__ex4__repeated_seq_8c.tex create mode 100644 Generated Documentation/latex/adc12__a__ex5__repeated_single_8c.tex create mode 100644 Generated Documentation/latex/adc12__a__ex6__extended_inputs_8c.tex create mode 100644 Generated Documentation/latex/adc12__a__ex7__sequence_8c.tex create mode 100644 Generated Documentation/latex/adc12__a__ex8__temp_sensor_8c.tex create mode 100644 Generated Documentation/latex/adc12__b__ex1__avcc_ref_8c.tex create mode 100644 Generated Documentation/latex/adc12__b__ex2__shared_ref_8c.tex create mode 100644 Generated Documentation/latex/adc12__b__ex3__ext_ref_8c.tex create mode 100644 Generated Documentation/latex/adc__ex1__avcc_ref_8c.tex create mode 100644 Generated Documentation/latex/adc__ex2__int_ref_8c.tex create mode 100644 Generated Documentation/latex/aes256__ex1__encrypt_decrypt_8c.tex create mode 100644 Generated Documentation/latex/aes__ex1__encrypt_decrypt_8c.tex create mode 100644 Generated Documentation/latex/aes__ex2__encrypt_decrypt_with_first_round_key_8c.tex create mode 100644 Generated Documentation/latex/annotated.tex create mode 100644 Generated Documentation/latex/battbak__ex1__calendermode_l_p_m3_8c.tex create mode 100644 Generated Documentation/latex/classti__mcu__msp430__driverlib__product.tex create mode 100644 Generated Documentation/latex/comp__b__ex1__2_v_ref_8c.tex create mode 100644 Generated Documentation/latex/comp__b__ex2__1_v5_ref_int_8c.tex create mode 100644 Generated Documentation/latex/comp__b__ex3__avcc_ref_u_l_p_m_8c.tex create mode 100644 Generated Documentation/latex/comp__b__ex4__hysteresis_8c.tex create mode 100644 Generated Documentation/latex/comp__b__ex5___t_ax_8c.tex create mode 100644 Generated Documentation/latex/comp__b__ex6__ext_ref_8c.tex create mode 100644 Generated Documentation/latex/comp__d__ex1__output_toggle_vcomp_vs_vref2_v_8c.tex create mode 100644 Generated Documentation/latex/comp__d__ex2__output_toggle_vcomp_vs_vref25v_8c.tex create mode 100644 Generated Documentation/latex/comp__d__ex3__interrupt_vcomp_vs15_v_8c.tex create mode 100644 Generated Documentation/latex/comp__d__ex4__output_toggle_vcomp_vs_half_vcc_8c.tex create mode 100644 Generated Documentation/latex/comp__d__ex5__output_toggle_hysteresis_8c.tex create mode 100644 Generated Documentation/latex/comp__e__ex1__output_toggle_vcomp_vs_vref2_v_8c.tex create mode 100644 Generated Documentation/latex/comp__e__ex2__output_toggle_vcomp_vs_vref25_v_8c.tex create mode 100644 Generated Documentation/latex/comp__e__ex3__interrupt_vcomp_vs12_v_8c.tex create mode 100644 Generated Documentation/latex/comp__e__ex4__output_toggle_vcomp_vs_half_vcc_8c.tex create mode 100644 Generated Documentation/latex/comp__e__ex5__output_toggle_hysteresis_8c.tex create mode 100644 Generated Documentation/latex/crc32__ex1__calculate_crc16_8c.tex create mode 100644 Generated Documentation/latex/cs__ex1___d_c_o1_m_hz_s_w_trim_8c.tex create mode 100644 Generated Documentation/latex/cs__ex1__output_clock_signals_8c.tex create mode 100644 Generated Documentation/latex/cs__ex2___d_c_o16_m_hz_8c.tex create mode 100644 Generated Documentation/latex/cs__ex2___d_c_o24_m_hz_8c.tex create mode 100644 Generated Documentation/latex/cs__ex2___v_l_o_sources_m_c_l_k_8c.tex create mode 100644 Generated Documentation/latex/cs__ex2__calculate_clock_signals_8c.tex create mode 100644 Generated Documentation/latex/cs__ex3___x_t1_fault_8c.tex create mode 100644 Generated Documentation/latex/cs__ex3___x_t1_sources_a_c_l_k_8c.tex create mode 100644 Generated Documentation/latex/cs__ex4___x_t_sources_d_c_o_internal_8c.tex create mode 100644 Generated Documentation/latex/ctsd16__ex1__single_ch_cont_conv_8c.tex create mode 100644 Generated Documentation/latex/ctsd16__ex2__single_ch_single_conv_polling_8c.tex create mode 100644 Generated Documentation/latex/ctsd16__ex3__single_ch_single_conv_interrupt_8c.tex create mode 100644 Generated Documentation/latex/ctsd16__ex4__internal_temp_sensor_8c.tex create mode 100644 Generated Documentation/latex/ctsd16__ex5__three_ch_single_conv_8c.tex create mode 100644 Generated Documentation/latex/dac12__a__ex1__1_v5_out_8c.tex create mode 100644 Generated Documentation/latex/dac12__a__ex2__0_v75_out_8c.tex create mode 100644 Generated Documentation/latex/dac12__a__ex3__positive_ramp_int_8c.tex create mode 100644 Generated Documentation/latex/dac12__a__ex4__grouped_8c.tex create mode 100644 Generated Documentation/latex/dir_0175f9cbb4633b514b5514f21bec03a0.tex create mode 100644 Generated Documentation/latex/dir_026cf2b502f8bbf86cefdc24803245a7.tex create mode 100644 Generated Documentation/latex/dir_0471030c6c40e74c2aa9e23909a0aefd.tex create mode 100644 Generated Documentation/latex/dir_04f69be1ff08eefe392fcaf09da102e4.tex create mode 100644 Generated Documentation/latex/dir_06231492a7d233fc4a83ba7357554081.tex create mode 100644 Generated Documentation/latex/dir_07e7a19cced4ca994622ecf053dbaebb.tex create mode 100644 Generated Documentation/latex/dir_082cefa607877865df28aba5f85bc6fe.tex create mode 100644 Generated Documentation/latex/dir_0951772c4bb174d3e698a7a501f39205.tex create mode 100644 Generated Documentation/latex/dir_0bf1e8c1a0485b32b4ea3855c05c5e9f.tex create mode 100644 Generated Documentation/latex/dir_10079ac620cbbd74c446f76890731701.tex create mode 100644 Generated Documentation/latex/dir_109b57299c2f7cc571c23ddcc06a7c2e.tex create mode 100644 Generated Documentation/latex/dir_11a78232b6b0b2534a0769fc18e029c9.tex create mode 100644 Generated Documentation/latex/dir_14fcb402065fc02656148105e0b88af8.tex create mode 100644 Generated Documentation/latex/dir_1565a4596743f346939089b01b134b85.tex create mode 100644 Generated Documentation/latex/dir_1726e59edf0cdfc0cd477fe472a1d541.tex create mode 100644 Generated Documentation/latex/dir_17daed8eeb6fb5022fcc96df7cc52430.tex create mode 100644 Generated Documentation/latex/dir_1b03434fe1954bcac8b5ee387e9cbef9.tex create mode 100644 Generated Documentation/latex/dir_1bbd2b7171cd7cf40620edab77a45e65.tex create mode 100644 Generated Documentation/latex/dir_1dc93fad658d497d540ca6f49d4eae01.tex create mode 100644 Generated Documentation/latex/dir_1e8a087624731203a4e03c56185a5ede.tex create mode 100644 Generated Documentation/latex/dir_1f3a4db757d3e95a006fc493c3318364.tex create mode 100644 Generated Documentation/latex/dir_1fb5ef0779154eaf786832488fc134cb.tex create mode 100644 Generated Documentation/latex/dir_21f3df333188901ff8460d06725eaffa.tex create mode 100644 Generated Documentation/latex/dir_25c248bdb2c4a10c020f8b7aee9fc291.tex create mode 100644 Generated Documentation/latex/dir_27f6d00ac9f631b8de85eccb4b9708f1.tex create mode 100644 Generated Documentation/latex/dir_295ec522445a072381cce51588ae06de.tex create mode 100644 Generated Documentation/latex/dir_2aaf424bbcb07f5dded9ec249652df2c.tex create mode 100644 Generated Documentation/latex/dir_2b7e865b343d6334dab389a0c4067e85.tex create mode 100644 Generated Documentation/latex/dir_2bcdb68feb241a3616b904a7e7f95389.tex create mode 100644 Generated Documentation/latex/dir_2dd3fc5c5508b4aa7f7cc27f9032e4c2.tex create mode 100644 Generated Documentation/latex/dir_2e61e066929921851158d646dc727247.tex create mode 100644 Generated Documentation/latex/dir_302d4a0d9a31e1dff21c7c222f7dfd5d.tex create mode 100644 Generated Documentation/latex/dir_316389d960a63be80b1f1816e0c22eae.tex create mode 100644 Generated Documentation/latex/dir_31688d51ab3625fd6f143fd30cc4d7bb.tex create mode 100644 Generated Documentation/latex/dir_3225291aa21e87c4bb2bfb83325021b3.tex create mode 100644 Generated Documentation/latex/dir_3645d7f8031073ad138ae29d5db24eae.tex create mode 100644 Generated Documentation/latex/dir_3742855ec19362cf25065527c1fc030e.tex create mode 100644 Generated Documentation/latex/dir_3911d8ee7cbc2334cb3f1227242ecfb5.tex create mode 100644 Generated Documentation/latex/dir_3944c9284a587c1f4257344ed41687e0.tex create mode 100644 Generated Documentation/latex/dir_3aaa32de3f366737f4163401f25ad36a.tex create mode 100644 Generated Documentation/latex/dir_3c028bf27ff0ca18e6fef1c96c0b15e6.tex create mode 100644 Generated Documentation/latex/dir_3fba8f4249fcded8acf0d58cb4b2908c.tex create mode 100644 Generated Documentation/latex/dir_41b60d89ff3e63ab46a3e1149f733e71.tex create mode 100644 Generated Documentation/latex/dir_4336da0f5495bbaf9d3e5dbf6dc34a3b.tex create mode 100644 Generated Documentation/latex/dir_4600d35be30302c4f82c762933a95149.tex create mode 100644 Generated Documentation/latex/dir_46bb5cba78f3d659357596b06de24bf6.tex create mode 100644 Generated Documentation/latex/dir_4b117179b94f57436657819294870333.tex create mode 100644 Generated Documentation/latex/dir_4dfbf0dfe91a70509baf4d63dfcfcc89.tex create mode 100644 Generated Documentation/latex/dir_510be4f72cc28193897cc86401cba96f.tex create mode 100644 Generated Documentation/latex/dir_543ba87a51cfd72533030917770f2e9b.tex create mode 100644 Generated Documentation/latex/dir_5557d2dfca73451af42ecb1cc3f4abba.tex create mode 100644 Generated Documentation/latex/dir_5cb3408a2640a05bbe5a2bd7ac1425c0.tex create mode 100644 Generated Documentation/latex/dir_5d100c2ee59e1240a58e5c289fb89725.tex create mode 100644 Generated Documentation/latex/dir_605117065d7c8c97aabf9f28515eba73.tex create mode 100644 Generated Documentation/latex/dir_61af95113b1c3b9440ec0074b124f011.tex create mode 100644 Generated Documentation/latex/dir_630fcb25634efa01e994e9aef2f3e6ee.tex create mode 100644 Generated Documentation/latex/dir_634a8ed938b77d81360973e3e254e296.tex create mode 100644 Generated Documentation/latex/dir_671c42cbbb63ff19748c8b235d022dd2.tex create mode 100644 Generated Documentation/latex/dir_6a614e991455c38c24c39f1c281482b8.tex create mode 100644 Generated Documentation/latex/dir_6ad900e8c05a48e8be1ee4ac03e4b4f7.tex create mode 100644 Generated Documentation/latex/dir_6b2cccbd1d15715bde7f0ce90277f7bd.tex create mode 100644 Generated Documentation/latex/dir_6b9671e3c9b220273878dafaffd150ca.tex create mode 100644 Generated Documentation/latex/dir_6da89819271f0a19271417f22567ac14.tex create mode 100644 Generated Documentation/latex/dir_6dd7a4a9281b42b5ea66482ce4ab570d.tex create mode 100644 Generated Documentation/latex/dir_70714d2aca86afc563a34e5a9827e459.tex create mode 100644 Generated Documentation/latex/dir_72b3b577103c4e1d818c29293ca64182.tex create mode 100644 Generated Documentation/latex/dir_749f43066334c41d074768d87138b910.tex create mode 100644 Generated Documentation/latex/dir_74d81e3051d166463177e7d329645fd7.tex create mode 100644 Generated Documentation/latex/dir_759b7552192ad4c73f4203223d9fa7bd.tex create mode 100644 Generated Documentation/latex/dir_762ab1aaffcdc16c534d7f44ec94ed85.tex create mode 100644 Generated Documentation/latex/dir_779215781e0c56b2dbe71db7dc4ffde1.tex create mode 100644 Generated Documentation/latex/dir_78cb9699776baeaa5a3078007071323f.tex create mode 100644 Generated Documentation/latex/dir_7d80b55b8874981d2c05fea5bbc460de.tex create mode 100644 Generated Documentation/latex/dir_7e35627299eadc140fa9f5b7bf8b752f.tex create mode 100644 Generated Documentation/latex/dir_7f0790c84fb90bf7e23bc1b5170de075.tex create mode 100644 Generated Documentation/latex/dir_7f3d2c3741e3cebf940be7b1b5e1e296.tex create mode 100644 Generated Documentation/latex/dir_833dd6cfcfb93ae3949f725b30f9f0b3.tex create mode 100644 Generated Documentation/latex/dir_843369d2751018e7d78858c9a71e64cd.tex create mode 100644 Generated Documentation/latex/dir_85d95bcfdae2672eb6e746472fb99deb.tex create mode 100644 Generated Documentation/latex/dir_88765eb59bb63182d83beb82b232fd6a.tex create mode 100644 Generated Documentation/latex/dir_8c50fd412e5423dbdcf739a7e016f159.tex create mode 100644 Generated Documentation/latex/dir_93fd190f9784dd3dd42f9b99be91f00f.tex create mode 100644 Generated Documentation/latex/dir_98608e1fdd8c96ffd63941cc9a97da72.tex create mode 100644 Generated Documentation/latex/dir_9ce6686f5bf5a431b61c5e3d2d4edf5f.tex create mode 100644 Generated Documentation/latex/dir_a154d89777d2ada6b1db063fa79917f4.tex create mode 100644 Generated Documentation/latex/dir_a1bfd36036f718300d642d927b53a244.tex create mode 100644 Generated Documentation/latex/dir_a5460467d48412bac8a5d370a0db913c.tex create mode 100644 Generated Documentation/latex/dir_a59373bc14508c66c1aa06e8d8bc8f86.tex create mode 100644 Generated Documentation/latex/dir_a7080a07f6c13140b95a96f2e4f9f58e.tex create mode 100644 Generated Documentation/latex/dir_a8437566e3ea5ecb62f55f67b9e4dc7a.tex create mode 100644 Generated Documentation/latex/dir_a8c71ea87835c0d8a05c4d4cfe708aa4.tex create mode 100644 Generated Documentation/latex/dir_a995487c8d63d1383a78289498ad6a65.tex create mode 100644 Generated Documentation/latex/dir_ab0c921bdd9a9e5f1288a99c079e4979.tex create mode 100644 Generated Documentation/latex/dir_ae8b9a58c4fbe997ebbfd3d6682707a5.tex create mode 100644 Generated Documentation/latex/dir_af9069c38f2c19d58b3a8be371ba0f22.tex create mode 100644 Generated Documentation/latex/dir_afba8e1a2b546f24731d7f7c3e5b6ade.tex create mode 100644 Generated Documentation/latex/dir_aff2a07b8353ec749f36856f01c7d4a6.tex create mode 100644 Generated Documentation/latex/dir_b3573a60974c7f178e0fb0a6a8a6c75f.tex create mode 100644 Generated Documentation/latex/dir_b365eb187f183b5df72a97d850f7180a.tex create mode 100644 Generated Documentation/latex/dir_b4786a23037e6930f849d1b2151b2e07.tex create mode 100644 Generated Documentation/latex/dir_b65b9f777b5a5f6237a6c760eefe3795.tex create mode 100644 Generated Documentation/latex/dir_b74c14a59839bde55b254b6580d7dfe6.tex create mode 100644 Generated Documentation/latex/dir_b9248ce9a2767a12c61d4d45f2280b32.tex create mode 100644 Generated Documentation/latex/dir_bb5bcff7a5bad458d8a7e628656fad56.tex create mode 100644 Generated Documentation/latex/dir_bde32bf976401edbce144c1ca78437b0.tex create mode 100644 Generated Documentation/latex/dir_be8d20f8b92420c4109550e14991a9fb.tex create mode 100644 Generated Documentation/latex/dir_bea013136ac6d3f377c968c2beaaa893.tex create mode 100644 Generated Documentation/latex/dir_c03632983561d195ae60c8cc9da44571.tex create mode 100644 Generated Documentation/latex/dir_c04c9bebcd5da6ee4826760db194f738.tex create mode 100644 Generated Documentation/latex/dir_c0642c19cc2587483da76293a392fed9.tex create mode 100644 Generated Documentation/latex/dir_c2512795e3a4512bee9d568cc25983f1.tex create mode 100644 Generated Documentation/latex/dir_c252896fd4388b12116c6321cce38484.tex create mode 100644 Generated Documentation/latex/dir_c35f050220a147549410dacfeb76a0d7.tex create mode 100644 Generated Documentation/latex/dir_c3d2eb9dde46f0ea73f8afe6370f2777.tex create mode 100644 Generated Documentation/latex/dir_c3d61c7657b31db0d37f8715a88169d1.tex create mode 100644 Generated Documentation/latex/dir_c44d038dcc0269d9192477c7773019a9.tex create mode 100644 Generated Documentation/latex/dir_c52bf2e4596f9f72c1d98ba6dcbced26.tex create mode 100644 Generated Documentation/latex/dir_ceb3708e9b274deb981df4e08a597703.tex create mode 100644 Generated Documentation/latex/dir_d1cdc94e4743062d51d03f2ab07fd0d2.tex create mode 100644 Generated Documentation/latex/dir_d34ca186a80f92f31027d832db95126c.tex create mode 100644 Generated Documentation/latex/dir_d35b6de7ba3ee658750082a39610a085.tex create mode 100644 Generated Documentation/latex/dir_d499546f32b62e621cbb46a9bd7235a1.tex create mode 100644 Generated Documentation/latex/dir_d87f7b488c593ccac8e50b6adb209b28.tex create mode 100644 Generated Documentation/latex/dir_d9c187d8ae5f0bd15615fe91d1359a4a.tex create mode 100644 Generated Documentation/latex/dir_dbe3accc307b9bf6afea11f2c193cb27.tex create mode 100644 Generated Documentation/latex/dir_dd0a5b517506d8c0f057cfaecb7b3dc0.tex create mode 100644 Generated Documentation/latex/dir_e05a0e25cf09c63f5adca92ff25f8b76.tex create mode 100644 Generated Documentation/latex/dir_e09fccf4effa8ccdaa55ad5954043e6e.tex create mode 100644 Generated Documentation/latex/dir_e256ef861b355381072786cf7d6ec888.tex create mode 100644 Generated Documentation/latex/dir_e504cc91e30efc744fb3203a7e8c72ab.tex create mode 100644 Generated Documentation/latex/dir_e54074d57bcfa9665c1a30adcc935096.tex create mode 100644 Generated Documentation/latex/dir_e63bd246281937e955d4714b96846de6.tex create mode 100644 Generated Documentation/latex/dir_e81e95489ce2e46abb84fd29d6a72d62.tex create mode 100644 Generated Documentation/latex/dir_ead3f6887c571328b70ed30eb47cb8e9.tex create mode 100644 Generated Documentation/latex/dir_eae072b88d613e8d7b5192fe7d125af6.tex create mode 100644 Generated Documentation/latex/dir_eb8ca45731295244f599d183ce849a41.tex create mode 100644 Generated Documentation/latex/dir_ed3596e77998d87ed8ef810021a85e9c.tex create mode 100644 Generated Documentation/latex/dir_eec688965624bb19de0a965b56266886.tex create mode 100644 Generated Documentation/latex/dir_f48266d516bf22e0f95921002a52f5e0.tex create mode 100644 Generated Documentation/latex/dir_fb333e6e1aef903e906ff887888876d0.tex create mode 100644 Generated Documentation/latex/dir_fc112d82c1af6fd1c09d247ef04c25e6.tex create mode 100644 Generated Documentation/latex/dir_fd957caaaf9933bd05516ec5a0d9bc40.tex create mode 100644 Generated Documentation/latex/dir_fe7c91cff9293174cda4e8ad4e82d438.tex create mode 100644 Generated Documentation/latex/dma__ex2__repeated_block_u_a_r_t_8c.tex create mode 100644 Generated Documentation/latex/dma__ex3__single_transfer_s_p_i_8c.tex create mode 100644 Generated Documentation/latex/dma__ex4__single_transfer_a_d_c12_8c.tex create mode 100644 Generated Documentation/latex/ecomp__ex1__output_toggle_vcomp_vs_vref1_85_v_8c.tex create mode 100644 Generated Documentation/latex/ecomp__ex2__interrupt_vcomp_vs1_85_v_8c.tex create mode 100644 Generated Documentation/latex/eusci__a__spi__ex1__3_wire_master_8c.tex create mode 100644 Generated Documentation/latex/eusci__a__spi__ex1__3_wire_slave_8c.tex create mode 100644 Generated Documentation/latex/eusci__a__uart__ex1__loopback115200_baud_8c.tex create mode 100644 Generated Documentation/latex/eusci__b__i2c__ex1__master_t_x_multiple_8c.tex create mode 100644 Generated Documentation/latex/eusci__b__i2c__ex1__slave_r_x_multiple_8c.tex create mode 100644 Generated Documentation/latex/eusci__b__i2c__ex2__master_r_x_multiple_8c.tex create mode 100644 Generated Documentation/latex/eusci__b__i2c__ex2__slave_t_x_multiple_8c.tex create mode 100644 Generated Documentation/latex/eusci__b__spi__ex1__3_wire_master_8c.tex create mode 100644 Generated Documentation/latex/eusci__b__spi__ex1__3_wire_slave_8c.tex create mode 100644 Generated Documentation/latex/flashctl__ex1__info_segment_write_8c.tex create mode 100644 Generated Documentation/latex/flashctl__ex1__write_to_info_b_8c.tex create mode 100644 Generated Documentation/latex/flashctl__ex2__erase_copy_write_8c.tex create mode 100644 Generated Documentation/latex/flashctl__ex3__long_word_write_8c.tex create mode 100644 Generated Documentation/latex/flashctl__ex4__write_to_info_a_8c.tex create mode 100644 Generated Documentation/latex/framctl__a__ex1__write_8c.tex create mode 100644 Generated Documentation/latex/gpio__ex1__toggle_output_8c.tex create mode 100644 Generated Documentation/latex/gpio__ex2__input_interrupt_8c.tex create mode 100644 Generated Documentation/latex/group__dac12__examples__list.tex create mode 100644 Generated Documentation/latex/group__ref__examples__list.tex create mode 100644 Generated Documentation/latex/hspll__ex1__output__ussxtosc_8c.tex create mode 100644 Generated Documentation/latex/icc__ex1__nested_interrupt_8c.tex create mode 100644 Generated Documentation/latex/lcd__b__ex1__4mux_8c.tex create mode 100644 Generated Documentation/latex/lcd__c__ex1__4mux_8c.tex create mode 100644 Generated Documentation/latex/lcd__e__ex1__4__mux_8c.tex create mode 100644 Generated Documentation/latex/ldopwr__ex1__internal_l_d_o_power_8c.tex create mode 100644 Generated Documentation/latex/ldopwr__ex2__software_poll_8c.tex create mode 100644 Generated Documentation/latex/ldopwr__ex3__internal_l_d_o_enabled_8c.tex create mode 100644 Generated Documentation/latex/mtif__ex1__pulse_generation_8c.tex create mode 100644 Generated Documentation/latex/oa__ex1__general_purpose_8c.tex create mode 100644 Generated Documentation/latex/oa__ex2__general_purpose_8c.tex create mode 100644 Generated Documentation/latex/oa__ex3__unity_gain_buffer_8c.tex create mode 100644 Generated Documentation/latex/package_8defs_8h.tex create mode 100644 Generated Documentation/latex/package__ti_8mcu_8msp430_8driverlib_8product_8c.tex create mode 100644 Generated Documentation/latex/pmap__ex1__single_runtime_config_8c.tex create mode 100644 Generated Documentation/latex/pmap__ex2__output_timer_b_signal_8c.tex create mode 100644 Generated Documentation/latex/pmap__ex3__single_function_to_multiple_pins_8c.tex create mode 100644 Generated Documentation/latex/pmm__ex1__lpm4-5_8c.tex create mode 100644 Generated Documentation/latex/pmm__ex1__vcore3_8c.tex create mode 100644 Generated Documentation/latex/pmm__ex2__fast_wake_up_8c.tex create mode 100644 Generated Documentation/latex/pmm__ex2__vmon1160m_v_8c.tex create mode 100644 Generated Documentation/latex/pmm__ex3__low_current_consumption_8c.tex create mode 100644 Generated Documentation/latex/ram__ex1__set_sector_off_8c.tex create mode 100644 Generated Documentation/latex/ram__ex1__turn_off_sector_8c.tex create mode 100644 Generated Documentation/latex/ref__a__ex1__ctl_a_d_c12_b_8c.tex create mode 100644 Generated Documentation/latex/ref__ex1___a_d_c12_ctl_8c.tex create mode 100644 Generated Documentation/latex/ref__ex1__internal_reference_8c.tex create mode 100644 Generated Documentation/latex/resources.tex create mode 100644 Generated Documentation/latex/rtc__a__ex1__calendermode_8c.tex create mode 100644 Generated Documentation/latex/rtc__a__ex2__countermode_8c.tex create mode 100644 Generated Documentation/latex/rtc__b__ex1__calendermode_l_p_m0_8c.tex create mode 100644 Generated Documentation/latex/rtc__b__ex2__calendermode_l_p_m3_8c.tex create mode 100644 Generated Documentation/latex/rtc__ex1__countmode_8c.tex create mode 100644 Generated Documentation/latex/sac__ex1__oa_g_p_mode_8c.tex create mode 100644 Generated Documentation/latex/sac__ex2__unity_gain_buffer_mode_8c.tex create mode 100644 Generated Documentation/latex/sac__ex3__two_stage_amplifier_8c.tex create mode 100644 Generated Documentation/latex/sac__ex4__ecomp_8c.tex create mode 100644 Generated Documentation/latex/saph__a__ex3__pulse_generation_d_m_a_8c.tex create mode 100644 Generated Documentation/latex/saph__ex1__pulse_generation_8c.tex create mode 100644 Generated Documentation/latex/sd24__b__ex1__single_conv_single_channel_8c.tex create mode 100644 Generated Documentation/latex/sd24__b__ex2__single_conv_channel_group_8c.tex create mode 100644 Generated Documentation/latex/sd24__b__ex3__cont_conv_single_channel_8c.tex create mode 100644 Generated Documentation/latex/sd24__ex1__continuous_conversion_group_channels_8c.tex create mode 100644 Generated Documentation/latex/sd24__ex2__single_conversion_group_channels_8c.tex create mode 100644 Generated Documentation/latex/sd24__ex3__continuous_conversion_single_channel_8c.tex create mode 100644 Generated Documentation/latex/sd24__ex4__single_conversion_single_channel_polling_8c.tex create mode 100644 Generated Documentation/latex/sd24__ex5__single_conversion_single_channel_interrupt_8c.tex create mode 100644 Generated Documentation/latex/sd24__ex6__single_conversion_single_conversion_temp_sensor_8c.tex create mode 100644 Generated Documentation/latex/sdhs__ex1__8msps__sampling_8c.tex create mode 100644 Generated Documentation/latex/tec__ex1__sync_timers_8c.tex create mode 100644 Generated Documentation/latex/tec__ex2__ext_clear_input_8c.tex create mode 100644 Generated Documentation/latex/ti__mcu__msp430__driverlib__product_8java.tex create mode 100644 Generated Documentation/latex/tia__ex1__two_external_inputs_8c.tex create mode 100644 Generated Documentation/latex/timer__a__ex1__continuous_overflow_interrupt_8c.tex create mode 100644 Generated Documentation/latex/timer__a__ex2__single_p_w_m_8c.tex create mode 100644 Generated Documentation/latex/timer__a__ex3__up_mode_interrupt_8c.tex create mode 100644 Generated Documentation/latex/timer__a__ex4__period_capture_8c.tex create mode 100644 Generated Documentation/latex/timer__d__ex10__duty_cycle_measurement_dual_8c.tex create mode 100644 Generated Documentation/latex/timer__d__ex1__cont_c_r_r0_8c.tex create mode 100644 Generated Documentation/latex/timer__d__ex2__overflow_i_s_r_8c.tex create mode 100644 Generated Documentation/latex/timer__d__ex3__up_down_mode_8c.tex create mode 100644 Generated Documentation/latex/timer__d__ex4__pwm_up_down_mode_8c.tex create mode 100644 Generated Documentation/latex/timer__d__ex5__hi_res_free_running_p_w_m_8c.tex create mode 100644 Generated Documentation/latex/timer__d__ex6__hi_res_regulated_p_w_m_8c.tex create mode 100644 Generated Documentation/latex/timer__d__ex7__combine_regs_p_w_m_8c.tex create mode 100644 Generated Documentation/latex/timer__d__ex8__duty_cycle_measurement_single_8c.tex create mode 100644 Generated Documentation/latex/timer__d__ex9__period_measurement_8c.tex create mode 100644 Generated Documentation/latex/tlv__ex1__check_checksum_8c.tex create mode 100644 Generated Documentation/latex/ucs__ex1___d_c_o12_m_hz_8c.tex create mode 100644 Generated Documentation/latex/ucs__ex2___v_l_o_sources_a_c_l_k_8c.tex create mode 100644 Generated Documentation/latex/ucs__ex3___x_t1_sources_a_c_l_k_8c.tex create mode 100644 Generated Documentation/latex/ucs__ex4___x_t_sources_d_c_o_internal_8c.tex create mode 100644 Generated Documentation/latex/usci__a__spi__ex1__master_8c.tex create mode 100644 Generated Documentation/latex/usci__a__spi__ex1__slave_8c.tex create mode 100644 Generated Documentation/latex/usci__a__uart__ex1__loopback_advance_8c.tex create mode 100644 Generated Documentation/latex/usci__a__uart__ex2__address_bit_multiprocessor_r_x_8c.tex create mode 100644 Generated Documentation/latex/usci__a__uart__ex2__address_bit_multiprocessor_t_x_8c.tex create mode 100644 Generated Documentation/latex/usci__a__uart__ex3__auto_baudrate_detection_r_x_8c.tex create mode 100644 Generated Documentation/latex/usci__a__uart__ex3__auto_baudrate_detection_t_x_8c.tex create mode 100644 Generated Documentation/latex/usci__a__uart__ex4__idle_line_multiprocessor_r_x_8c.tex create mode 100644 Generated Documentation/latex/usci__a__uart__ex4__idleline_multiprocessor_t_x_8c.tex create mode 100644 Generated Documentation/latex/usci__b__i2c__ex1__master_rx_single_8c.tex create mode 100644 Generated Documentation/latex/usci__b__i2c__ex1__slave_tx_single_8c.tex create mode 100644 Generated Documentation/latex/usci__b__i2c__ex2__master_tx_multiple_8c.tex create mode 100644 Generated Documentation/latex/usci__b__i2c__ex2__slave_rx_multiple_8c.tex create mode 100644 Generated Documentation/latex/usci__b__i2c__ex3__master_tx_single_8c.tex create mode 100644 Generated Documentation/latex/usci__b__i2c__ex3__slave_rx_single_8c.tex create mode 100644 Generated Documentation/latex/usci__b__i2c__ex4__master_rx_multiple_8c.tex create mode 100644 Generated Documentation/latex/usci__b__i2c__ex4__slave_tx_multiple_8c.tex create mode 100644 Generated Documentation/latex/usci__b__spi__ex1__master_8c.tex create mode 100644 Generated Documentation/latex/usci__b__spi__ex1__slave_8c.tex create mode 100644 Generated Documentation/latex/wdt__ex1__interval_mode_8c.tex create mode 100644 Generated Documentation/latex/wdt__ex2__watchdog_mode_8c.tex create mode 100644 Hardware/Power Design.markdown diff --git a/Generated Documentation/html/_9_hardware_8markdown.html b/Generated Documentation/html/_9_hardware_8markdown.html index 396ada5..301e0ca 100644 --- a/Generated Documentation/html/_9_hardware_8markdown.html +++ b/Generated Documentation/html/_9_hardware_8markdown.html @@ -98,7 +98,7 @@ $(document).ready(function(){initNavTree('_9_hardware_8markdown.html',''); initR diff --git a/Generated Documentation/html/_9_resources_8markdown.html b/Generated Documentation/html/_9_resources_8markdown.html new file mode 100644 index 0000000..e02dc23 --- /dev/null +++ b/Generated Documentation/html/_9_resources_8markdown.html @@ -0,0 +1,105 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/!Resources.markdown File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Resources/!Resources.markdown File Reference
+
+
+
+
+ + + + diff --git a/Generated Documentation/html/_9_software_8markdown.html b/Generated Documentation/html/_9_software_8markdown.html index 0c2b210..e0b491e 100644 --- a/Generated Documentation/html/_9_software_8markdown.html +++ b/Generated Documentation/html/_9_software_8markdown.html @@ -98,7 +98,7 @@ $(document).ready(function(){initNavTree('_9_software_8markdown.html',''); initR diff --git a/Generated Documentation/html/_board_8h.html b/Generated Documentation/html/_board_8h.html new file mode 100644 index 0000000..bcb1785 --- /dev/null +++ b/Generated Documentation/html/_board_8h.html @@ -0,0 +1,107 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/Board.h File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Board.h File Reference
+
+ +
+ + + + diff --git a/Generated Documentation/html/_board_8h_source.html b/Generated Documentation/html/_board_8h_source.html new file mode 100644 index 0000000..00b372b --- /dev/null +++ b/Generated Documentation/html/_board_8h_source.html @@ -0,0 +1,332 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/Board.h Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Board.h
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
53 #ifndef __BOARD_H__
+
54 #define __BOARD_H__
+
55 
+
56 #ifdef __MSP430FR4133__
+
57 
+
58 #define GPIO_PORT_LED1 GPIO_PORT_P1
+
59 #define GPIO_PIN_LED1 GPIO_PIN0
+
60 #define GPIO_PORT_LED2 GPIO_PORT_P4
+
61 #define GPIO_PIN_LED2 GPIO_PIN0
+
62 #define GPIO_PORT_S1 GPIO_PORT_P1
+
63 #define GPIO_PIN_S1 GPIO_PIN2
+
64 
+
65 #define GPIO_PORT_ADC7 GPIO_PORT_P1
+
66 #define GPIO_PIN_ADC7 GPIO_PIN7
+
67 #define GPIO_FUNCTION_ADC7 GPIO_PRIMARY_MODULE_FUNCTION
+
68 
+
69 #define GPIO_PORT_MCLK GPIO_PORT_P1
+
70 #define GPIO_PIN_MCLK GPIO_PIN4
+
71 #define GPIO_FUNCTION_MCLK GPIO_PRIMARY_MODULE_FUNCTION
+
72 #define GPIO_PORT_SMCLK GPIO_PORT_P8
+
73 #define GPIO_PIN_SMCLK GPIO_PIN0
+
74 #define GPIO_FUNCTION_SMCLK GPIO_PRIMARY_MODULE_FUNCTION
+
75 #define GPIO_PORT_ACLK GPIO_PORT_P8
+
76 #define GPIO_PIN_ACLK GPIO_PIN1
+
77 #define GPIO_FUNCTION_ACLK GPIO_PRIMARY_MODULE_FUNCTION
+
78 
+
79 #define GPIO_PORT_UCA0TXD GPIO_PORT_P1
+
80 #define GPIO_PIN_UCA0TXD GPIO_PIN0
+
81 #define GPIO_FUNCTION_UCA0TXD GPIO_PRIMARY_MODULE_FUNCTION
+
82 #define GPIO_PORT_UCA0RXD GPIO_PORT_P1
+
83 #define GPIO_PIN_UCA0RXD GPIO_PIN1
+
84 #define GPIO_FUNCTION_UCA0RXD GPIO_PRIMARY_MODULE_FUNCTION
+
85 
+
86 #define GPIO_PORT_UCB0SCL GPIO_PORT_P5
+
87 #define GPIO_PIN_UCB0SCL GPIO_PIN3
+
88 #define GPIO_FUNCTION_UCB0SCL GPIO_PRIMARY_MODULE_FUNCTION
+
89 #define GPIO_PORT_UCB0SDA GPIO_PORT_P5
+
90 #define GPIO_PIN_UCB0SDA GPIO_PIN2
+
91 #define GPIO_FUNCTION_UCB0SDA GPIO_PRIMARY_MODULE_FUNCTION
+
92 
+
93 #endif // __MSP430FR4133__
+
94 
+
95 #ifdef __MSP430FR2311__
+
96 
+
97 #define GPIO_PORT_LED1 GPIO_PORT_P1
+
98 #define GPIO_PIN_LED1 GPIO_PIN0
+
99 #define GPIO_PORT_LED2 GPIO_PORT_P2
+
100 #define GPIO_PIN_LED2 GPIO_PIN0
+
101 #define GPIO_PORT_S1 GPIO_PORT_P1
+
102 #define GPIO_PIN_S1 GPIO_PIN1
+
103 
+
104 #define GPIO_PORT_ADC7 GPIO_PORT_P1
+
105 #define GPIO_PIN_ADC7 GPIO_PIN7
+
106 #define GPIO_FUNCTION_ADC7 GPIO_PRIMARY_MODULE_FUNCTION
+
107 
+
108 #define GPIO_PORT_MCLK GPIO_PORT_P2
+
109 #define GPIO_PIN_MCLK GPIO_PIN6
+
110 #define GPIO_FUNCTION_MCLK GPIO_PRIMARY_MODULE_FUNCTION
+
111 #define GPIO_PORT_SMCLK GPIO_PORT_P1
+
112 #define GPIO_PIN_SMCLK GPIO_PIN0
+
113 #define GPIO_FUNCTION_SMCLK GPIO_SECONDARY_MODULE_FUNCTION
+
114 #define GPIO_PORT_ACLK GPIO_PORT_P1
+
115 #define GPIO_PIN_ACLK GPIO_PIN1
+
116 #define GPIO_FUNCTION_ACLK GPIO_SECONDARY_MODULE_FUNCTION
+
117 
+
118 #define GPIO_PORT_UCA0TXD GPIO_PORT_P1
+
119 #define GPIO_PIN_UCA0TXD GPIO_PIN7
+
120 #define GPIO_FUNCTION_UCA0TXD GPIO_PRIMARY_MODULE_FUNCTION
+
121 #define GPIO_PORT_UCA0RXD GPIO_PORT_P1
+
122 #define GPIO_PIN_UCA0RXD GPIO_PIN6
+
123 #define GPIO_FUNCTION_UCA0RXD GPIO_PRIMARY_MODULE_FUNCTION
+
124 
+
125 #define GPIO_PORT_UCB0SCL GPIO_PORT_P1
+
126 #define GPIO_PIN_UCB0SCL GPIO_PIN3
+
127 #define GPIO_FUNCTION_UCB0SCL GPIO_PRIMARY_MODULE_FUNCTION
+
128 #define GPIO_PORT_UCB0SDA GPIO_PORT_P1
+
129 #define GPIO_PIN_UCB0SDA GPIO_PIN2
+
130 #define GPIO_FUNCTION_UCB0SDA GPIO_PRIMARY_MODULE_FUNCTION
+
131 
+
132 #endif // __MSP430FR2311__
+
133 
+
134 #ifdef __MSP430FR2433__
+
135 
+
136 #define GPIO_PORT_LED1 GPIO_PORT_P1
+
137 #define GPIO_PIN_LED1 GPIO_PIN0
+
138 #define GPIO_PORT_LED2 GPIO_PORT_P1
+
139 #define GPIO_PIN_LED2 GPIO_PIN1
+
140 #define GPIO_PORT_S1 GPIO_PORT_P2
+
141 #define GPIO_PIN_S1 GPIO_PIN3
+
142 #define GPIO_PORT_S2 GPIO_PORT_P2
+
143 #define GPIO_PIN_S2 GPIO_PIN7
+
144 
+
145 #define GPIO_PORT_ADC7 GPIO_PORT_P1
+
146 #define GPIO_PIN_ADC7 GPIO_PIN7
+
147 #define GPIO_FUNCTION_ADC7 GPIO_PRIMARY_MODULE_FUNCTION
+
148 
+
149 #define GPIO_PORT_MCLK GPIO_PORT_P1
+
150 #define GPIO_PIN_MCLK GPIO_PIN3
+
151 #define GPIO_FUNCTION_MCLK GPIO_SECONDARY_MODULE_FUNCTION
+
152 #define GPIO_PORT_SMCLK GPIO_PORT_P1
+
153 #define GPIO_PIN_SMCLK GPIO_PIN7
+
154 #define GPIO_FUNCTION_SMCLK GPIO_SECONDARY_MODULE_FUNCTION
+
155 #define GPIO_PORT_ACLK GPIO_PORT_P2
+
156 #define GPIO_PIN_ACLK GPIO_PIN2
+
157 #define GPIO_FUNCTION_ACLK GPIO_SECONDARY_MODULE_FUNCTION
+
158 
+
159 #define GPIO_PORT_UCA0TXD GPIO_PORT_P1
+
160 #define GPIO_PIN_UCA0TXD GPIO_PIN4
+
161 #define GPIO_FUNCTION_UCA0TXD GPIO_PRIMARY_MODULE_FUNCTION
+
162 #define GPIO_PORT_UCA0RXD GPIO_PORT_P1
+
163 #define GPIO_PIN_UCA0RXD GPIO_PIN5
+
164 #define GPIO_FUNCTION_UCA0RXD GPIO_PRIMARY_MODULE_FUNCTION
+
165 
+
166 #define GPIO_PORT_UCB0SCL GPIO_PORT_P1
+
167 #define GPIO_PIN_UCB0SCL GPIO_PIN3
+
168 #define GPIO_FUNCTION_UCB0SCL GPIO_PRIMARY_MODULE_FUNCTION
+
169 #define GPIO_PORT_UCB0SDA GPIO_PORT_P1
+
170 #define GPIO_PIN_UCB0SDA GPIO_PIN2
+
171 #define GPIO_FUNCTION_UCB0SDA GPIO_PRIMARY_MODULE_FUNCTION
+
172 
+
173 #endif // __MSP430FR2433__
+
174 
+
175 #ifdef __MSP430FR2355__
+
176 
+
177 #define GPIO_PORT_LED1 GPIO_PORT_P1
+
178 #define GPIO_PIN_LED1 GPIO_PIN0
+
179 #define GPIO_PORT_LED2 GPIO_PORT_P6
+
180 #define GPIO_PIN_LED2 GPIO_PIN6
+
181 #define GPIO_PORT_S1 GPIO_PORT_P4
+
182 #define GPIO_PIN_S1 GPIO_PIN1
+
183 #define GPIO_PORT_S2 GPIO_PORT_P2
+
184 #define GPIO_PIN_S2 GPIO_PIN3
+
185 
+
186 #define GPIO_PORT_ADC7 GPIO_PORT_P1
+
187 #define GPIO_PIN_ADC7 GPIO_PIN7
+
188 #define GPIO_FUNCTION_ADC7 GPIO_TERNARY_MODULE_FUNCTION
+
189 
+
190 #define GPIO_PORT_XIN GPIO_PORT_P2
+
191 #define GPIO_PIN_XIN GPIO_PIN_P7
+
192 #define GPIO_FUNCTION_XIN GPIO_SECONDARY_MODULE_FUNCTION
+
193 #define GPIO_PORT_XOUT GPIO_PORT_P2
+
194 #define GPIO_PIN_XOUT GPIO_PIN_P6
+
195 #define GPIO_FUNCTION_XOUT GPIO_SECONDARY_MODULE_FUNCTION
+
196 
+
197 #define GPIO_PORT_MCLK GPIO_PORT_P3
+
198 #define GPIO_PIN_MCLK GPIO_PIN0
+
199 #define GPIO_FUNCTION_MCLK GPIO_PRIMARY_MODULE_FUNCTION
+
200 #define GPIO_PORT_SMCLK GPIO_PORT_P3
+
201 #define GPIO_PIN_SMCLK GPIO_PIN4
+
202 #define GPIO_FUNCTION_SMCLK GPIO_PRIMARY_MODULE_FUNCTION
+
203 #define GPIO_PORT_ACLK GPIO_PORT_P1
+
204 #define GPIO_PIN_ACLK GPIO_PIN1
+
205 #define GPIO_FUNCTION_ACLK GPIO_SECONDARY_MODULE_FUNCTION
+
206 
+
207 #define GPIO_PORT_UCA0TXD GPIO_PORT_P1
+
208 #define GPIO_PIN_UCA0TXD GPIO_PIN7
+
209 #define GPIO_FUNCTION_UCA0TXD GPIO_PRIMARY_MODULE_FUNCTION
+
210 #define GPIO_PORT_UCA0RXD GPIO_PORT_P1
+
211 #define GPIO_PIN_UCA0RXD GPIO_PIN6
+
212 #define GPIO_FUNCTION_UCA0RXD GPIO_PRIMARY_MODULE_FUNCTION
+
213 
+
214 #define GPIO_PORT_UCB0SCL GPIO_PORT_P1
+
215 #define GPIO_PIN_UCB0SCL GPIO_PIN3
+
216 #define GPIO_FUNCTION_UCB0SCL GPIO_PRIMARY_MODULE_FUNCTION
+
217 #define GPIO_PORT_UCB0SDA GPIO_PORT_P1
+
218 #define GPIO_PIN_UCB0SDA GPIO_PIN2
+
219 #define GPIO_FUNCTION_UCB0SDA GPIO_PRIMARY_MODULE_FUNCTION
+
220 
+
221 #define GPIO_PORT_SACOA0O GPIO_PORT_P1
+
222 #define GPIO_PIN_SACOA0O GPIO_PIN1
+
223 #define GPIO_FUNCTION_SACOA0O GPIO_TERNARY_MODULE_FUNCTION
+
224 #define GPIO_PORT_SACOA0N GPIO_PORT_P1
+
225 #define GPIO_PIN_SACOA0N GPIO_PIN2
+
226 #define GPIO_FUNCTION_SACOA0N GPIO_TERNARY_MODULE_FUNCTION
+
227 #define GPIO_PORT_SACOA0P GPIO_PORT_P1
+
228 #define GPIO_PIN_SACOA0P GPIO_PIN3
+
229 #define GPIO_FUNCTION_SACOA0P GPIO_TERNARY_MODULE_FUNCTION
+
230 
+
231 #define GPIO_PORT_SACOA2O GPIO_PORT_P3
+
232 #define GPIO_PIN_SACOA2O GPIO_PIN1
+
233 #define GPIO_FUNCTION_SACOA2O GPIO_TERNARY_MODULE_FUNCTION
+
234 #define GPIO_PORT_SACOA2N GPIO_PORT_P3
+
235 #define GPIO_PIN_SACOA2N GPIO_PIN2
+
236 #define GPIO_FUNCTION_SACOA2N GPIO_TERNARY_MODULE_FUNCTION
+
237 #define GPIO_PORT_SACOA2P GPIO_PORT_P3
+
238 #define GPIO_PIN_SACOA2P GPIO_PIN3
+
239 #define GPIO_FUNCTION_SACOA2P GPIO_TERNARY_MODULE_FUNCTION
+
240 
+
241 #define GPIO_PORT_COMP0O GPIO_PORT_P2
+
242 #define GPIO_PIN_COMP0O GPIO_PIN0
+
243 #define GPIO_FUNCTION_COMP0O GPIO_SECONDARY_MODULE_FUNCTION
+
244 
+
245 #endif // __MSP430FR2355__
+
246 
+
247 #endif // __BOARD_H__
+
248 
+
+
+ + + + diff --git a/Generated Documentation/html/_design_01_choices_8markdown.html b/Generated Documentation/html/_design_01_choices_8markdown.html index b262188..8f9fad6 100644 --- a/Generated Documentation/html/_design_01_choices_8markdown.html +++ b/Generated Documentation/html/_design_01_choices_8markdown.html @@ -98,7 +98,7 @@ $(document).ready(function(){initNavTree('_design_01_choices_8markdown.html','') diff --git a/Generated Documentation/html/_device_01_specifications_8markdown.html b/Generated Documentation/html/_device_01_specifications_8markdown.html index 88d053b..a8bdafd 100644 --- a/Generated Documentation/html/_device_01_specifications_8markdown.html +++ b/Generated Documentation/html/_device_01_specifications_8markdown.html @@ -98,7 +98,7 @@ $(document).ready(function(){initNavTree('_device_01_specifications_8markdown.ht diff --git a/Generated Documentation/html/_documentation_01_guide_8markdown.html b/Generated Documentation/html/_documentation_01_guide_8markdown.html index b93c125..2865004 100644 --- a/Generated Documentation/html/_documentation_01_guide_8markdown.html +++ b/Generated Documentation/html/_documentation_01_guide_8markdown.html @@ -98,7 +98,7 @@ $(document).ready(function(){initNavTree('_documentation_01_guide_8markdown.html diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2crc_2crc__ex1__build_signature_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2crc_2crc__ex1__build_signature_8c.html new file mode 100644 index 0000000..45fe84a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2crc_2crc__ex1__build_signature_8c.html @@ -0,0 +1,159 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/crc/crc_ex1_buildSignature.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
crc_ex1_buildSignature.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

CRC - Build Signature and Rebuild to test.

+

The CRC is first used to build a signature using a seed and multiple data values. This signature is considered as the checksum and can be sent by a UART connection along with the data to verify the correct data has been sent. The second half of this program is used to test the CRC checksum of the data that has been created, by recreating the same checksum and comparing it to the first checksum. If the two checksum are equal, then P1.0 is set and the LED is turned on. Breakpoints can be set before the CRC_setData() function to observe the CRC register values and see the subsequent signatures before/after each data set.

+

+Tested On: MSP430F5529,MSP430FR5739

+ + + + + + + +
/ |
RST
P1.0 --> LED
+

| |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • CRC peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 69 of file crc_ex1_buildSignature.c.

+ +

References __no_operation(), GPIO_setOutputHighOnPin(), and i.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2crc_2crc__ex1__build_signature_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2crc_2crc__ex1__build_signature_8c.js new file mode 100644 index 0000000..55f59b2 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2crc_2crc__ex1__build_signature_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2crc_2crc__ex1__build_signature_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2crc_2crc__ex1__build_signature_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2crc_2crc__ex1__build_signature_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2crc_2crc__ex1__build_signature_8c_source.html new file mode 100644 index 0000000..288ac01 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2crc_2crc__ex1__build_signature_8c_source.html @@ -0,0 +1,206 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/crc/crc_ex1_buildSignature.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
crc_ex1_buildSignature.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
65 //******************************************************************************
+
66 
+
67 #include "driverlib.h"
+
68 
+
69 void main (void)
+
70 {
+
71  uint16_t crcSeed = 0xBEEF;
+
72  uint16_t data[] = {0x0123,
+
73  0x4567,
+
74  0x8910,
+
75  0x1112,
+
76  0x1314};
+
77  uint16_t crcResult;
+
78  uint8_t i;
+
79 
+
80  //Stop WDT
+
81  WDT_A_hold(WDT_A_BASE);
+
82 
+
83  //Set P1.0 as an output
+
84  GPIO_setAsOutputPin(
+
85  GPIO_PORT_P1,
+
86  GPIO_PIN0);
+
87 
+
88  //Set the CRC seed
+
89  CRC_setSeed(CRC_BASE,
+
90  crcSeed);
+
91 
+
92  for (i = 0; i < 5; i++)
+
93  {
+
94  //Add all of the values into the CRC signature
+
95  CRC_set16BitData(CRC_BASE,
+
96  data[i]);
+
97  }
+
98 
+
99  //Save the current CRC signature checksum to be compared for later
+
100  crcResult = CRC_getResult(CRC_BASE);
+
101 
+
102 
+
103  //*** Test the CRC ***//
+
104 
+
105  //Reset the CRC Signature and set the same seed
+
106  CRC_setSeed(CRC_BASE,
+
107  crcSeed);
+
108 
+
109  for (i = 0; i < 5; i++)
+
110  {
+
111  //Add all of the values into the CRC signature
+
112  CRC_set16BitData(CRC_BASE,
+
113  data[i]);
+
114  }
+
115 
+
116  //Compare the 2 CRC Resulting Signature Checksums
+
117  if (crcResult == CRC_getResult(CRC_BASE)){
+
118  //set P1.0
+ +
120  GPIO_PORT_P1,
+
121  GPIO_PIN0);
+
122  }
+
123 
+
124  //Enter LPM4, interrupts enabled
+
125  __bis_SR_register(LPM4_bits);
+
126  __no_operation();
+
127 }
+
128 
+
void main(void)
+ + +
__no_operation()
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2dma_2dma__ex1__repeated_block_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2dma_2dma__ex1__repeated_block_8c.html new file mode 100644 index 0000000..65ed666 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2dma_2dma__ex1__repeated_block_8c.html @@ -0,0 +1,151 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/dma/dma_ex1_repeatedBlock.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
dma_ex1_repeatedBlock.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

DMA - Repeated Block Transfer to-and-from RAM, Software Trigger.

+

A 16 word block from 1C00-1C1Fh is transfered to 1C20h-1C3fh using DMA0 in a burst block using software DMAREQ trigger. After each transfer, source, destination and DMA size are reset to initial software setting because DMA transfer mode 5 is used. P1.0 is toggled during DMA transfer only for demonstration purposes. ** RAM location 0x1C00 - 0x1C3F used - make sure no compiler conflict ** ACLK = REFO = 32kHz, MCLK = SMCLK = default DCO 1048576Hz

+

+Tested on MSP430F5529, MSP430FR5739

+

/|| XIN|- | | | 32kHz –|RST XOUT|- | | | P1.0|-> LED | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • DMA peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 68 of file dma_ex1_repeatedBlock.c.

+ +

References GPIO_setOutputHighOnPin(), GPIO_setOutputLowOnPin(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2dma_2dma__ex1__repeated_block_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2dma_2dma__ex1__repeated_block_8c.js new file mode 100644 index 0000000..f317ef8 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2dma_2dma__ex1__repeated_block_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2dma_2dma__ex1__repeated_block_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2dma_2dma__ex1__repeated_block_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2dma_2dma__ex1__repeated_block_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2dma_2dma__ex1__repeated_block_8c_source.html new file mode 100644 index 0000000..dc81c0f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2dma_2dma__ex1__repeated_block_8c_source.html @@ -0,0 +1,220 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/dma/dma_ex1_repeatedBlock.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
dma_ex1_repeatedBlock.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
66 //******************************************************************************
+
67 
+
68 void main (void)
+
69 {
+
70  //Stop Watchdog Timer
+
71  WDT_A_hold(WDT_A_BASE);
+
72 
+
73  //Set P1.0 to output direction
+
74  GPIO_setAsOutputPin(
+
75  GPIO_PORT_P1,
+
76  GPIO_PIN0
+
77  );
+
78 
+
79  //Initialize and Setup DMA Channel 0
+
80  /*
+
81  * Base Address of the DMA Module
+
82  * Configure DMA channel 0
+
83  * Configure channel for repeated block transfers
+
84  * DMA interrupt flag will be set after every 16 transfers
+
85  * Use DMA_startTransfer() function to trigger transfers
+
86  * Transfer Word-to-Word
+
87  * Trigger upon Rising Edge of Trigger Source Signal
+
88  */
+
89  DMA_initParam param = {0};
+
90  param.channelSelect = DMA_CHANNEL_0;
+
91  param.transferModeSelect = DMA_TRANSFER_REPEATED_BLOCK;
+
92  param.transferSize = 16;
+
93  param.triggerSourceSelect = DMA_TRIGGERSOURCE_0;
+
94  param.transferUnitSelect = DMA_SIZE_SRCWORD_DSTWORD;
+
95  param.triggerTypeSelect = DMA_TRIGGER_RISINGEDGE;
+
96  DMA_init(&param);
+
97  /*
+
98  * Base Address of the DMA Module
+
99  * Configure DMA channel 0
+
100  * Use 0x1C00 as source
+
101  * Increment source address after every transfer
+
102  */
+
103  DMA_setSrcAddress(
+
104  DMA_CHANNEL_0,
+
105  0x1C00,
+
106  DMA_DIRECTION_INCREMENT);
+
107  /*
+
108  * Base Address of the DMA Module
+
109  * Configure DMA channel 0
+
110  * Use 0x1C20 as destination
+
111  * Increment destination address after every transfer
+
112  */
+
113  DMA_setDstAddress(
+
114  DMA_CHANNEL_0,
+
115  0x1C20,
+
116  DMA_DIRECTION_INCREMENT);
+
117 
+
118  //Enable transfers on DMA channel 0
+
119  DMA_enableTransfers(
+
120  DMA_CHANNEL_0);
+
121 
+
122  while (1)
+
123  {
+
124  //set P1.0
+ +
126  GPIO_PORT_P1,
+
127  GPIO_PIN0
+
128  );
+
129 
+
130  //Start block tranfer on DMA channel 0
+
131  DMA_startTransfer(
+
132  DMA_CHANNEL_0);
+
133 
+
134  //Clear P1.0 LED off
+ +
136  GPIO_PORT_P1,
+
137  GPIO_PIN0
+
138  );
+
139  }
+
140 }
+
141 
+
void main(void)
+
MPU_initThreeSegmentsParam param
+ +
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html new file mode 100644 index 0000000..e46ace4 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html @@ -0,0 +1,222 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_a_spi/eusci_a_spi_ex1_master.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_a_spi_ex1_master.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCI_A0_ISR (void)
 
+ + + + + +

+Variables

uint8_t RXData = 0
 
uint8_t TXData = 0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 81 of file eusci_a_spi_ex1_master.c.

+ +

References __delay_cycles(), __no_operation(), i, param, and TXData.

+ +
+
+ +

◆ USCI_A0_ISR()

+ +
+
+ + + + + + + + +
void USCI_A0_ISR (void )
+
+ +

Definition at line 140 of file eusci_a_spi_ex1_master.c.

+ +

References __delay_cycles(), RXData, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData = 0
+
+

USCI_A0, SPI 3-Wire Master Incremented Data This example shows how SPI master talks to SPI slave using 3-wire mode. Incrementing data is sent by the master starting at 0x01. Received data is expected to be same as the previous transmission. eUSCI RX ISR is used to handle communication with the CPU, normally in LPM0. If high, P1.0 indicates valid data reception. Because all execution after LPM0 is in ISRs, initialization waits for DCO to stabilize against ACLK. ACLK = ~32.768kHz, MCLK = SMCLK = DCO ~ 1048kHz. BRCLK = SMCLK/2

+

Use with eusci_spi_ex1_slave code example. If slave is in debug mode, P1.1 slave reset signal conflicts with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.


+

/|\ | | | | | Master—+->|RST | | | | P3.1|-> Data Out (UCA0SIMO) | | | P3.0|<- Data In (UCA0SOMI) | | | P3.2|-> Serial Clock Out (UCA0CLK)

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • SPI peripheral
  • +
  • GPIO Port peripheral (for SPI pins)
  • +
  • UCS peripheral
  • +
  • UCA0SIMO
  • +
  • UCA0SOMI
  • +
  • UCA0CLK
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_A0_VECTOR
  • +
+ +

Definition at line 78 of file eusci_a_spi_ex1_master.c.

+ +

Referenced by USCI_A0_ISR().

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 79 of file eusci_a_spi_ex1_master.c.

+ +

Referenced by main(), and USCI_A0_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.js new file mode 100644 index 0000000..86f0c9d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCI_A0_ISR", "_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html#a7d5728ccc412d2d610500fa338c2d003", null ], + [ "RXData", "_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html#a597ef8ed788642728c57f66b3a21544f", null ], + [ "TXData", "_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c_source.html new file mode 100644 index 0000000..7a7b0a9 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c_source.html @@ -0,0 +1,239 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_a_spi/eusci_a_spi_ex1_master.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_a_spi_ex1_master.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 //*****************************************************************************
+
49 // MSP430F67791A
+
76 //*****************************************************************************
+
77 
+
78 uint8_t RXData = 0;
+
79 uint8_t TXData = 0;
+
80 
+
81 void main(void)
+
82 {
+
83  volatile uint16_t i;
+
84 
+
85  //Stop watchdog timer
+
86  WDT_A_hold(WDT_A_BASE);
+
87 
+
88  //Configure Pins for UCA0CLK, UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI
+
89  //Set P3.0, P3.1, P3.2 as Module Function Input.
+
90  GPIO_setAsPeripheralModuleFunctionInputPin(
+
91  GPIO_PORT_P3,
+
92  GPIO_PIN0+ GPIO_PIN1 + GPIO_PIN2
+
93  );
+
94 
+
95  //Set the XT1 frequency to UCS
+
96  UCS_setExternalClockSource(32768, 0);
+
97 
+
98  //Initialize Master
+
99  EUSCI_A_SPI_initMasterParam param = {0};
+
100  param.selectClockSource = EUSCI_A_SPI_CLOCKSOURCE_SMCLK;
+
101  param.clockSourceFrequency = UCS_getSMCLK();
+
102  param.desiredSpiClock = 500000;
+
103  param.msbFirst = EUSCI_A_SPI_MSB_FIRST;
+
104  param.clockPhase = EUSCI_A_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
+
105  param.clockPolarity = EUSCI_A_SPI_CLOCKPOLARITY_INACTIVITY_HIGH;
+
106  param.spiMode = EUSCI_A_SPI_3PIN;
+
107  EUSCI_A_SPI_initMaster(EUSCI_A0_BASE, &param);
+
108 
+
109  //Enable SPI module
+
110  EUSCI_A_SPI_enable(EUSCI_A0_BASE);
+
111 
+
112  EUSCI_A_SPI_clearInterrupt(EUSCI_A0_BASE,
+
113  EUSCI_A_SPI_RECEIVE_INTERRUPT);
+
114  // Enable USCI_A0 RX interrupt
+
115  EUSCI_A_SPI_enableInterrupt(EUSCI_A0_BASE,
+
116  EUSCI_A_SPI_RECEIVE_INTERRUPT);
+
117 
+
118  //Wait for slave to initialize
+
119  __delay_cycles(100);
+
120 
+
121  TXData = 0x1; // Holds TX data
+
122 
+
123  //USCI_A0 TX buffer ready?
+
124  while (!EUSCI_A_SPI_getInterruptStatus(EUSCI_A0_BASE,
+
125  EUSCI_A_SPI_TRANSMIT_INTERRUPT)) ;
+
126 
+
127  //Transmit Data to slave
+
128  EUSCI_A_SPI_transmitData(EUSCI_A0_BASE, TXData);
+
129 
+
130  __bis_SR_register(LPM0_bits + GIE); // CPU off, enable interrupts
+
131  __no_operation(); // Remain in LPM0
+
132 }
+
133 
+
134 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
135 #pragma vector=USCI_A0_VECTOR
+
136 __interrupt
+
137 #elif defined(__GNUC__)
+
138 __attribute__((interrupt(USCI_A0_VECTOR)))
+
139 #endif
+
140 void USCI_A0_ISR(void)
+
141 {
+
142  switch(__even_in_range(UCA0IV, USCI_SPI_UCTXIFG))
+
143  {
+
144  case USCI_SPI_UCRXIFG: // UCRXIFG
+
145  //USCI_A0 TX buffer ready?
+
146  while (!EUSCI_A_SPI_getInterruptStatus(EUSCI_A0_BASE,
+
147  EUSCI_A_SPI_TRANSMIT_INTERRUPT));
+
148 
+
149  RXData = EUSCI_A_SPI_receiveData(EUSCI_A0_BASE);
+
150 
+
151  //Increment data
+
152  TXData++;
+
153 
+
154  //Send next value
+
155  EUSCI_A_SPI_transmitData(EUSCI_A0_BASE,
+
156  TXData
+
157  );
+
158 
+
159  //Delay between transmissions for slave to process information
+
160  __delay_cycles(40);
+
161  break;
+
162  default:
+
163  break;
+
164  }
+
165 }
+
166 
+
uint8_t RXData
+
void main(void)
+
void USCI_A0_ISR(void)
+
uint8_t TXData
+
MPU_initThreeSegmentsParam param
+ + +
__no_operation()
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html new file mode 100644 index 0000000..b8efb72 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html @@ -0,0 +1,224 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_a_spi/eusci_a_spi_ex1_slave.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_a_spi_ex1_slave.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCI_A0_ISR (void)
 
+ + + + + +

+Variables

uint8_t transmitData = 0x01
 
uint8_t receiveData = 0x00
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 77 of file eusci_a_spi_ex1_slave.c.

+ +

References param.

+ +
+
+ +

◆ USCI_A0_ISR()

+ +
+
+ + + + + + + + +
void USCI_A0_ISR (void )
+
+ +

Definition at line 122 of file eusci_a_spi_ex1_slave.c.

+ +

References receiveData, and transmitData.

+ +
+
+

Variable Documentation

+ +

◆ receiveData

+ +
+
+ + + + +
uint8_t receiveData = 0x00
+
+ +

Definition at line 75 of file eusci_a_spi_ex1_slave.c.

+ +

Referenced by USCI_A0_ISR().

+ +
+
+ +

◆ transmitData

+ +
+
+ + + + +
uint8_t transmitData = 0x01
+
+

SPI slave talks to SPI master using 3-wire mode. Data is received from master and data from slave is then transmitted back to master. USCI RX ISR is used to handle communication, CPU normally in LPM4. Prior to initial data exchange, master pulses slaves RST for complete reset.

+

Use with eusci_spi_ex1_master code example. If the slave is in debug mode, the reset signal from the master will conflict with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.

+

+Tesed on MSP430F67791A

+

/|\ | | | | | Master—+->|RST | | | | P3.1|-> Data Out (UCA0SIMO) | | | P3.0|<- Data In (UCA0SOMI) | | | P3.2|<- Serial Clock Out (UCA0CLK)

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • SPI peripheral
  • +
  • GPIO Port peripheral (for SPI pins)
  • +
  • UCS peripheral
  • +
  • UCA0SIMO
  • +
  • UCA0SOMI
  • +
  • UCA0CLK
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_A0_VECTOR
  • +
+ +

Definition at line 75 of file eusci_a_spi_ex1_slave.c.

+ +

Referenced by USCI_A0_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.js new file mode 100644 index 0000000..618dce2 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCI_A0_ISR", "_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html#a7d5728ccc412d2d610500fa338c2d003", null ], + [ "receiveData", "_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html#a216001f02f93a2c0b512c1b8724bdc60", null ], + [ "transmitData", "_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html#ac23b8f721ac5b7a4315ba2c3409b9e0a", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c_source.html new file mode 100644 index 0000000..e717756 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c_source.html @@ -0,0 +1,220 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_a_spi/eusci_a_spi_ex1_slave.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_a_spi_ex1_slave.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
73 //
+
74 //*****************************************************************************
+
75 uint8_t transmitData = 0x01, receiveData = 0x00;
+
76 
+
77 void main(void)
+
78 {
+
79  //Stop watchdog timer
+
80  WDT_A_hold(WDT_A_BASE);
+
81 
+
82  //Configure Pins for UCA0CLK, UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI
+
83  //Set P3.0, P3.1, P3.2 as Module Function Input.
+
84  GPIO_setAsPeripheralModuleFunctionInputPin(
+
85  GPIO_PORT_P3,
+
86  GPIO_PIN0+ GPIO_PIN1 + GPIO_PIN2
+
87  );
+
88 
+
89  //Initialize slave to MSB first, inactive high clock polarity and 3 wire SPI
+
90  EUSCI_A_SPI_initSlaveParam param = {0};
+
91  param.msbFirst = EUSCI_A_SPI_MSB_FIRST;
+
92  param.clockPhase = EUSCI_A_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
+
93  param.clockPolarity = EUSCI_A_SPI_CLOCKPOLARITY_INACTIVITY_HIGH;
+
94  param.spiMode = EUSCI_A_SPI_3PIN;
+
95  EUSCI_A_SPI_initSlave(EUSCI_A0_BASE, &param);
+
96 
+
97  //Enable SPI Module
+
98  EUSCI_A_SPI_enable(EUSCI_A0_BASE);
+
99 
+
100  EUSCI_A_SPI_clearInterrupt(EUSCI_A0_BASE,
+
101  EUSCI_A_SPI_RECEIVE_INTERRUPT);
+
102 
+
103  //Enable Receive interrupt
+
104  EUSCI_A_SPI_enableInterrupt(EUSCI_A0_BASE,
+
105  EUSCI_A_SPI_RECEIVE_INTERRUPT
+
106  );
+
107 
+
108  __bis_SR_register(LPM0_bits + GIE); // Enter LPM0, enable interrupts
+
109 }
+
110 
+
111 //******************************************************************************
+
112 //
+
113 //This is the USCI_A0 interrupt vector service routine.
+
114 //
+
115 //******************************************************************************
+
116 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
117 #pragma vector=USCI_A0_VECTOR
+
118 __interrupt
+
119 #elif defined(__GNUC__)
+
120 __attribute__((interrupt(USCI_A0_VECTOR)))
+
121 #endif
+
122 void USCI_A0_ISR (void)
+
123 {
+
124  switch(__even_in_range(UCA0IV, USCI_SPI_UCTXIFG))
+
125  {
+
126  case USCI_SPI_UCRXIFG: // UCRXIFG
+
127  //USCI_A0 TX buffer ready?
+
128  while (!EUSCI_A_SPI_getInterruptStatus(EUSCI_A0_BASE,
+
129  EUSCI_A_SPI_TRANSMIT_INTERRUPT
+
130  ));
+
131 
+
132  //Transmit data to master
+
133  EUSCI_A_SPI_transmitData(EUSCI_A0_BASE,
+ +
135  );
+
136 
+
137  //Receive data from master
+
138  receiveData = EUSCI_A_SPI_receiveData(EUSCI_A0_BASE);
+
139 
+
140  //Increment data to be transmitted
+
141  transmitData++;
+
142  break;
+
143  default:
+
144  break;
+
145  }
+
146 }
+
147 
+
uint8_t receiveData
+
void main(void)
+
void USCI_A0_ISR(void)
+
uint8_t transmitData
+
MPU_initThreeSegmentsParam param
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html new file mode 100644 index 0000000..19de44b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html @@ -0,0 +1,265 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_a_uart/eusci_a_uart_ex1_loopbackAdvanced.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_a_uart_ex1_loopbackAdvanced.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void EUSCI_A0_ISR (void)
 
+ + + + + + + + + +

+Variables

uint16_t i
 
uint8_t RXData = 0
 
uint8_t TXData = 0
 
uint8_t check = 0
 
+

Function Documentation

+ +

◆ EUSCI_A0_ISR()

+ +
+
+ + + + + + + + +
void EUSCI_A0_ISR (void )
+
+ +

Definition at line 134 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +

References check, RXData, and TXData.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 68 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +

References check, param, STATUS_FAIL, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ check

+ +
+
+ + + + +
uint8_t check = 0
+
+ +

Definition at line 66 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +

Referenced by EUSCI_A0_ISR(), main(), and USCI_A0_ISR().

+ +
+
+ +

◆ i

+ +
+
+ + + + +
uint16_t i
+
+

EUSCI_A0 External Loopback test using EUSCI_A_UART_init API

+

Description: This demo connects TX to RX of the MSP430 UART The example code shows proper initialization of registers and interrupts to receive and transmit data.

+

ACLK = BRCLK = 32.768kHz, MCLK = SMCLK = DCO/8 = ~1MHz

+
       Tested on MSP430F67791A
+        -----------------
+  RST -|     P3.0/UCA0RXD|----|
+       |                 |    |
+       |                 |    |
+       |     P3.1/UCA0TXD|----|
+       |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • UART peripheral
  • +
  • GPIO Port peripheral (for UART pins)
  • +
  • UCA0TXD
  • +
  • UCA0RXD
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_A0_VECTOR.
  • +
+ +

Definition at line 64 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +
+
+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData = 0
+
+ +

Definition at line 65 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +

Referenced by EUSCI_A0_ISR(), and USCI_A0_ISR().

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 65 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +

Referenced by EUSCI_A0_ISR(), main(), and USCI_A0_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.js new file mode 100644 index 0000000..565f41f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.js @@ -0,0 +1,9 @@ +var _m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c = +[ + [ "EUSCI_A0_ISR", "_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#a06404fa75e5db173d0570112cbb0d39a", null ], + [ "main", "_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "check", "_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#ad47d5b159b4c95a163edac9d1b659751", null ], + [ "i", "_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#a78f7a37dba921e0b0347b960fb40bc51", null ], + [ "RXData", "_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#a597ef8ed788642728c57f66b3a21544f", null ], + [ "TXData", "_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c_source.html new file mode 100644 index 0000000..75a61d3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c_source.html @@ -0,0 +1,237 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_a_uart/eusci_a_uart_ex1_loopbackAdvanced.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_a_uart_ex1_loopbackAdvanced.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 uint16_t i;
+
65 uint8_t RXData = 0, TXData = 0;
+
66 uint8_t check = 0;
+
67 
+
68 void main(void)
+
69 {
+
70  // stop watchdog
+
71  WDT_A_hold(WDT_A_BASE);
+
72 
+
73  //Set external clock frequency to 32.768 KHz
+
74  UCS_setExternalClockSource(32768, 0);
+
75  //Set ACLK=XT1
+
76  UCS_initClockSignal(UCS_ACLK, UCS_XT1CLK_SELECT, UCS_CLOCK_DIVIDER_1);
+
77  //Start XT1 with no time out
+
78  UCS_turnOnLFXT1(UCS_XT1_DRIVE_0, UCS_XCAP_3);
+
79 
+
80  //Configure UART pins (UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI)
+
81  //Set P3.0 and P3.1 as Module Function Input
+
82  GPIO_setAsPeripheralModuleFunctionInputPin(
+
83  GPIO_PORT_P3,
+
84  GPIO_PIN0 + GPIO_PIN1
+
85  );
+
86 
+
87  // Configure UART
+
88  EUSCI_A_UART_initParam param = {0};
+
89  param.selectClockSource = EUSCI_A_UART_CLOCKSOURCE_ACLK;
+
90  param.clockPrescalar = 3;
+
91  param.firstModReg = 0;
+
92  param.secondModReg = 92;
+
93  param.parity = EUSCI_A_UART_NO_PARITY;
+
94  param.msborLsbFirst = EUSCI_A_UART_LSB_FIRST;
+
95  param.numberofStopBits = EUSCI_A_UART_ONE_STOP_BIT;
+
96  param.uartMode = EUSCI_A_UART_MODE;
+
97  param.overSampling = EUSCI_A_UART_LOW_FREQUENCY_BAUDRATE_GENERATION;
+
98 
+
99  if (STATUS_FAIL == EUSCI_A_UART_init(EUSCI_A0_BASE, &param)) {
+
100  return;
+
101  }
+
102 
+
103  EUSCI_A_UART_enable(EUSCI_A0_BASE);
+
104 
+
105  EUSCI_A_UART_clearInterrupt(EUSCI_A0_BASE,
+
106  EUSCI_A_UART_RECEIVE_INTERRUPT);
+
107 
+
108  // Enable USCI_A0 RX interrupt
+
109  EUSCI_A_UART_enableInterrupt(EUSCI_A0_BASE,
+
110  EUSCI_A_UART_RECEIVE_INTERRUPT); // Enable interrupt
+
111 
+
112  __enable_interrupt();
+
113  while (1)
+
114  {
+
115  TXData = TXData+1; // Increment TX data
+
116  // Load data onto buffer
+
117  EUSCI_A_UART_transmitData(EUSCI_A0_BASE,
+
118  TXData);
+
119  while(check != 1);
+
120  check = 0;
+
121  }
+
122 }
+
123 //******************************************************************************
+
124 //
+
125 //This is the USCI_A0 interrupt vector service routine.
+
126 //
+
127 //******************************************************************************
+
128 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
129 #pragma vector=USCI_A0_VECTOR
+
130 __interrupt
+
131 #elif defined(__GNUC__)
+
132 __attribute__((interrupt(USCI_A0_VECTOR)))
+
133 #endif
+
134 void EUSCI_A0_ISR(void)
+
135 {
+
136  switch(__even_in_range(UCA0IV,USCI_UART_UCTXCPTIFG))
+
137  {
+
138  case USCI_NONE: break;
+
139  case USCI_UART_UCRXIFG:
+
140  RXData = EUSCI_A_UART_receiveData(EUSCI_A0_BASE);
+
141  if(!(RXData == TXData)) // Check value
+
142  {
+
143  while(1);
+
144  }
+
145  check =1;
+
146  break;
+
147  case USCI_UART_UCTXIFG: break;
+
148  case USCI_UART_UCSTTIFG: break;
+
149  case USCI_UART_UCTXCPTIFG: break;
+
150  }
+
151 }
+
void EUSCI_A0_ISR(void)
+ + + + + +
MPU_initThreeSegmentsParam param
+ +
#define STATUS_FAIL
Definition: hw_memmap.h:23
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html new file mode 100644 index 0000000..65e90a6 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html @@ -0,0 +1,229 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex1_masterRxMultiple.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex1_masterRxMultiple.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
#define RXCOUNT   0x05
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t RXData
 
+

Macro Definition Documentation

+ +

◆ RXCOUNT

+ +
+
+ + + + +
#define RXCOUNT   0x05
+
+ +

Definition at line 52 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +
+
+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+ +

Definition at line 45 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 75 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +

References __delay_cycles(), param, RXCOUNT, and SLAVE_ADDRESS.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 150 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +

References __bic_SR_register_on_exit(), RXCOUNT, and RXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData
+
+ +

Definition at line 74 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +

Referenced by USCIB0_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.js new file mode 100644 index 0000000..13ed2f2 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.js @@ -0,0 +1,8 @@ +var _m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c = +[ + [ "RXCOUNT", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#a70033793a4008a84a5022c8e8467c71b", null ], + [ "SLAVE_ADDRESS", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "RXData", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#a597ef8ed788642728c57f66b3a21544f", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c_source.html new file mode 100644 index 0000000..39bcabf --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c_source.html @@ -0,0 +1,318 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex1_masterRxMultiple.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex1_masterRxMultiple.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
35 //
+
36 //Set the address for slave module. This is a 7-bit address sent in the
+
37 //following format:
+
38 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
39 //
+
40 //A zero in the "RS" position of the first byte means that the master
+
41 //transmits (sends) data to the selected slave, and a one in this position
+
42 //means that the master receives data from the slave.
+
43 //
+
44 //*****************************************************************************
+
45 #define SLAVE_ADDRESS 0x48
+
46 
+
47 //*****************************************************************************
+
48 //
+
49 //Specify Expected Receive data count.
+
50 //
+
51 //*****************************************************************************
+
52 #define RXCOUNT 0x05
+
53 
+
54 //******************************************************************************
+
55 // MSP430F5xx_6xx Demo - USCI_B0 I2C Master RX multiple bytes from MSP430 Slave
+
56 //
+
57 // Description: This demo connects two MSP430's via the I2C bus. The master
+
58 // reads 5 bytes from the slave. This is the MASTER CODE. The data from the slave
+
59 // transmitter begins at 0 and increments with each transfer.
+
60 // The USCI_B0 RX interrupt is used to know when new data has been received.
+
61 // ACLK = n/a, MCLK = SMCLK = BRCLK = DCO = ~1MHz
+
62 //
+
63 // /|\ /|\
+
64 // MSP430F67791A 10k 10k MSP430F67791A
+
65 // slave | | master
+
66 // ----------------- | | -----------------
+
67 // -|XIN P2.6/UCB0SDA|<-|----+->|P2.6/UCB0SDA XIN|-
+
68 // | | | | | 32kHz
+
69 // -|XOUT | | | XOUT|-
+
70 // | P2.5/UCB0SCL|<-+------>|P2.5/UCB0SCL |
+
71 // | | | P1.0|--> LED
+
72 //
+
73 //******************************************************************************
+
74 uint8_t RXData;
+
75 void main (void)
+
76 {
+
77  WDT_A_hold(WDT_A_BASE);
+
78 
+
79  //Set the XT1 frequency to UCS
+
80  UCS_setExternalClockSource(32768, 0);
+
81 
+
82  //Configure Pins for I2C (UCB0SCL, UCB0SDA)
+
83  //Set P2.5 and P2.6 as Module Function Input
+
84  GPIO_setAsPeripheralModuleFunctionInputPin(
+
85  GPIO_PORT_P2,
+
86  GPIO_PIN5 + GPIO_PIN6
+
87  );
+
88 
+
89  //Init I2C master
+
90  EUSCI_B_I2C_initMasterParam param = {0};
+
91  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
92  param.i2cClk = UCS_getSMCLK();
+
93  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
94  param.byteCounterThreshold = RXCOUNT;
+
95  param.autoSTOPGeneration = EUSCI_B_I2C_SEND_STOP_AUTOMATICALLY_ON_BYTECOUNT_THRESHOLD;
+
96  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
97 
+
98  //Specify slave address
+
99  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
101  );
+
102 
+
103  //Set Master in receive mode
+
104  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
105  EUSCI_B_I2C_RECEIVE_MODE
+
106  );
+
107 
+
108  //Enable I2C Module to start operations
+
109  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
110 
+
111  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
112  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
113  EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT +
+
114  EUSCI_B_I2C_NAK_INTERRUPT
+
115  );
+
116 
+
117  //Enable master Receive interrupt
+
118  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
119  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
120  EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT +
+
121  EUSCI_B_I2C_NAK_INTERRUPT
+
122  );
+
123 
+
124  //Set P1.0 as an output pin.
+
125  GPIO_setAsOutputPin(
+
126  GPIO_PORT_P1,
+
127  GPIO_PIN0
+
128  );
+
129 
+
130  while (1)
+
131  {
+
132  __delay_cycles(2000);
+
133 
+
134  while (EUSCI_B_I2C_SENDING_STOP ==
+
135  EUSCI_B_I2C_masterIsStopSent(EUSCI_B0_BASE));
+
136 
+
137  EUSCI_B_I2C_masterReceiveStart(EUSCI_B0_BASE);
+
138 
+
139  // Enter LPM0 w/ interrupt
+
140  __bis_SR_register(CPUOFF+GIE);
+
141  }
+
142 }
+
143 
+
144 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
145 #pragma vector=USCI_B0_VECTOR
+
146 __interrupt
+
147 #elif defined(__GNUC__)
+
148 __attribute__((interrupt(USCI_B0_VECTOR)))
+
149 #endif
+
150 void USCIB0_ISR(void)
+
151 {
+
152  static uint8_t count = 0;
+
153  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
154  {
+
155  case USCI_NONE: // No interrupts break;
+
156  break;
+
157  case USCI_I2C_UCALIFG: // Arbitration lost
+
158  break;
+
159  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
160  EUSCI_B_I2C_masterReceiveStart(EUSCI_B0_BASE);
+
161  break;
+
162  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
163  break;
+
164  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
165  break;
+
166  case USCI_I2C_UCRXIFG3: // RXIFG3
+
167  break;
+
168  case USCI_I2C_UCTXIFG3: // TXIFG3
+
169  break;
+
170  case USCI_I2C_UCRXIFG2: // RXIFG2
+
171  break;
+
172  case USCI_I2C_UCTXIFG2: // TXIFG2
+
173  break;
+
174  case USCI_I2C_UCRXIFG1: // RXIFG1
+
175  break;
+
176  case USCI_I2C_UCTXIFG1: // TXIFG1
+
177  break;
+
178  case USCI_I2C_UCRXIFG0: // RXIFG0
+
179  // Get RX data
+
180  RXData = EUSCI_B_I2C_masterReceiveSingle(
+
181  EUSCI_B0_BASE
+
182  );
+
183  if (++count >= RXCOUNT) {
+
184  count = 0;
+
185  __bic_SR_register_on_exit(CPUOFF); // Exit LPM0
+
186  }
+
187  break; // Vector 24: RXIFG0 break;
+
188  case USCI_I2C_UCTXIFG0: // TXIFG0
+
189  break;
+
190  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
191  GPIO_toggleOutputOnPin(
+
192  GPIO_PORT_P1,
+
193  GPIO_PIN0
+
194  );
+
195  break;
+
196  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
197  break;
+
198  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
199  break;
+
200  default:
+
201  break;
+
202  }
+
203 }
+
204 
+ +
void USCIB0_ISR(void)
+ + + +
MPU_initThreeSegmentsParam param
+ +
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html new file mode 100644 index 0000000..3226cbb --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html @@ -0,0 +1,224 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex1_slaveTxMultiple.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex1_slaveTxMultiple.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t TXData = 0
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

EUSCI_B0 I2C Slave TX multiple bytes to MSP430 Master

+

Description: This demo connects two MSP430's via the I2C bus. The master reads from the slave. This is the SLAVE code. The TX data begins at 0 and is incremented each time it is sent. A stop condition is used as a trigger to initialize the outgoing data. The USCI_B0 TX interrupt is used to know when to TX. Tested on MSP430F67791A

       /|\  /|\
+        10k  10k
+

slave | | master --------------— | | --------------— -|XIN P2.6/UCB0SDA|<-|-—+->|P2.6/UCB0SDA XIN|- | | | | | -|XOUT | | | XOUT|- | P2.5/UCB0SCL|<-+---—>|P2.5/UCB0SCL | | | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 81 of file eusci_b_i2c_ex1_slaveTxMultiple.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 85 of file eusci_b_i2c_ex1_slaveTxMultiple.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 125 of file eusci_b_i2c_ex1_slaveTxMultiple.c.

+ +

References TXData.

+ +
+
+

Variable Documentation

+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 83 of file eusci_b_i2c_ex1_slaveTxMultiple.c.

+ +

Referenced by USCIB0_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.js new file mode 100644 index 0000000..53d442f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "TXData", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c_source.html new file mode 100644 index 0000000..67ad0f8 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c_source.html @@ -0,0 +1,249 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex1_slaveTxMultiple.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex1_slaveTxMultiple.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
68 //
+
69 //*****************************************************************************
+
70 //*****************************************************************************
+
71 //
+
72 //Set the address for slave module. This is a 7-bit address sent in the
+
73 //following format:
+
74 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
75 //
+
76 //A zero in the "RS" position of the first byte means that the master
+
77 //transmits (sends) data to the selected slave, and a one in this position
+
78 //means that the master receives data from the slave.
+
79 //
+
80 //*****************************************************************************
+
81 #define SLAVE_ADDRESS 0x48
+
82 
+
83 uint8_t TXData = 0;
+
84 
+
85 void main(void)
+
86 {
+
87  WDT_A_hold(WDT_A_BASE);
+
88 
+
89  //Configure Pins for I2C (UCB0SCL, UCB0SDA)
+
90  //Set P2.5 and P2.6 as Module Function Input
+
91  GPIO_setAsPeripheralModuleFunctionInputPin(
+
92  GPIO_PORT_P2,
+
93  GPIO_PIN5 + GPIO_PIN6
+
94  );
+
95 
+
96  EUSCI_B_I2C_initSlaveParam param = {0};
+
97  param.slaveAddress = 0x48;
+
98  param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
99  param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
100  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &param);
+
101 
+
102  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
103 
+
104  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
105  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
106  EUSCI_B_I2C_STOP_INTERRUPT
+
107  );
+
108 
+
109  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
110  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
111  EUSCI_B_I2C_STOP_INTERRUPT
+
112  );
+
113 
+
114  // Enter LPM0 w/ interrupts
+
115  __bis_SR_register(CPUOFF + GIE);
+
116  __no_operation();
+
117 }
+
118 
+
119 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
120 #pragma vector=USCI_B0_VECTOR
+
121 __interrupt
+
122 #elif defined(__GNUC__)
+
123 __attribute__((interrupt(USCI_B0_VECTOR)))
+
124 #endif
+
125 void USCIB0_ISR(void)
+
126 {
+
127  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
128  {
+
129  case USCI_NONE: // No interrupts break;
+
130  break;
+
131  case USCI_I2C_UCALIFG: // Arbitration lost
+
132  break;
+
133  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
134  break;
+
135  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
136  break;
+
137  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
138  TXData = 0;
+
139  break;
+
140  case USCI_I2C_UCRXIFG3: // RXIFG3
+
141  break;
+
142  case USCI_I2C_UCTXIFG3: // TXIFG3
+
143  break;
+
144  case USCI_I2C_UCRXIFG2: // RXIFG2
+
145  break;
+
146  case USCI_I2C_UCTXIFG2: // TXIFG2
+
147  break;
+
148  case USCI_I2C_UCRXIFG1: // RXIFG1
+
149  break;
+
150  case USCI_I2C_UCTXIFG1: // TXIFG1
+
151  break;
+
152  case USCI_I2C_UCRXIFG0: // RXIFG0
+
153  break;
+
154  case USCI_I2C_UCTXIFG0: // TXIFG0
+
155  EUSCI_B_I2C_slavePutData(EUSCI_B0_BASE,
+
156  TXData++);
+
157  break;
+
158  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
159  GPIO_toggleOutputOnPin(
+
160  GPIO_PORT_P1,
+
161  GPIO_PIN0
+
162  );
+
163  break;
+
164  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
165  break;
+
166  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
167  break;
+
168  default:
+
169  break;
+
170  }
+
171 }
+
void USCIB0_ISR(void)
+
void main(void)
+ +
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html new file mode 100644 index 0000000..ec50fc4 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html @@ -0,0 +1,206 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex2_masterRxSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex2_masterRxSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + +

+Functions

void main (void)
 
+ + + +

+Variables

uint8_t RXData
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

This example shows how to configure the I2C module as a master for single byte reception in interrupt driven mode. The address of the slave module that the master is communicating with also set in this example.

+

Description: This demo connects two MSP430's via the I2C bus. The master reads from the slave. This is the MASTER CODE. The data from the slave transmitter begins at 0 and increments with each transfer. The USCI_B0 RX interrupt is used to know when new data has been received. ACLK = n/a, MCLK = SMCLK = BRCLK = DCO = 1MHz

                          /|\  /|\
+         MSP430F67791A     10k  10k     MSP430F67791A
+             slave         |    |        master
+       -----------------   |    |   -----------------
+     -|XIN  P2.6/UCB0SDA|<-|----+->|P2.6/UCB0SDA  XIN|-
+      |                 |  |       |                 | 32kHz
+     -|XOUT             |  |       |             XOUT|-
+      |     P2.5/UCB0SCL|<-+------>|P2.5/UCB0SCL     |
+      |                 |          |             P1.0|--> LED
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 82 of file eusci_b_i2c_ex2_masterRxSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 85 of file eusci_b_i2c_ex2_masterRxSingle.c.

+ +

References __delay_cycles(), param, RXData, and SLAVE_ADDRESS.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData
+
+ +

Definition at line 84 of file eusci_b_i2c_ex2_masterRxSingle.c.

+ +

Referenced by main().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.js new file mode 100644 index 0000000..6c980a8 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "RXData", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html#a597ef8ed788642728c57f66b3a21544f", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c_source.html new file mode 100644 index 0000000..69d21f2 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c_source.html @@ -0,0 +1,214 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex2_masterRxSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex2_masterRxSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
55 
+
68 //
+
69 //*****************************************************************************
+
70 //*****************************************************************************
+
71 //
+
72 //Set the address for slave module. This is a 7-bit address sent in the
+
73 //following format:
+
74 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
75 //
+
76 //A zero in the "RS" position of the first byte means that the master
+
77 //transmits (sends) data to the selected slave, and a one in this position
+
78 //means that the master receives data from the slave.
+
79 //
+
80 //*****************************************************************************
+
81 
+
82 #define SLAVE_ADDRESS 0x48
+
83 
+
84 uint8_t RXData;
+
85 void main (void)
+
86 {
+
87  //Stop WDT
+
88  WDT_A_hold(WDT_A_BASE);
+
89 
+
90  //Set the XT1 frequency to UCS
+
91  UCS_setExternalClockSource(32768, 0);
+
92 
+
93  //Configure Pins for I2C (UCB0SCL, UCB0SDA)
+
94  //Set P2.5 and P2.6 as Module Function Input
+
95  GPIO_setAsPeripheralModuleFunctionInputPin(
+
96  GPIO_PORT_P2,
+
97  GPIO_PIN5 + GPIO_PIN6
+
98  );
+
99 
+
100  EUSCI_B_I2C_initMasterParam param = {0};
+
101  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
102  param.i2cClk = UCS_getSMCLK();
+
103  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
104  param.byteCounterThreshold = 1;
+
105  param.autoSTOPGeneration = EUSCI_B_I2C_SEND_STOP_AUTOMATICALLY_ON_BYTECOUNT_THRESHOLD;
+
106  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
107 
+
108  //Specify slave address
+
109  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
111  );
+
112 
+
113  //Set Master in receive mode
+
114  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
115  EUSCI_B_I2C_RECEIVE_MODE
+
116  );
+
117 
+
118  //Enable I2C Module to start operations
+
119  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
120 
+
121  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
122  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
123  EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT
+
124  );
+
125 
+
126 
+
127  while (1)
+
128  {
+
129  __delay_cycles(2000);
+
130 
+
131  // I2C start condition
+
132  RXData = EUSCI_B_I2C_masterReceiveSingleByte(EUSCI_B0_BASE);
+
133 
+
134  }
+
135 }
+ +
void main(void)
+
#define SLAVE_ADDRESS
+
MPU_initThreeSegmentsParam param
+ +
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html new file mode 100644 index 0000000..99f6dcd --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html @@ -0,0 +1,223 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex2_slaveTxSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex2_slaveTxSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t TXData = 0x00
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

Description: This demo connects two MSP430's via the I2C bus. The master reads from the slave. This is the SLAVE code. The TX data begins at 0 and is incremented each time it is sent. A stop condition is used as a trigger to increment the outgoing data. The USCI_B0 TX interrupt is used to know when to TX. Tested on MSP430F67791A

  /|\  /|\
+   10k  10k
+

slave | | master --------------— | | --------------— -|XIN P2.6/UCB0SDA|<-|-—+->|P2.6/UCB0SDA XIN|- | | | | | -|XOUT | | | XOUT|- | P2.5/UCB0SCL|<-+---—>|P2.5/UCB0SCL | | | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 78 of file eusci_b_i2c_ex2_slaveTxSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 82 of file eusci_b_i2c_ex2_slaveTxSingle.c.

+ +

References __no_operation(), param, and SLAVE_ADDRESS.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 128 of file eusci_b_i2c_ex2_slaveTxSingle.c.

+ +

References TXData.

+ +
+
+

Variable Documentation

+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0x00
+
+ +

Definition at line 80 of file eusci_b_i2c_ex2_slaveTxSingle.c.

+ +

Referenced by USCIB0_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.js new file mode 100644 index 0000000..55f000a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "TXData", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c_source.html new file mode 100644 index 0000000..3b6de68 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c_source.html @@ -0,0 +1,253 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex2_slaveTxSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex2_slaveTxSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
66 //*****************************************************************************
+
67 //*****************************************************************************
+
68 //
+
69 //Set the address for slave module. This is a 7-bit address sent in the
+
70 //following format:
+
71 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
72 //
+
73 //A zero in the "RS" position of the first byte means that the master
+
74 //transmits (sends) data to the selected slave, and a one in this position
+
75 //means that the master receives data from the slave.
+
76 //
+
77 //*****************************************************************************
+
78 #define SLAVE_ADDRESS 0x48
+
79 
+
80 uint8_t TXData = 0x00;
+
81 
+
82 void main(void)
+
83 {
+
84  WDT_A_hold(WDT_A_BASE);
+
85 
+
86  //Configure Pins for I2C (UCB0SCL, UCB0SDA)
+
87  //Set P2.5 and P2.6 as Module Function Input
+
88  GPIO_setAsPeripheralModuleFunctionInputPin(
+
89  GPIO_PORT_P2,
+
90  GPIO_PIN5 + GPIO_PIN6
+
91  );
+
92 
+
93  // eUSCI configuration
+
94  EUSCI_B_I2C_initSlaveParam param = {0};
+
95  param.slaveAddress = SLAVE_ADDRESS;
+
96  param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
97  param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
98  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &param);
+
99 
+
100  //Enable I2C Module to start operations
+
101  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
102 
+
103  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
104  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
105  EUSCI_B_I2C_STOP_INTERRUPT
+
106  );
+
107 
+
108  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
109  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
110  EUSCI_B_I2C_STOP_INTERRUPT
+
111  );
+
112 
+
113  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
114  __no_operation();
+
115 }
+
116 
+
117 //******************************************************************************
+
118 //
+
119 //This is the USCI_B0 interrupt vector service routine.
+
120 //
+
121 //******************************************************************************
+
122 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
123 #pragma vector=USCI_B0_VECTOR
+
124 __interrupt
+
125 #elif defined(__GNUC__)
+
126 __attribute__((interrupt(USCI_B0_VECTOR)))
+
127 #endif
+
128 void USCIB0_ISR(void)
+
129 {
+
130  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
131  {
+
132  case USCI_NONE: // No interrupts break;
+
133  break;
+
134  case USCI_I2C_UCALIFG: // Arbitration lost
+
135  break;
+
136  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
137  break;
+
138  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
139  break;
+
140  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
141  TXData++;
+
142  break;
+
143  case USCI_I2C_UCRXIFG3: // RXIFG3
+
144  break;
+
145  case USCI_I2C_UCTXIFG3: // TXIFG3
+
146  break;
+
147  case USCI_I2C_UCRXIFG2: // RXIFG2
+
148  break;
+
149  case USCI_I2C_UCTXIFG2: // TXIFG2
+
150  break;
+
151  case USCI_I2C_UCRXIFG1: // RXIFG1
+
152  break;
+
153  case USCI_I2C_UCTXIFG1: // TXIFG1
+
154  break;
+
155  case USCI_I2C_UCRXIFG0: // RXIFG0
+
156  break;
+
157  case USCI_I2C_UCTXIFG0: // TXIFG0
+
158  EUSCI_B_I2C_slavePutData(EUSCI_B0_BASE,
+
159  TXData
+
160  );
+
161  break;
+
162  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
163  break;
+
164  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
165  break;
+
166  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
167  break;
+
168  default:
+
169  break;
+
170  }
+
171 }
+
172 
+
void USCIB0_ISR(void)
+
void main(void)
+
#define SLAVE_ADDRESS
+ +
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html new file mode 100644 index 0000000..195d306 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html @@ -0,0 +1,251 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex3_masterTxMultiple.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex3_masterTxMultiple.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + + + +

+Variables

uint8_t TXData = 0
 
uint8_t TXByteCtr
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

This example shows how to configure the I2C module as a master for multi byte transmission in interrupt driven mode. The address of the slave module is set in this example.

+

MSP430F5xx_6xx Demo - USCI_B0 I2C Master TX multiple bytes to MSP430 Slave

+

Description: This demo connects two MSP430's via the I2C bus. The master transmits to the slave. This is the MASTER CODE. It cntinuously transmits an array of data and demonstrates how to implement an I2C master transmitter sending multiple bytes using the USCI_B0 TX interrupt. ACLK = n/a, MCLK = SMCLK = BRCLK = default DCO = ~1.045MHz

                          /|\  /|\
+          MSP430F67791A    10k  10k      MSP430F67791A
+             slave         |    |         master
+       -----------------   |    |   -----------------
+     -|XIN  P2.6/UCB0SDA|<-|----+->|P2.6/UCB0SDA  XIN|-
+      |                 |  |       |                 |
+     -|XOUT             |  |       |             XOUT|-
+      |     P2.5/UCB0SCL|<-+------>|P2.5/UCB0SCL     |
+      |                 |          |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 82 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 87 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +

References __delay_cycles(), param, SLAVE_ADDRESS, TXByteCtr, and TXData.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 162 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +

References __bic_SR_register_on_exit(), TXByteCtr, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ TXByteCtr

+ +
+
+ + + + +
uint8_t TXByteCtr
+
+ +

Definition at line 85 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +

Referenced by main(), and USCIB0_ISR().

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 84 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +

Referenced by main(), and USCIB0_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.js new file mode 100644 index 0000000..0921983 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.js @@ -0,0 +1,8 @@ +var _m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "TXByteCtr", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#a442fc7a9731fc8e66469e62429b32219", null ], + [ "TXData", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c_source.html new file mode 100644 index 0000000..d29d99a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c_source.html @@ -0,0 +1,274 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex3_masterTxMultiple.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex3_masterTxMultiple.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
68 //
+
69 
+
70 //******************************************************************************
+
71 //*****************************************************************************
+
72 //
+
73 //Set the address for slave module. This is a 7-bit address sent in the
+
74 //following format:
+
75 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
76 //
+
77 //A zero in the "RS" position of the first byte means that the master
+
78 //transmits (sends) data to the selected slave, and a one in this position
+
79 //means that the master receives data from the slave.
+
80 //
+
81 //*****************************************************************************
+
82 #define SLAVE_ADDRESS 0x48
+
83 
+
84 uint8_t TXData = 0; // Pointer to TX data
+
85 uint8_t TXByteCtr;
+
86 
+
87 void main(void)
+
88 {
+
89  WDT_A_hold(WDT_A_BASE);
+
90 
+
91  //Set the XT1 frequency to UCS
+
92  UCS_setExternalClockSource(32768, 0);
+
93 
+
94  //Configure Pins for I2C (UCB0SCL, UCB0SDA)
+
95  //Set P2.5 and P2.6 as Module Function Input
+
96  GPIO_setAsPeripheralModuleFunctionInputPin(
+
97  GPIO_PORT_P2,
+
98  GPIO_PIN5 + GPIO_PIN6
+
99  );
+
100 
+
101  EUSCI_B_I2C_initMasterParam param = {0};
+
102  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
103  param.i2cClk = UCS_getSMCLK();
+
104  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
105  param.byteCounterThreshold = 0;
+
106  param.autoSTOPGeneration = EUSCI_B_I2C_NO_AUTO_STOP;
+
107  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
108 
+
109  //Specify slave address
+
110  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
112  );
+
113 
+
114  //Set Master in receive mode
+
115  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
116  EUSCI_B_I2C_TRANSMIT_MODE
+
117  );
+
118 
+
119  //Enable I2C Module to start operations
+
120  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
121 
+
122  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
123  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
124  EUSCI_B_I2C_NAK_INTERRUPT
+
125  );
+
126 
+
127  //Enable master Receive interrupt
+
128  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
129  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
130  EUSCI_B_I2C_NAK_INTERRUPT
+
131  );
+
132  while(1)
+
133  {
+
134  __delay_cycles(1000); // Delay between transmissions
+
135  TXByteCtr = 4; // Load TX byte counter
+
136  TXData = 0;
+
137 
+
138  while (EUSCI_B_I2C_SENDING_STOP == EUSCI_B_I2C_masterIsStopSent
+
139  (EUSCI_B0_BASE));
+
140 
+
141  EUSCI_B_I2C_masterSendMultiByteStart(EUSCI_B0_BASE,
+
142  TXData++);
+
143 
+
144  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
145  // Remain in LPM0 until all data
+
146  // is TX'd
+
147  // Increment data byte
+
148  }
+
149 }
+
150 
+
151 //------------------------------------------------------------------------------
+
152 // The USCIAB0TX_ISR is structured such that it can be used to transmit any
+
153 // number of bytes by pre-loading TXByteCtr with the byte count. Also, TXData
+
154 // points to the next byte to transmit.
+
155 //------------------------------------------------------------------------------
+
156 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
157 #pragma vector=USCI_B0_VECTOR
+
158 __interrupt
+
159 #elif defined(__GNUC__)
+
160 __attribute__((interrupt(USCI_B0_VECTOR)))
+
161 #endif
+
162 void USCIB0_ISR(void)
+
163 {
+
164  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
165  {
+
166  case USCI_NONE: // No interrupts break;
+
167  break;
+
168  case USCI_I2C_UCALIFG: // Arbitration lost
+
169  break;
+
170  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
171  //resend start if NACK
+
172  EUSCI_B_I2C_masterSendStart(EUSCI_B0_BASE);
+
173  break;
+
174  case USCI_I2C_UCTXIFG0: // TXIFG0
+
175  // Check TX byte counter
+
176  if (TXByteCtr)
+
177  {
+
178  EUSCI_B_I2C_masterSendMultiByteNext(EUSCI_B0_BASE, TXData++);
+
179  // Decrement TX byte counter
+
180  TXByteCtr--;
+
181  }
+
182  else
+
183  {
+
184  EUSCI_B_I2C_masterSendMultiByteStop(EUSCI_B0_BASE);
+
185  // Exit LPM0
+ +
187  }
+
188  break;
+
189  default:
+
190  break;
+
191  }
+
192 }
+
193 
+ +
void USCIB0_ISR(void)
+ + + +
MPU_initThreeSegmentsParam param
+ +
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html new file mode 100644 index 0000000..7af2aae --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html @@ -0,0 +1,211 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex3_slaveRxMultiple.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex3_slaveRxMultiple.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t RXData
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+ +

Definition at line 67 of file eusci_b_i2c_ex3_slaveRxMultiple.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 71 of file eusci_b_i2c_ex3_slaveRxMultiple.c.

+ +

References __no_operation(), param, and SLAVE_ADDRESS.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 118 of file eusci_b_i2c_ex3_slaveRxMultiple.c.

+ +

References RXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData
+
+ +

Definition at line 69 of file eusci_b_i2c_ex3_slaveRxMultiple.c.

+ +

Referenced by USCIB0_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.js new file mode 100644 index 0000000..36a0c05 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "RXData", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html#a597ef8ed788642728c57f66b3a21544f", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c_source.html new file mode 100644 index 0000000..a934af6 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c_source.html @@ -0,0 +1,271 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex3_slaveRxMultiple.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex3_slaveRxMultiple.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
35 // EUSCI_B0 I2C Slave RX single bytes from MSP430 Master
+
36 //
+
37 // Description: This demo connects two MSP430's via the I2C bus. The master
+
38 // transmits to the slave. This is the slave code. The interrupt driven
+
39 // data receiption is demonstrated using the USCI_B0 RX interrupt.
+
40 //
+
41 // Tested on MSP430F67791A
+
42 //
+
43 // /|\ /|\
+
44 // 10k 10k
+
45 // slave | | master
+
46 // ----------------- | | -----------------
+
47 // -|XIN P2.6/UCB0SDA|<-|----+->|P2.6/UCB0SDA XIN|-
+
48 // | | | | |
+
49 // -|XOUT | | | XOUT|-
+
50 // | P2.5/UCB0SCL|<-+------>|P2.5/UCB0SCL |
+
51 // | | | |
+
52 // | | | |
+
53 //
+
54 
+
55 //******************************************************************************
+
56 //*****************************************************************************
+
57 //
+
58 //Set the address for slave module. This is a 7-bit address sent in the
+
59 //following format:
+
60 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
61 //
+
62 //A zero in the "RS" position of the first byte means that the master
+
63 //transmits (sends) data to the selected slave, and a one in this position
+
64 //means that the master receives data from the slave.
+
65 //
+
66 //*****************************************************************************
+
67 #define SLAVE_ADDRESS 0x48
+
68 
+
69 uint8_t RXData;
+
70 
+
71 void main(void)
+
72 {
+
73  WDT_A_hold(WDT_A_BASE);
+
74 
+
75  //Configure Pins for I2C (UCB0SCL, UCB0SDA)
+
76  //Set P2.5 and P2.6 as Module Function Input
+
77  GPIO_setAsPeripheralModuleFunctionInputPin(
+
78  GPIO_PORT_P2,
+
79  GPIO_PIN5 + GPIO_PIN6
+
80  );
+
81 
+
82  // eUSCI configuration
+
83  EUSCI_B_I2C_initSlaveParam param = {0};
+
84  param.slaveAddress = SLAVE_ADDRESS;
+
85  param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
86  param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
87  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &param);
+
88 
+
89  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
90 
+
91  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
92  EUSCI_B_I2C_RECEIVE_INTERRUPT0
+
93  );
+
94 
+
95  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
96  EUSCI_B_I2C_RECEIVE_INTERRUPT0
+
97  );
+
98 
+
99  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
100  __no_operation();
+
101 }
+
102 
+
103 //------------------------------------------------------------------------------
+
104 // The USCI_B0 data ISR RX vector is used to move received data from the I2C
+
105 // master to the MSP430 memory.
+
106 //------------------------------------------------------------------------------
+
107 //------------------------------------------------------------------------------
+
108 // The USCI_B0 state ISR TX vector is used to wake up the CPU from LPM0 in order
+
109 // to process the received data in the main program. LPM0 is only exit in case
+
110 // of a (re-)start or stop condition when actual data was received.
+
111 //------------------------------------------------------------------------------
+
112 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
113 #pragma vector=USCI_B0_VECTOR
+
114 __interrupt
+
115 #elif defined(__GNUC__)
+
116 __attribute__((interrupt(USCI_B0_VECTOR)))
+
117 #endif
+
118 void USCIB0_ISR(void)
+
119 {
+
120  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
121  {
+
122  case USCI_NONE: // No interrupts break;
+
123  break;
+
124  case USCI_I2C_UCALIFG: // Arbitration lost
+
125  break;
+
126  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
127  break;
+
128  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
129  break;
+
130  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
131  break;
+
132  case USCI_I2C_UCRXIFG3: // RXIFG3
+
133  break;
+
134  case USCI_I2C_UCTXIFG3: // TXIFG3
+
135  break;
+
136  case USCI_I2C_UCRXIFG2: // RXIFG2
+
137  break;
+
138  case USCI_I2C_UCTXIFG2: // TXIFG2
+
139  break;
+
140  case USCI_I2C_UCRXIFG1: // RXIFG1
+
141  break;
+
142  case USCI_I2C_UCTXIFG1: // TXIFG1
+
143  break;
+
144  case USCI_I2C_UCRXIFG0: // RXIFG0
+
145  RXData = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
146  break;
+
147  case USCI_I2C_UCTXIFG0: // TXIFG0
+
148  break;
+
149  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
150  break;
+
151  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
152  break;
+
153  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
154  break;
+
155  default:
+
156  break;
+
157  }
+
158 }
+
159 
+ +
void USCIB0_ISR(void)
+
void main(void)
+
#define SLAVE_ADDRESS
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html new file mode 100644 index 0000000..7f805b1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html @@ -0,0 +1,207 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex4_masterTxSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex4_masterTxSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + +

+Functions

void main (void)
 
+ + + +

+Variables

uint8_t transmitData
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

This example shows how to configure the I2C module as a master for single byte transmission in interrupt mode. The address of the slave module that the master is communicating with also set in this example.

+

MSP430F5xx_6xx Demo - USCI_B0 I2C Master TX single bytes to MSP430 Slave

+

Description: This demo connects two MSP430's via the I2C bus. The master transmits to the slave. This is the master code. It continuously transmits 00h, 01h, ..., 0ffh and demonstrates how to implement an I2C master transmitter sending a single byte using the USCI_B0 TX interrupt. ACLK = n/a, MCLK = SMCLK = BRCLK = default DCO = ~1.045MHz

                          /|\  /|\
+         MSP430F67791A    10k  10k     MSP430F67791A
+             slave         |    |         master
+       -----------------   |    |   -----------------
+     -|XIN  P2.6/UCB0SDA|<-|----+->|P2.6/UCB0SDA  XIN|-
+      |                 |  |       |                 |
+     -|XOUT             |  |       |             XOUT|-
+      |     P2.5/UCB0SCL|<-+------>|P2.5/UCB0SCL     |
+      |                 |          |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 82 of file eusci_b_i2c_ex4_masterTxSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 86 of file eusci_b_i2c_ex4_masterTxSingle.c.

+ +

References __delay_cycles(), param, SLAVE_ADDRESS, and transmitData.

+ +
+
+

Variable Documentation

+ +

◆ transmitData

+ +
+
+ + + + +
uint8_t transmitData
+
+ +

Definition at line 84 of file eusci_b_i2c_ex4_masterTxSingle.c.

+ +

Referenced by main().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.js new file mode 100644 index 0000000..8388934 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "transmitData", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html#ac23b8f721ac5b7a4315ba2c3409b9e0a", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c_source.html new file mode 100644 index 0000000..06bfc6f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c_source.html @@ -0,0 +1,220 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex4_masterTxSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex4_masterTxSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
69 //
+
70 //*****************************************************************************
+
71 //*****************************************************************************
+
72 //
+
73 //Set the address for slave module. This is a 7-bit address sent in the
+
74 //following format:
+
75 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
76 //
+
77 //A zero in the "RS" position of the first byte means that the master
+
78 //transmits (sends) data to the selected slave, and a one in this position
+
79 //means that the master receives data from the slave.
+
80 //
+
81 //*****************************************************************************
+
82 #define SLAVE_ADDRESS 0x48
+
83 
+
84 uint8_t transmitData;
+
85 
+
86 void main (void)
+
87 {
+
88  WDT_A_hold(WDT_A_BASE);
+
89 
+
90  //Set the XT1 frequency to UCS
+
91  UCS_setExternalClockSource(32768, 0);
+
92 
+
93  //Configure Pins for I2C (UCB0SCL, UCB0SDA)
+
94  //Set P2.5 and P2.6 as Module Function Input
+
95  GPIO_setAsPeripheralModuleFunctionInputPin(
+
96  GPIO_PORT_P2,
+
97  GPIO_PIN5 + GPIO_PIN6
+
98  );
+
99 
+
100  //Initialize transmit data packet
+
101  transmitData = 0x01;
+
102 
+
103  //Initialize Master
+
104  EUSCI_B_I2C_initMasterParam param = {0};
+
105  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
106  param.i2cClk = UCS_getSMCLK();
+
107  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
108  param.byteCounterThreshold = 1;
+
109  param.autoSTOPGeneration = EUSCI_B_I2C_NO_AUTO_STOP;
+
110  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
111 
+
112  //Specify slave address
+
113  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
115  );
+
116 
+
117  //Set in transmit mode
+
118  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
119  EUSCI_B_I2C_TRANSMIT_MODE
+
120  );
+
121 
+
122  //Enable I2C Module to start operations
+
123  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
124 
+
125  while (1)
+
126  {
+
127  //Send single byte data.
+
128  EUSCI_B_I2C_masterSendSingleByte(EUSCI_B0_BASE,
+ +
130  );
+
131 
+
132  //Delay until transmission completes
+
133  while (EUSCI_B_I2C_isBusBusy(EUSCI_B0_BASE)) ;
+
134 
+
135  //Delay between each transaction
+
136  __delay_cycles(50);
+
137 
+
138  //Increment transmit data counter
+
139  transmitData++;
+
140  }
+
141 }
+
142 
+
143 
+
void main(void)
+
uint8_t transmitData
+
#define SLAVE_ADDRESS
+
MPU_initThreeSegmentsParam param
+ +
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html new file mode 100644 index 0000000..88b163d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html @@ -0,0 +1,232 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex4_slaveRxSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex4_slaveRxSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t RXData
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

This example shows how to configure the I2C module as a slave for single byte reception in interrupt driven mode. The address of the slave module is set in this example. EUSCI_B0 I2C Slave RX single bytes from MSP430 Master

+

Description: This demo connects two MSP430's via the I2C bus. The master transmits to the slave. This is the slave code. The interrupt driven data receiption is demonstrated using the USCI_B0 RX interrupt.

+

Tested on MSP430F67791A

                          /|\  /|\
+                          10k  10k
+             slave         |    |         master
+       -----------------   |    |   -----------------
+     -|XIN  P2.6/UCB0SDA|<-|----+->|P2.6/UCB0SDA  XIN|-
+      |                 |  |       |                 |
+     -|XOUT             |  |       |             XOUT|-
+      |     P2.5/UCB0SCL|<-+------>|P2.5/UCB0SCL     |
+      |                 |          |                 |
+      |                 |          |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 83 of file eusci_b_i2c_ex4_slaveRxSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 87 of file eusci_b_i2c_ex4_slaveRxSingle.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 125 of file eusci_b_i2c_ex4_slaveRxSingle.c.

+ +

References RXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData
+
+ +

Definition at line 85 of file eusci_b_i2c_ex4_slaveRxSingle.c.

+ +

Referenced by USCIB0_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.js new file mode 100644 index 0000000..57c6f7e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "RXData", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html#a597ef8ed788642728c57f66b3a21544f", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c_source.html new file mode 100644 index 0000000..1910cfa --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c_source.html @@ -0,0 +1,241 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex4_slaveRxSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex4_slaveRxSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
70 //
+
71 //*****************************************************************************
+
72 //*****************************************************************************
+
73 //
+
74 //Set the address for slave module. This is a 7-bit address sent in the
+
75 //following format:
+
76 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
77 //
+
78 //A zero in the "RS" position of the first byte means that the master
+
79 //transmits (sends) data to the selected slave, and a one in this position
+
80 //means that the master receives data from the slave.
+
81 //
+
82 //*****************************************************************************
+
83 #define SLAVE_ADDRESS 0x48
+
84 
+
85 uint8_t RXData;
+
86 
+
87 void main(void)
+
88 {
+
89  WDT_A_hold(WDT_A_BASE);
+
90 
+
91  //Configure Pins for I2C (UCB0SCL, UCB0SDA)
+
92  //Set P2.5 and P2.6 as Module Function Input
+
93  GPIO_setAsPeripheralModuleFunctionInputPin(
+
94  GPIO_PORT_P2,
+
95  GPIO_PIN5 + GPIO_PIN6
+
96  );
+
97 
+
98  // eUSCI configuration
+
99  EUSCI_B_I2C_initSlaveParam param = {0};
+
100  param.slaveAddress = 0x48;
+
101  param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
102  param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
103  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &param);
+
104 
+
105  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
106 
+
107  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
108  EUSCI_B_I2C_RECEIVE_INTERRUPT0
+
109  );
+
110 
+
111  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
112  EUSCI_B_I2C_RECEIVE_INTERRUPT0
+
113  );
+
114 
+
115  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
116  __no_operation();
+
117 }
+
118 
+
119 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
120 #pragma vector=USCI_B0_VECTOR
+
121 __interrupt
+
122 #elif defined(__GNUC__)
+
123 __attribute__((interrupt(USCI_B0_VECTOR)))
+
124 #endif
+
125 void USCIB0_ISR(void)
+
126 {
+
127  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
128  {
+
129  case USCI_NONE: // No interrupts break;
+
130  break;
+
131  case USCI_I2C_UCALIFG: // Arbitration lost
+
132  break;
+
133  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
134  break;
+
135  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
136  break;
+
137  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
138  break;
+
139  case USCI_I2C_UCRXIFG3: // RXIFG3
+
140  break;
+
141  case USCI_I2C_UCTXIFG3: // TXIFG3
+
142  break;
+
143  case USCI_I2C_UCRXIFG2: // RXIFG2
+
144  break;
+
145  case USCI_I2C_UCTXIFG2: // TXIFG2
+
146  break;
+
147  case USCI_I2C_UCRXIFG1: // RXIFG1
+
148  break;
+
149  case USCI_I2C_UCTXIFG1: // TXIFG1
+
150  break;
+
151  case USCI_I2C_UCRXIFG0: // RXIFG0
+
152  RXData = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
153  break;
+
154  case USCI_I2C_UCTXIFG0: // TXIFG0
+
155  break;
+
156  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
157  break;
+
158  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
159  break;
+
160  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
161  break;
+
162  default:
+
163  break;
+
164  }
+
165 }
+ +
void USCIB0_ISR(void)
+
void main(void)
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html new file mode 100644 index 0000000..1529da8 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html @@ -0,0 +1,248 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex5_masterMultipleSlave.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex5_masterMultipleSlave.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + + + + + + + +

+Variables

uint8_t TXData [] = {0xA1,0xB1,0xC1,0xD1}
 
uint8_t SlaveAddress [] = {0x0A,0x0B,0x0C,0x0D}
 
uint8_t TXByteCtr
 
uint8_t SlaveFlag = 0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 63 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +

References __delay_cycles(), param, SlaveAddress, SlaveFlag, and TXByteCtr.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 140 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +

References __bic_SR_register_on_exit(), SlaveFlag, TXByteCtr, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ SlaveAddress

+ +
+
+ + + + +
uint8_t SlaveAddress[] = {0x0A,0x0B,0x0C,0x0D}
+
+ +

Definition at line 59 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +

Referenced by main().

+ +
+
+ +

◆ SlaveFlag

+ +
+
+ + + + +
uint8_t SlaveFlag = 0
+
+ +

Definition at line 61 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +

Referenced by main(), and USCIB0_ISR().

+ +
+
+ +

◆ TXByteCtr

+ +
+
+ + + + +
uint8_t TXByteCtr
+
+ +

Definition at line 60 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +

Referenced by main(), and USCIB0_ISR().

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData[] = {0xA1,0xB1,0xC1,0xD1}
+
+ +

Definition at line 58 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +

Referenced by USCIB0_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.js new file mode 100644 index 0000000..e3f3a1a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.js @@ -0,0 +1,9 @@ +var _m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "SlaveAddress", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#acab914ed25efe33c5ff39bffa442b25f", null ], + [ "SlaveFlag", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#a8400431f2b4b75fc33a2b9d755be8796", null ], + [ "TXByteCtr", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#a442fc7a9731fc8e66469e62429b32219", null ], + [ "TXData", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#adb697e8622bce2ab592d2ee2395bd672", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c_source.html new file mode 100644 index 0000000..e2c0ca1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c_source.html @@ -0,0 +1,311 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex5_masterMultipleSlave.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex5_masterMultipleSlave.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
35 // MSP430F5xx_6xx Demo - USCI_B0 I2C Master TX bytes to Multiple Slaves
+
36 //
+
37 // Description: This demo connects two MSP430's via the I2C bus.
+
38 // The master transmits to 4 different I2C slave addresses 0x0A,0x0B,0x0C&0x0D.
+
39 // Each slave address has a specific related data in the array TXData[].
+
40 // At the end of four I2C transactions the slave address rolls over and begins
+
41 // again at 0x0A.
+
42 // ACLK = n/a, MCLK = SMCLK = BRCLK = default DCO = ~1.045MHz
+
43 // Use with MSP430FR57xx_uscib0_i2c_MultiSlave.c
+
44 //
+
45 // /|\ /|\
+
46 // MSP430F67791A 10k 10k MSP430F67791A
+
47 // slave | | master
+
48 // ----------------- | | -----------------
+
49 // -|XIN P2.6/UCB0SDA|<-|----+->|P2.6/UCB0SDA XIN|-
+
50 // | | | | |
+
51 // -|XOUT | | | XOUT|-
+
52 // | P2.5/UCB0SCL|<-+------>|P2.5/UCB0SCL |
+
53 // | | | |
+
54 //
+
55 //******************************************************************************
+
56 
+
57 
+
58 uint8_t TXData[]= {0xA1,0xB1,0xC1,0xD1};// Pointer to TX data
+
59 uint8_t SlaveAddress[]= {0x0A,0x0B,0x0C,0x0D};
+
60 uint8_t TXByteCtr;
+
61 uint8_t SlaveFlag = 0;
+
62 
+
63 void main(void)
+
64 {
+
65  WDT_A_hold(WDT_A_BASE);
+
66 
+
67  //Set the XT1 frequency to UCS
+
68  UCS_setExternalClockSource(32768, 0);
+
69 
+
70  //Configure Pins for I2C (UCB0SCL, UCB0SDA)
+
71  //Set P2.5 and P2.6 as Module Function Input
+
72  GPIO_setAsPeripheralModuleFunctionInputPin(
+
73  GPIO_PORT_P2,
+
74  GPIO_PIN5 + GPIO_PIN6
+
75  );
+
76 
+
77  EUSCI_B_I2C_initMasterParam param = {0};
+
78  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
79  param.i2cClk = UCS_getSMCLK();
+
80  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
81  param.byteCounterThreshold = 0;
+
82  param.autoSTOPGeneration = EUSCI_B_I2C_NO_AUTO_STOP;
+
83  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
84 
+
85 
+
86  //Set Master in receive mode
+
87  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
88  EUSCI_B_I2C_TRANSMIT_MODE
+
89  );
+
90  //Enable I2C Module to start operations
+
91  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
92 
+
93  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
94  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
95  EUSCI_B_I2C_NAK_INTERRUPT
+
96  );
+
97 
+
98  //Enable master Receive interrupt
+
99  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
100  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
101  EUSCI_B_I2C_NAK_INTERRUPT
+
102  );
+
103 
+
104  SlaveFlag = 0;
+
105  while(1)
+
106  {
+
107  //Specify slave address
+
108  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
110  );
+
111 
+
112 
+
113  TXByteCtr = 1; // Load TX byte counter
+
114 
+
115  while (EUSCI_B_I2C_SENDING_STOP == EUSCI_B_I2C_masterIsStopSent
+
116  (EUSCI_B0_BASE));
+
117 
+
118 
+
119  EUSCI_B_I2C_masterSendStart(EUSCI_B0_BASE);
+
120 
+
121  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
122  // Remain in LPM0 until all data is TX'd
+
123 
+
124  // Change Slave address
+
125  SlaveFlag++;
+
126  if(SlaveFlag > 3) // Roll over slave address
+
127  {
+
128  SlaveFlag = 0;
+
129  __delay_cycles(1000); // Delay between transmissions
+
130  }
+
131  }
+
132 }
+
133 
+
134 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
135 #pragma vector=USCI_B0_VECTOR
+
136 __interrupt
+
137 #elif defined(__GNUC__)
+
138 __attribute__((interrupt(USCI_B0_VECTOR)))
+
139 #endif
+
140 void USCIB0_ISR(void)
+
141 {
+
142  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
143  {
+
144  case USCI_NONE: // No interrupts break;
+
145  break;
+
146  case USCI_I2C_UCALIFG: // Arbitration lost
+
147  break;
+
148  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
149  // Resend START if NAK'd
+
150  EUSCI_B_I2C_masterSendStart(EUSCI_B0_BASE);
+
151  break;
+
152  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
153  break;
+
154  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
155  break;
+
156  case USCI_I2C_UCRXIFG3: // RXIFG3
+
157  break;
+
158  case USCI_I2C_UCTXIFG3: // TXIFG3
+
159  break;
+
160  case USCI_I2C_UCRXIFG2: // RXIFG2
+
161  break;
+
162  case USCI_I2C_UCTXIFG2: // TXIFG2
+
163  break;
+
164  case USCI_I2C_UCRXIFG1: // RXIFG1
+
165  break;
+
166  case USCI_I2C_UCTXIFG1: // TXIFG1
+
167  break;
+
168  case USCI_I2C_UCRXIFG0: // RXIFG0
+
169  break;
+
170  case USCI_I2C_UCTXIFG0: // TXIFG0
+
171  // Check TX byte counter
+
172  if (TXByteCtr)
+
173  {
+
174  EUSCI_B_I2C_masterSendMultiByteNext(EUSCI_B0_BASE,
+
175  TXData[SlaveFlag]);
+
176  // Decrement TX byte counter
+
177  TXByteCtr--;
+
178  }
+
179  else
+
180  {
+
181  EUSCI_B_I2C_masterSendMultiByteStop(EUSCI_B0_BASE);
+
182  // Exit LPM0
+ +
184  }
+
185  break;
+
186  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
187  break;
+
188  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
189  break;
+
190  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
191  break;
+
192  default:
+
193  break;
+
194  }
+
195 }
+
196 
+ + + + + + +
MPU_initThreeSegmentsParam param
+ +
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html new file mode 100644 index 0000000..e54899a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html @@ -0,0 +1,248 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex5_slaveMultipleSlave.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex5_slaveMultipleSlave.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + + + + + + + +

+Variables

uint8_t RXData0 = 0
 
uint8_t RXData1 = 0
 
uint8_t RXData2 = 0
 
uint8_t RXData3 = 0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 59 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +

References __no_operation().

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 126 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +

References RXData0, RXData1, RXData2, and RXData3.

+ +
+
+

Variable Documentation

+ +

◆ RXData0

+ +
+
+ + + + +
uint8_t RXData0 = 0
+
+ +

Definition at line 54 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +

Referenced by USCIB0_ISR().

+ +
+
+ +

◆ RXData1

+ +
+
+ + + + +
uint8_t RXData1 = 0
+
+ +

Definition at line 55 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +

Referenced by USCIB0_ISR().

+ +
+
+ +

◆ RXData2

+ +
+
+ + + + +
uint8_t RXData2 = 0
+
+ +

Definition at line 56 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +

Referenced by USCIB0_ISR().

+ +
+
+ +

◆ RXData3

+ +
+
+ + + + +
uint8_t RXData3 = 0
+
+ +

Definition at line 57 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +

Referenced by USCIB0_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.js new file mode 100644 index 0000000..cafe201 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.js @@ -0,0 +1,9 @@ +var _m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "RXData0", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#ad8363a0fe210b31eb7174491f478dd02", null ], + [ "RXData1", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#afd0f3a79374491b2736c8448c3b85e3a", null ], + [ "RXData2", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#ad490477b6b68af21a68dcde8035a0f61", null ], + [ "RXData3", "_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#af6a6cccb6c28ae3621d22627201ff981", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c_source.html new file mode 100644 index 0000000..af7bbdf --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c_source.html @@ -0,0 +1,283 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex5_slaveMultipleSlave.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex5_slaveMultipleSlave.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 //******************************************************************************
+
34 // MSP430F5xx_6xx Demo - USCI_B0 I2C 4 Hardware I2C slaves
+
35 //
+
36 // Description: This demo connects two MSP430's via the I2C bus.
+
37 // This code configures the MSP430 USCI to be addressed as 4 independent I2C
+
38 // slaves. Each slave has its owm interrupt flag and data variable to store
+
39 // incoming data.
+
40 //
+
41 // Tested on MSP430F67791A
+
42 // /|\ /|\
+
43 // 10k 10k
+
44 // slave | | master
+
45 // ----------------- | | -----------------
+
46 // -|XIN P2.6/UCB0SDA|<-|----+->|P2.6/UCB0SDA XIN|-
+
47 // | | | | |
+
48 // -|XOUT | | | XOUT|-
+
49 // | P2.5/UCB0SCL|<-+------>|P2.5/UCB0SCL |
+
50 // | | | |
+
51 // | | | |
+
52 //
+
53 //******************************************************************************
+
54 uint8_t RXData0 = 0;
+
55 uint8_t RXData1 = 0;
+
56 uint8_t RXData2 = 0;
+
57 uint8_t RXData3 = 0;
+
58 
+
59 void main(void)
+
60 {
+
61  WDT_A_hold(WDT_A_BASE);
+
62 
+
63  //Configure Pins for I2C (UCB0SCL, UCB0SDA)
+
64  //Set P2.5 and P2.6 as Module Function Input
+
65  GPIO_setAsPeripheralModuleFunctionInputPin(
+
66  GPIO_PORT_P2,
+
67  GPIO_PIN5 + GPIO_PIN6
+
68  );
+
69 
+
70  // eUSCI configuration
+
71  //SLAVE0 own address is 0x0A+ enable
+
72  EUSCI_B_I2C_initSlaveParam initSlave0Param = {0};
+
73  initSlave0Param.slaveAddress = 0x0A;
+
74  initSlave0Param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
75  initSlave0Param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
76  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &initSlave0Param);
+
77 
+
78  //SLAVE1 own address is 0x0B+ enable
+
79  EUSCI_B_I2C_initSlaveParam initSlave1Param = {0};
+
80  initSlave1Param.slaveAddress = 0x0B;
+
81  initSlave1Param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET1;
+
82  initSlave1Param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
83  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &initSlave1Param);
+
84 
+
85  //SLAVE2 own address is 0x0C+ enable
+
86  EUSCI_B_I2C_initSlaveParam initSlave2Param = {0};
+
87  initSlave2Param.slaveAddress = 0x0C;
+
88  initSlave2Param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET2;
+
89  initSlave2Param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
90  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &initSlave2Param);
+
91 
+
92  //SLAVE3 own address is 0x0D+ enable
+
93  EUSCI_B_I2C_initSlaveParam initSlave3Param = {0};
+
94  initSlave3Param.slaveAddress = 0x0D;
+
95  initSlave3Param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET3;
+
96  initSlave3Param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
97  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &initSlave3Param);
+
98 
+
99  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
100 
+
101  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
102  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
103  EUSCI_B_I2C_RECEIVE_INTERRUPT1 +
+
104  EUSCI_B_I2C_RECEIVE_INTERRUPT2 +
+
105  EUSCI_B_I2C_RECEIVE_INTERRUPT3
+
106  );
+
107 
+
108  //receive interrupt enable
+
109  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
110  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
111  EUSCI_B_I2C_RECEIVE_INTERRUPT1 +
+
112  EUSCI_B_I2C_RECEIVE_INTERRUPT2 +
+
113  EUSCI_B_I2C_RECEIVE_INTERRUPT3
+
114  );
+
115 
+
116  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
117  __no_operation();
+
118 }
+
119 
+
120 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
121 #pragma vector=USCI_B0_VECTOR
+
122 __interrupt
+
123 #elif defined(__GNUC__)
+
124 __attribute__((interrupt(USCI_B0_VECTOR)))
+
125 #endif
+
126 void USCIB0_ISR(void)
+
127 {
+
128  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
129  {
+
130  case USCI_NONE: // No interrupts break;
+
131  break;
+
132  case USCI_I2C_UCALIFG: // Arbitration lost
+
133  break;
+
134  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
135  break;
+
136  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
137  break;
+
138  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
139  break;
+
140  case USCI_I2C_UCRXIFG3: // RXIFG3
+
141  RXData3 = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
142  break;
+
143  case USCI_I2C_UCTXIFG3: // TXIFG3
+
144  break;
+
145  case USCI_I2C_UCRXIFG2: // RXIFG2
+
146  RXData2 = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
147  break;
+
148  case USCI_I2C_UCTXIFG2: // TXIFG2
+
149  break;
+
150  case USCI_I2C_UCRXIFG1: // RXIFG1
+
151  RXData1 = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
152  break;
+
153  case USCI_I2C_UCTXIFG1: // TXIFG1
+
154  break;
+
155  case USCI_I2C_UCRXIFG0: // RXIFG0
+
156  RXData0 = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
157  break;
+
158  case USCI_I2C_UCTXIFG0: // TXIFG0
+
159  break;
+
160  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
161  break;
+
162  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
163  break;
+
164  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
165  break;
+
166  default:
+
167  break;
+
168  }
+
169 }
+
170 
+ + + + + + + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html new file mode 100644 index 0000000..e8fd58e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html @@ -0,0 +1,222 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_spi/eusci_b_spi_ex1_master.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_spi_ex1_master.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCI_B0_ISR (void)
 
+ + + + + +

+Variables

uint8_t RXData = 0
 
uint8_t TXData = 0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 82 of file eusci_b_spi_ex1_master.c.

+ +

References __delay_cycles(), __no_operation(), i, param, and TXData.

+ +
+
+ +

◆ USCI_B0_ISR()

+ +
+
+ + + + + + + + +
void USCI_B0_ISR (void )
+
+ +

Definition at line 141 of file eusci_b_spi_ex1_master.c.

+ +

References __delay_cycles(), RXData, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData = 0
+
+

USCI_A0, SPI 3-Wire Master Incremented Data This example shows how SPI master talks to SPI slave using 3-wire mode. Incrementing data is sent by the master starting at 0x01. Received data is expected to be same as the previous transmission. eUSCI RX ISR is used to handle communication with the CPU, normally in LPM0. If high, P1.0 indicates valid data reception. Because all execution after LPM0 is in ISRs, initialization waits for DCO to stabilize against ACLK. ACLK = ~32.768kHz, MCLK = SMCLK = DCO ~ 1048kHz. BRCLK = SMCLK/2

+

Use with eusci_spi_ex1_slave code example. If slave is in debug mode, P1.1 slave reset signal conflicts with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.


+

/|\ | | | | | Master—+->|RST | | | | P2.6|-> Data Out (UCB0SIMO) | | | P2.5|<- Data In (UCB0SOMI) | | | P2.7|-> Serial Clock Out (UCB0CLK)

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • SPI peripheral
  • +
  • GPIO Port peripheral (for SPI pins)
  • +
  • UCS peripheral
  • +
  • UCB0SIMO
  • +
  • UCB0SOMI
  • +
  • UCB0CLK
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_A0_VECTOR
  • +
+ +

Definition at line 79 of file eusci_b_spi_ex1_master.c.

+ +

Referenced by USCI_B0_ISR().

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 80 of file eusci_b_spi_ex1_master.c.

+ +

Referenced by main(), and USCI_B0_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.js new file mode 100644 index 0000000..356561d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCI_B0_ISR", "_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html#abb8ec2e0335e1b8389161437129cc39a", null ], + [ "RXData", "_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html#a597ef8ed788642728c57f66b3a21544f", null ], + [ "TXData", "_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c_source.html new file mode 100644 index 0000000..5780280 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c_source.html @@ -0,0 +1,240 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_spi/eusci_b_spi_ex1_master.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_spi_ex1_master.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
50 // MSP430F67791A
+
77 //*****************************************************************************
+
78 
+
79 uint8_t RXData = 0;
+
80 uint8_t TXData = 0;
+
81 
+
82 void main(void)
+
83 {
+
84  volatile uint16_t i;
+
85 
+
86  //Stop watchdog timer
+
87  WDT_A_hold(WDT_A_BASE);
+
88 
+
89  //Configure Pins for UCB0CLK, UCB0SIMO, UCB0SOMI
+
90  //Set P2.5, P2.6, P2.7 as Module Function Input.
+
91  GPIO_setAsPeripheralModuleFunctionInputPin(
+
92  GPIO_PORT_P2,
+
93  GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7
+
94  );
+
95 
+
96  //Set the XT1 frequency to UCS
+
97  UCS_setExternalClockSource(32768, 0);
+
98 
+
99  //Initialize Master
+
100  EUSCI_B_SPI_initMasterParam param = {0};
+
101  param.selectClockSource = EUSCI_B_SPI_CLOCKSOURCE_SMCLK;
+
102  param.clockSourceFrequency = UCS_getSMCLK();
+
103  param.desiredSpiClock = 500000;
+
104  param.msbFirst = EUSCI_B_SPI_MSB_FIRST;
+
105  param.clockPhase = EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
+
106  param.clockPolarity = EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_HIGH;
+
107  param.spiMode = EUSCI_B_SPI_3PIN;
+
108  EUSCI_B_SPI_initMaster(EUSCI_B0_BASE, &param);
+
109 
+
110  //Enable SPI module
+
111  EUSCI_B_SPI_enable(EUSCI_B0_BASE);
+
112 
+
113  EUSCI_B_SPI_clearInterrupt(EUSCI_B0_BASE,
+
114  EUSCI_B_SPI_RECEIVE_INTERRUPT);
+
115  // Enable USCI_B0 RX interrupt
+
116  EUSCI_B_SPI_enableInterrupt(EUSCI_B0_BASE,
+
117  EUSCI_B_SPI_RECEIVE_INTERRUPT);
+
118 
+
119  //Wait for slave to initialize
+
120  __delay_cycles(100);
+
121 
+
122  TXData = 0x1; // Holds TX data
+
123 
+
124  //USCI_B0 TX buffer ready?
+
125  while (!EUSCI_B_SPI_getInterruptStatus(EUSCI_B0_BASE,
+
126  EUSCI_B_SPI_TRANSMIT_INTERRUPT)) ;
+
127 
+
128  //Transmit Data to slave
+
129  EUSCI_B_SPI_transmitData(EUSCI_B0_BASE, TXData);
+
130 
+
131  __bis_SR_register(LPM0_bits + GIE); // CPU off, enable interrupts
+
132  __no_operation(); // Remain in LPM0
+
133 }
+
134 
+
135 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
136 #pragma vector=USCI_B0_VECTOR
+
137 __interrupt
+
138 #elif defined(__GNUC__)
+
139 __attribute__((interrupt(USCI_B0_VECTOR)))
+
140 #endif
+
141 void USCI_B0_ISR (void)
+
142 {
+
143  switch (__even_in_range(UCB0IV, USCI_SPI_UCTXIFG))
+
144  {
+
145  case USCI_SPI_UCRXIFG: // UCRXIFG
+
146  //USCI_B0 TX buffer ready?
+
147  while (!EUSCI_B_SPI_getInterruptStatus(EUSCI_B0_BASE,
+
148  EUSCI_B_SPI_TRANSMIT_INTERRUPT));
+
149 
+
150  RXData = EUSCI_B_SPI_receiveData(EUSCI_B0_BASE);
+
151 
+
152  //Increment data
+
153  TXData++;
+
154 
+
155  //Send next value
+
156  EUSCI_B_SPI_transmitData(EUSCI_B0_BASE,
+
157  TXData
+
158  );
+
159 
+
160  //Delay between transmissions for slave to process information
+
161  __delay_cycles(40);
+
162  break;
+
163  default:
+
164  break;
+
165  }
+
166 }
+
167 
+
uint8_t RXData
+
void main(void)
+
void USCI_B0_ISR(void)
+
uint8_t TXData
+
MPU_initThreeSegmentsParam param
+ + +
__no_operation()
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html new file mode 100644 index 0000000..f27df88 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html @@ -0,0 +1,223 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_spi/eusci_b_spi_ex1_slave.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_spi_ex1_slave.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCI_B0_ISR (void)
 
+ + + + + +

+Variables

uint8_t transmitData = 0x01
 
uint8_t receiveData = 0x00
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 76 of file eusci_b_spi_ex1_slave.c.

+ +

References param.

+ +
+
+ +

◆ USCI_B0_ISR()

+ +
+
+ + + + + + + + +
void USCI_B0_ISR (void )
+
+ +

Definition at line 120 of file eusci_b_spi_ex1_slave.c.

+ +

References receiveData, and transmitData.

+ +
+
+

Variable Documentation

+ +

◆ receiveData

+ +
+
+ + + + +
uint8_t receiveData = 0x00
+
+ +

Definition at line 74 of file eusci_b_spi_ex1_slave.c.

+ +

Referenced by USCI_B0_ISR().

+ +
+
+ +

◆ transmitData

+ +
+
+ + + + +
uint8_t transmitData = 0x01
+
+

SPI slave talks to SPI master using 3-wire mode. Data is received from master and data from slave is then transmitted back to master. USCI RX ISR is used to handle communication, CPU normally in LPM4. Prior to initial data exchange, master pulses slaves RST for complete reset.

+

Use with eusci_spi_ex1_master code example. If the slave is in debug mode, the reset signal from the master will conflict with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.

+

+Tesed on MSP430F67791A

+

/|\ | | | | | Master—+->|RST | | | | P2.6|-> Data Out (UCB0SIMO) | | | P2.5|<- Data In (UCB0SOMI) | | | P2.7|-> Serial Clock Out (UCB0CLK)

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • SPI peripheral
  • +
  • GPIO Port peripheral (for SPI pins)
  • +
  • UCB0SIMO
  • +
  • UCB0SOMI
  • +
  • UCB0CLK
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_A0_VECTOR
  • +
+ +

Definition at line 74 of file eusci_b_spi_ex1_slave.c.

+ +

Referenced by USCI_B0_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.js new file mode 100644 index 0000000..8e2dc2f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCI_B0_ISR", "_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html#abb8ec2e0335e1b8389161437129cc39a", null ], + [ "receiveData", "_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html#a216001f02f93a2c0b512c1b8724bdc60", null ], + [ "transmitData", "_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html#ac23b8f721ac5b7a4315ba2c3409b9e0a", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c_source.html new file mode 100644 index 0000000..b99575c --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c_source.html @@ -0,0 +1,219 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/eusci_b_spi/eusci_b_spi_ex1_slave.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_spi_ex1_slave.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
72 //
+
73 //*****************************************************************************
+
74 uint8_t transmitData = 0x01, receiveData = 0x00;
+
75 
+
76 void main(void)
+
77 {
+
78  //Stop watchdog timer
+
79  WDT_A_hold(WDT_A_BASE);
+
80 
+
81  //Configure Pins for UCB0CLK, UCB0SIMO, UCB0SOMI
+
82  //Set P2.5, P2.6, P2.7 as Module Function Input.
+
83  GPIO_setAsPeripheralModuleFunctionInputPin(
+
84  GPIO_PORT_P2,
+
85  GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7
+
86  );
+
87 
+
88  //Initialize slave to MSB first, inactive high clock polarity and 3 wire SPI
+
89  EUSCI_B_SPI_initSlaveParam param = {0};
+
90  param.msbFirst = EUSCI_B_SPI_MSB_FIRST;
+
91  param.clockPhase = EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
+
92  param.clockPolarity = EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_HIGH;
+
93  param.spiMode = EUSCI_B_SPI_3PIN;
+
94  EUSCI_B_SPI_initSlave(EUSCI_B0_BASE, &param);
+
95 
+
96  //Enable SPI Module
+
97  EUSCI_B_SPI_enable(EUSCI_B0_BASE);
+
98 
+
99  EUSCI_B_SPI_clearInterrupt(EUSCI_B0_BASE,
+
100  EUSCI_B_SPI_RECEIVE_INTERRUPT);
+
101  //Enable Receive interrupt
+
102  EUSCI_B_SPI_enableInterrupt(EUSCI_B0_BASE,
+
103  EUSCI_B_SPI_RECEIVE_INTERRUPT
+
104  );
+
105 
+
106  __bis_SR_register(LPM0_bits + GIE); // Enter LPM0, enable interrupts
+
107 }
+
108 
+
109 //******************************************************************************
+
110 //
+
111 //This is the USCI_B0 interrupt vector service routine.
+
112 //
+
113 //******************************************************************************
+
114 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
115 #pragma vector=USCI_B0_VECTOR
+
116 __interrupt
+
117 #elif defined(__GNUC__)
+
118 __attribute__((interrupt(USCI_B0_VECTOR)))
+
119 #endif
+
120 void USCI_B0_ISR (void)
+
121 {
+
122  switch(__even_in_range(UCB0IV, USCI_SPI_UCTXIFG))
+
123  {
+
124  case USCI_SPI_UCRXIFG: // UCRXIFG
+
125  //USCI_B0 TX buffer ready?
+
126  while (!EUSCI_B_SPI_getInterruptStatus(EUSCI_B0_BASE,
+
127  EUSCI_B_SPI_TRANSMIT_INTERRUPT
+
128  ));
+
129 
+
130  //Transmit data to master
+
131  EUSCI_B_SPI_transmitData(EUSCI_B0_BASE,
+ +
133  );
+
134 
+
135  //Receive data from master
+
136  receiveData = EUSCI_B_SPI_receiveData(EUSCI_B0_BASE);
+
137 
+
138  //Increment data to be transmitted
+
139  transmitData++;
+
140  break;
+
141  default:
+
142  break;
+
143  }
+
144 }
+
145 
+
uint8_t receiveData
+
void main(void)
+
void USCI_B0_ISR(void)
+
uint8_t transmitData
+
MPU_initThreeSegmentsParam param
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.html new file mode 100644 index 0000000..7df5f7d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/gpio/gpio_ex1_outputHi.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
gpio_ex1_outputHi.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 58 of file gpio_ex1_outputHi.c.

+ +

References __no_operation(), and GPIO_setOutputHighOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.js new file mode 100644 index 0000000..291197e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2gpio_2gpio__ex1__output_hi_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex1__output_hi_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex1__output_hi_8c_source.html new file mode 100644 index 0000000..3d4971e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex1__output_hi_8c_source.html @@ -0,0 +1,197 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/gpio/gpio_ex1_outputHi.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
gpio_ex1_outputHi.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Write a Word to Port A (Port1+Port2)
+
34 //
+
35 // Writes a Word(FFFFh) to Port A and stays in LPM4
+
36 // ACLK = 32.768kHz, MCLK = SMCLK = default DCO
+
37 //
+
38 // Tested On: MSP430F5529, MSP430FR5739
+
39 // -----------------
+
40 // /|\| |
+
41 // | | |
+
42 // --|RST PA.x|-->HI
+
43 // | |
+
44 // | |
+
45 //
+
46 //
+
47 // This example uses the following peripherals and I/O signals. You must
+
48 // review these and change as needed for your own board:
+
49 // - GPIO Port peripheral
+
50 //
+
51 // This example uses the following interrupt handlers. To use this example
+
52 // in your own application you must add these interrupt handlers to your
+
53 // vector table.
+
54 // - None.
+
55 //******************************************************************************
+
56 #include "driverlib.h"
+
57 
+
58 void main (void)
+
59 {
+
60  //Stop WDT
+
61  WDT_A_hold(WDT_A_BASE);
+
62 
+
63  //PA.x output
+
64  GPIO_setAsOutputPin(
+
65  GPIO_PORT_PA,
+
66  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3 +
+
67  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7 +
+
68  GPIO_PIN8 + GPIO_PIN9 + GPIO_PIN10 + GPIO_PIN11 +
+
69  GPIO_PIN12 + GPIO_PIN13 + GPIO_PIN14 + GPIO_PIN15
+
70  );
+
71 
+
72 
+
73  //Set all PA pins HI
+ +
75 
+
76  GPIO_PORT_PA,
+
77  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3 +
+
78  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7 +
+
79  GPIO_PIN8 + GPIO_PIN9 + GPIO_PIN10 + GPIO_PIN11 +
+
80  GPIO_PIN12 + GPIO_PIN13 + GPIO_PIN14 + GPIO_PIN15
+
81  );
+
82 
+
83  //Enter LPM4 w/interrupts enabled
+
84  __bis_SR_register(LPM4_bits + GIE);
+
85 
+
86  //For debugger
+ +
88 }
+
void main(void)
+ +
__no_operation()
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.html new file mode 100644 index 0000000..2f18fd0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.html @@ -0,0 +1,161 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/gpio/gpio_ex2_inputCapture.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
gpio_ex2_inputCapture.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void Port_1 (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 62 of file gpio_ex2_inputCapture.c.

+ +

References __no_operation().

+ +
+
+ +

◆ Port_1()

+ +
+
+ + + + + + + + +
void Port_1 (void )
+
+ +

Definition at line 117 of file gpio_ex2_inputCapture.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.js new file mode 100644 index 0000000..f306900 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f5xx__6xx_2gpio_2gpio__ex2__input_capture_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Port_1", "_m_s_p430_f5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.html#a3a8f9242a81f4c686517653be5fbf412", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex2__input_capture_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex2__input_capture_8c_source.html new file mode 100644 index 0000000..b70585b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex2__input_capture_8c_source.html @@ -0,0 +1,241 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/gpio/gpio_ex2_inputCapture.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
gpio_ex2_inputCapture.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Software Port Interrupt Service on P1.4 from LPM4 with
+
34 // Internal Pull-up Resistance Enabled
+
35 //
+
36 // A hi "TO" low transition on P1.4 will trigger P1_ISR which,
+
37 // toggles P1.0. P1.4 is internally enabled to pull-up. Normal mode is
+
38 // LPM4 ~ 0.1uA. LPM4 current can be measured with the LED removed, all
+
39 // unused Px.x configured as output or inputs pulled high or low.
+
40 // ACLK = n/a, MCLK = SMCLK = default DCO
+
41 //
+
42 // Tested On: MSP430F5529, MSP430FR5739
+
43 // -----------------
+
44 // /|\| XIN|-
+
45 // | | |
+
46 // --|RST XOUT|-
+
47 // /|\ | |
+
48 // --o--|P1.4 P1.0|-->LED
+
49 // \|/
+
50 //
+
51 // This example uses the following peripherals and I/O signals. You must
+
52 // review these and change as needed for your own board:
+
53 // - GPIO Port peripheral
+
54 //
+
55 // This example uses the following interrupt handlers. To use this example
+
56 // in your own application you must add these interrupt handlers to your
+
57 // vector table.
+
58 // - PORT1_VECTOR
+
59 //******************************************************************************
+
60 #include "driverlib.h"
+
61 
+
62 void main (void)
+
63 {
+
64  //Stop watchdog timer
+
65  WDT_A_hold(WDT_A_BASE);
+
66 
+
67  //Set P1.0 to output direction
+
68  GPIO_setAsOutputPin(
+
69  GPIO_PORT_P1,
+
70  GPIO_PIN0
+
71  );
+
72 
+
73  //Enable P1.4 internal resistance as pull-Up resistance
+
74  GPIO_setAsInputPinWithPullUpResistor(
+
75  GPIO_PORT_P1,
+
76  GPIO_PIN4
+
77  );
+
78 
+
79  //P1.4 interrupt enabled
+
80  GPIO_enableInterrupt(
+
81  GPIO_PORT_P1,
+
82  GPIO_PIN4
+
83  );
+
84 
+
85  //P1.4 Hi/Lo edge
+
86  GPIO_selectInterruptEdge(
+
87  GPIO_PORT_P1,
+
88  GPIO_PIN4,
+
89  GPIO_HIGH_TO_LOW_TRANSITION
+
90  );
+
91 
+
92 
+
93  //P1.4 IFG cleared
+
94  GPIO_clearInterrupt(
+
95  GPIO_PORT_P1,
+
96  GPIO_PIN4
+
97  );
+
98 
+
99  //Enter LPM4 w/interrupt
+
100  __bis_SR_register(LPM4_bits + GIE);
+
101 
+
102  //For debugger
+
103  __no_operation();
+
104 }
+
105 
+
106 //******************************************************************************
+
107 //
+
108 //This is the PORT1_VECTOR interrupt vector service routine
+
109 //
+
110 //******************************************************************************
+
111 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
112 #pragma vector=PORT1_VECTOR
+
113 __interrupt
+
114 #elif defined(__GNUC__)
+
115 __attribute__((interrupt(PORT1_VECTOR)))
+
116 #endif
+
117 void Port_1 (void)
+
118 {
+
119  //P1.0 = toggle
+
120  GPIO_toggleOutputOnPin(
+
121  GPIO_PORT_P1,
+
122  GPIO_PIN0
+
123  );
+
124 
+
125 
+
126  //P1.4 IFG cleared
+
127  GPIO_clearInterrupt(
+
128  GPIO_PORT_P1,
+
129  GPIO_PIN4
+
130  );
+
131 }
+
132 
+
void Port_1(void)
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.html new file mode 100644 index 0000000..fe86cb1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.html @@ -0,0 +1,152 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/gpio/gpio_ex3_softwarePoll.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
gpio_ex3_softwarePoll.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

Software Poll P1.4, Set P1.0 if P1.4 = 1

+

Poll P1.4 in a loop, if hi P1.0 is set, if low, P1.0 reset. ACLK = n/a, MCLK = SMCLK = default DCO

   MSP430F5529, MSP430FR5739
+      -----------------
+  /|\|              XIN|-
+   | |                 |
+   --|RST          XOUT|-
+

/|\ | | –o–|P1.4 P1.0|-->LED |/

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None
  • +
+ +

Definition at line 59 of file gpio_ex3_softwarePoll.c.

+ +

References GPIO_setOutputHighOnPin(), and GPIO_setOutputLowOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.js new file mode 100644 index 0000000..6a9c87e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2gpio_2gpio__ex3__software_poll_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex3__software_poll_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex3__software_poll_8c_source.html new file mode 100644 index 0000000..85de1ee --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex3__software_poll_8c_source.html @@ -0,0 +1,183 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/gpio/gpio_ex3_softwarePoll.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
gpio_ex3_softwarePoll.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
56 //******************************************************************************
+
57 #include "driverlib.h"
+
58 
+
59 void main (void)
+
60 {
+
61  //Stop watchdog timer
+
62  WDT_A_hold(WDT_A_BASE);
+
63 
+
64  //Set P1.0 to output direction
+
65  GPIO_setAsOutputPin(
+
66  GPIO_PORT_P1,
+
67  GPIO_PIN0
+
68  );
+
69 
+
70  //Set P1.4 to input direction
+
71  GPIO_setAsInputPin(
+
72  GPIO_PORT_P1,
+
73  GPIO_PIN4
+
74  );
+
75 
+
76  while (1)
+
77  {
+
78  //Test P1.4
+
79  if (GPIO_INPUT_PIN_HIGH == GPIO_getInputPinValue(
+
80  GPIO_PORT_P1,
+
81  GPIO_PIN4
+
82  )){
+
83  //if P1.4 set, set P1.0
+ +
85  GPIO_PORT_P1,
+
86  GPIO_PIN0
+
87  );
+
88  } else {
+
89  //else reset
+ +
91  GPIO_PORT_P1,
+
92  GPIO_PIN0
+
93  );
+
94  }
+
95  }
+
96 }
+
97 
+
void main(void)
+ +
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.html new file mode 100644 index 0000000..6c55356 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.html @@ -0,0 +1,154 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/gpio/gpio_ex4_writeToPort1.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
gpio_ex4_writeToPort1.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

Write a byte to Port 1

+

Description: Writes a byte(0xFF) to Port 1 and stays in LPM4 mode ACLK = n/a, MCLK = SMCLK = default DCO

   MSP430F5529, MSP430FR5739
+      -----------------
+  /|\|                 |
+   | |                 |
+   --|RST              |
+     |             P1.x|-->HI
+     |                 |
+     |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 59 of file gpio_ex4_writeToPort1.c.

+ +

References __no_operation(), and GPIO_setOutputHighOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.js new file mode 100644 index 0000000..18565c3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c_source.html new file mode 100644 index 0000000..4e88926 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c_source.html @@ -0,0 +1,170 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/gpio/gpio_ex4_writeToPort1.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
gpio_ex4_writeToPort1.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
56 //******************************************************************************
+
57 
+
58 #include "driverlib.h"
+
59 void main (void)
+
60 {
+
61  //Stop watchdog timer
+
62  WDT_A_hold(WDT_A_BASE);
+
63 
+
64  //Set P1.x to output direction
+
65  GPIO_setAsOutputPin(
+
66  GPIO_PORT_P1,
+
67  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3 +
+
68  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7
+
69  );
+
70 
+
71  //Set all P1 pins HI
+ +
73  GPIO_PORT_P1,
+
74  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3 +
+
75  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7
+
76  );
+
77 
+
78  //Enter LPM4 w/interrupt
+
79  __bis_SR_register(LPM4_bits + GIE);
+
80 
+
81  //For debugger
+ +
83 }
+
84 
+
void main(void)
+ +
__no_operation()
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html new file mode 100644 index 0000000..586e44c --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex10_32bitSignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex10_32bitSignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 32x32 Signed Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RES0, RES1, RES2 and RES3.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex10_32bitSignedMultiply.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.js new file mode 100644 index 0000000..1fa1a58 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c_source.html new file mode 100644 index 0000000..e0ed7bc --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c_source.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex10_32bitSignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex10_32bitSignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop Watchdog Timer
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
69  //signed multiplication
+
70  MPY32_setOperandOne32Bit(
+
71  MPY32_MULTIPLY_SIGNED,
+
72  0x12341234);
+
73 
+
74  //Set 32-bit Operand 2 to begin the multiplication operation
+
75  MPY32_setOperandTwo32Bit(
+
76  0x56785678);
+
77 
+
78  //Wait for the result to become ready
+ + + + + +
84 
+
85  //Enter LPM4
+
86  __bis_SR_register(LPM4_bits);
+
87 
+
88  //BREAKPOINT HERE to verify the correct Result in Registers:
+
89  //Verify if values are RES0=0x0060, RES1=0x06E6, RES2=0x0CAC, RES3=0x0626
+ +
91 }
+
92 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html new file mode 100644 index 0000000..3e6f2ab --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex11_32bitSignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex11_32bitSignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 32x32 Signed Multiply Accumalate

+

Hardware multiplier is used to multiply-accumalate a set of numbers. The first calculation is automatically initiated after the second operand is loaded. A second multiply-accumulate operation is performed next. Results are stored in RES0, RES1, RES2 and RES3. SUMEXT contains the extended sign of the result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 66 of file mpy32_ex11_32bitSignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.js new file mode 100644 index 0000000..bef1653 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c_source.html new file mode 100644 index 0000000..2232bc3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c_source.html @@ -0,0 +1,181 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex11_32bitSignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex11_32bitSignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
62 //******************************************************************************
+
63 
+
64 #include "driverlib.h"
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop Watchdog Timer
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
72  //unsigned multiplication
+
73  MPY32_setOperandOne32Bit(
+
74  MPY32_MULTIPLY_UNSIGNED,
+
75  0x12341234);
+
76  //Set 32-bit Operand 2 to begin the multiplication operation
+
77  MPY32_setOperandTwo32Bit(
+
78  0x56785678);
+
79 
+
80  //Wait for the result to become ready
+ + + + + +
86 
+
87  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
88  //signed multiplication added to the current result
+
89  MPY32_setOperandOne32Bit(
+
90  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
91  0x12341234);
+
92  //Set 32-bit Operand 2 to begin the multiplication operation
+
93  MPY32_setOperandTwo32Bit(
+
94  0x56785678);
+
95 
+
96  //Enter LPM4
+
97  __bis_SR_register(LPM4_bits);
+
98 
+
99  //BREAKPOINT HERE to verify the correct Result in Registers.
+
100  __no_operation();
+
101 }
+
102 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html new file mode 100644 index 0000000..adffc5a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex12_32bitUnsignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex12_32bitUnsignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 32x32 Unsigned Multiply Accumalate

+

Hardware multiplier is used to multiply-accumalate a set of numbers. The first calculation is automatically initiated after the second operand is loaded. A second multiply-accumulate operation is performed next. Results are stored in RES0, RES1, RES2 and RES3. SUMEXT contains the extended sign of the result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 65 of file mpy32_ex12_32bitUnsignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.js new file mode 100644 index 0000000..27e0bac --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c_source.html new file mode 100644 index 0000000..06b1fad --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c_source.html @@ -0,0 +1,180 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex12_32bitUnsignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex12_32bitUnsignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
62 //******************************************************************************
+
63 #include "driverlib.h"
+
64 
+
65 void main (void)
+
66 {
+
67  //Stop Watchdog Timer
+
68  WDT_A_hold(WDT_A_BASE);
+
69 
+
70  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
71  //unsigned multiplication
+
72  MPY32_setOperandOne32Bit(
+
73  MPY32_MULTIPLY_UNSIGNED,
+
74  0x12341234);
+
75  //Set 32-bit Operand 2 to begin the multiplication operation
+
76  MPY32_setOperandTwo32Bit(
+
77  0x56785678);
+
78 
+
79  //Wait for the result to become ready
+ + + + + +
85 
+
86  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
87  //unsigned multiplication added to the current result
+
88  MPY32_setOperandOne32Bit(
+
89  MPY32_MULTIPLYACCUMULATE_UNSIGNED,
+
90  0x12341234);
+
91  //Set 32-bit Operand 2 to begin the multiplication operation
+
92  MPY32_setOperandTwo32Bit(
+
93  0x56785678);
+
94 
+
95  //Enter LPM4
+
96  __bis_SR_register(LPM4_bits);
+
97  //BREAKPOINT HERE to verify the correct Result in Registers.
+
98  //0xC4C19580DCC00C0
+ +
100 }
+
101 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html new file mode 100644 index 0000000..27b7a5c --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html @@ -0,0 +1,222 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex13_saturationUnderflow.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex13_saturationUnderflow.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + + + +

+Variables

uint32_t Result
 
uint16_t Result_lower16
 
uint16_t Result_upper16
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 69 of file mpy32_ex13_saturationUnderflow.c.

+ +

References __no_operation(), Result, Result_lower16, and Result_upper16.

+ +
+
+

Variable Documentation

+ +

◆ Result

+ +
+
+ + + + +
uint32_t Result
+
+

MPY - Saturation Mpode Underflow Test

+

Description: The example illustrates a special case showing underflow. Underflow occurs when adding 2 negative numbers yields a positive result. By having the saturation mode enabled, the result if rounded off to the highest negative number (0x8000.0000 for 16 bit). Results can be viewed in the debugger window.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 65 of file mpy32_ex13_saturationUnderflow.c.

+ +

Referenced by main().

+ +
+
+ +

◆ Result_lower16

+ +
+
+ + + + +
uint16_t Result_lower16
+
+ +

Definition at line 66 of file mpy32_ex13_saturationUnderflow.c.

+ +

Referenced by main().

+ +
+
+ +

◆ Result_upper16

+ +
+
+ + + + +
uint16_t Result_upper16
+
+ +

Definition at line 67 of file mpy32_ex13_saturationUnderflow.c.

+ +

Referenced by main().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.js new file mode 100644 index 0000000..17379a6 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Result", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html#a393f0b6791aa78cf29746a1877494247", null ], + [ "Result_lower16", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html#a9763beb1d3667cef32e0da3789b01e13", null ], + [ "Result_upper16", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html#afbdc37ba5018f94d28647a31a235b701", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c_source.html new file mode 100644 index 0000000..73857d7 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c_source.html @@ -0,0 +1,204 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex13_saturationUnderflow.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex13_saturationUnderflow.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
62 //******************************************************************************
+
63 #include "driverlib.h"
+
64 
+
65 uint32_t Result;
+
66 uint16_t Result_lower16;
+
67 uint16_t Result_upper16;
+
68 
+
69 void main (void)
+
70 {
+
71  //Stop Watchdog Timer
+
72  WDT_A_hold(WDT_A_BASE);
+
73 
+
74 //------Pre-Multiply to setup RES0 and RES1 ------------------------
+
75 
+
76  MPY32_setOperandOne16Bit(
+
77  MPY32_MULTIPLY_UNSIGNED,
+
78  0x8000);
+
79  MPY32_setOperandTwo8Bit(
+
80  0x1);
+
81 
+
82 //------32-bit Result of a multiply operation in RES0 and RES1------
+
83 //RES1 == 0x0000
+
84 //RES0 == 0x8000
+
85 
+
86  MPY32CTL0 = MPYC; //Explicity Set MPY Carry Bit.
+
87  //Enable Saturation Mode.
+
88  MPY32_enableSaturationMode();
+
89 
+
90  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
91  //signed multiplication added to the current result
+
92  MPY32_setOperandOne16Bit(
+
93  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
94  0x8000);
+
95  //Set 16-bit Operand 2 to begin the multiplication operation
+
96  MPY32_setOperandTwo16Bit(
+
97  0x0005);
+
98 
+
99  //Wait for the result to become ready
+
100  __no_operation();
+
101  __no_operation();
+
102  __no_operation();
+
103  __no_operation();
+
104  __no_operation();
+
105 
+
106  //Read out Result
+
107  Result = MPY32_getResult();
+
108 
+
109  //Result_upper16 == 0x8000
+
110  //Result_lower16 == 0x0000
+
111 
+ +
113  Result_lower16 = (Result >> 16);
+
114 
+
115  //Disable Saturation Mode
+
116  MPY32_disableSaturationMode();
+
117 
+
118  //Enter LPM4
+
119  __bis_SR_register(LPM4_bits);
+
120  __no_operation();
+
121 }
+
122 
+ +
void main(void)
+
uint16_t Result_lower16
+
uint16_t Result_upper16
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html new file mode 100644 index 0000000..f4aaa08 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html @@ -0,0 +1,222 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex14_saturationOverflow.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex14_saturationOverflow.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + + + +

+Variables

uint32_t Result
 
uint16_t Result_lower16
 
uint16_t Result_upper16
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 70 of file mpy32_ex14_saturationOverflow.c.

+ +

References __no_operation(), Result, Result_lower16, and Result_upper16.

+ +
+
+

Variable Documentation

+ +

◆ Result

+ +
+
+ + + + +
uint32_t Result
+
+

MPY - Saturation Mode Overflow Test

+

The example illustrates a special case showing overflow. The addition result of 2 positive numbers may exceed the highest positive number (0x7FFF FFFF for 32 bit result) due to overflow indicating a negative result. By having the saturation mode enabled, this result can be truncated off to this highest positive number. Results with and without saturation mode are shown.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 66 of file mpy32_ex14_saturationOverflow.c.

+ +

Referenced by main().

+ +
+
+ +

◆ Result_lower16

+ +
+
+ + + + +
uint16_t Result_lower16
+
+ +

Definition at line 67 of file mpy32_ex14_saturationOverflow.c.

+ +

Referenced by main().

+ +
+
+ +

◆ Result_upper16

+ +
+
+ + + + +
uint16_t Result_upper16
+
+ +

Definition at line 68 of file mpy32_ex14_saturationOverflow.c.

+ +

Referenced by main().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.js new file mode 100644 index 0000000..a5c95fc --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Result", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html#a393f0b6791aa78cf29746a1877494247", null ], + [ "Result_lower16", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html#a9763beb1d3667cef32e0da3789b01e13", null ], + [ "Result_upper16", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html#afbdc37ba5018f94d28647a31a235b701", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c_source.html new file mode 100644 index 0000000..5adc058 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c_source.html @@ -0,0 +1,210 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex14_saturationOverflow.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex14_saturationOverflow.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
63 //******************************************************************************
+
64 #include "driverlib.h"
+
65 
+
66 uint32_t Result;
+
67 uint16_t Result_lower16;
+
68 uint16_t Result_upper16;
+
69 
+
70 void main (void)
+
71 {
+
72  //Stop Watchdog Timer
+
73  WDT_A_hold(WDT_A_BASE);
+
74 
+
75 //------Pre-Multiply to setup RES0 and RES1 ------------------------
+
76 
+
77  MPY32_setOperandOne16Bit(
+
78  MPY32_MULTIPLY_UNSIGNED,
+
79  0xFFFF);
+
80  MPY32_setOperandTwo16Bit(
+
81  0x8000);
+
82  MPY32_setOperandOne16Bit(
+
83  MPY32_MULTIPLYACCUMULATE_UNSIGNED,
+
84  0x7FFD);
+
85  MPY32_setOperandTwo16Bit(
+
86  0x1);
+
87 
+
88 //------32-bit Result of a multiply operation in RES0 and RES1------
+
89 //RES1 == 0x7FFF
+
90 //RES0 == 0xFFFD
+
91 
+
92  //Enable Saturation Mode
+
93  MPY32_enableSaturationMode();
+
94 
+
95  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
96  //signed multiplication added to the current result
+
97  MPY32_setOperandOne16Bit(
+
98  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
99  0x05);
+
100 
+
101  //Set 16-bit Operand 2 to begin the multiplication operation
+
102  MPY32_setOperandTwo16Bit(
+
103  0x01);
+
104 
+
105  //Wait for the result to become ready
+
106  __no_operation();
+
107  __no_operation();
+
108  __no_operation();
+
109  __no_operation();
+
110  __no_operation();
+
111 
+
112  //Read out Result
+
113  Result = MPY32_getResult();
+
114 
+ +
116  Result_lower16 = (Result >> 16);
+
117 
+
118  //Disable Saturation Mode
+
119  MPY32_disableSaturationMode();
+
120 
+
121  //Enter LPM4
+
122  __bis_SR_register(LPM4_bits);
+
123 
+
124  //BREAKPOINT HERE to verify the correct Results:
+
125  //Result_upper16 == 0x7FFF
+
126  //Result_lower16 == 0xFFFF
+
127  __no_operation();
+
128 }
+
129 
+
uint32_t Result
+
void main(void)
+
uint16_t Result_lower16
+
uint16_t Result_upper16
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html new file mode 100644 index 0000000..de67f57 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html @@ -0,0 +1,202 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex15_fractionMode.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex15_fractionMode.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + +

+Variables

uint32_t Result
 
uint16_t Result_Q15
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file mpy32_ex15_fractionMode.c.

+ +

References __no_operation(), Result, and Result_Q15.

+ +
+
+

Variable Documentation

+ +

◆ Result

+ +
+
+ + + + +
uint32_t Result
+
+

MPY - Fractional mode, Q15 multiplication

+

The example illustrates multiplication of 2 Q15 numbers in fractional mode. The result is a Q15 (15 bit) number stored in the RES1 register. It can be viewed in the debugger window.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex15_fractionMode.c.

+ +

Referenced by main().

+ +
+
+ +

◆ Result_Q15

+ +
+
+ + + + +
uint16_t Result_Q15
+
+ +

Definition at line 64 of file mpy32_ex15_fractionMode.c.

+ +

Referenced by main().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.js new file mode 100644 index 0000000..88d253f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Result", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html#a393f0b6791aa78cf29746a1877494247", null ], + [ "Result_Q15", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html#a92e9913f091bda690c6dbc95a2319102", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c_source.html new file mode 100644 index 0000000..2513b1f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c_source.html @@ -0,0 +1,181 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex15_fractionMode.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex15_fractionMode.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 uint32_t Result;
+
64 uint16_t Result_Q15;
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop Watchdog Timer
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Enable Fraction Mode
+
72  MPY32_enableFractionalMode();
+
73 
+
74  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
75  //signed multiplication
+
76  MPY32_setOperandOne16Bit(
+
77  MPY32_MULTIPLY_SIGNED,
+
78  0x7D70);
+
79  //Set 16-bit Operand 2 to begin the multiplication operation
+
80  MPY32_setOperandTwo16Bit(
+
81  0x1000);
+
82 
+
83  //Read out Result
+
84  Result = MPY32_getResult();
+
85 
+
86  Result_Q15 = (Result >> 16);
+
87  //Q15 result == 0x0FAE
+
88 
+
89  //Disable Fraction Mode
+
90  MPY32_disableFractionalMode();
+
91 
+
92  //Enter LPM4
+
93  __bis_SR_register(LPM4_bits);
+
94 
+
95  //BREAKPOINT HERE to verify the correct Result_Q15
+ +
97 }
+
98 
+
uint32_t Result
+
void main(void)
+
uint16_t Result_Q15
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html new file mode 100644 index 0000000..3dd7f6d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex1_16bitUnsignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex1_16bitUnsignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 16x16 Unsigned Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RESLO and RESHI.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex1_16bitUnsignedMultiply.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.js new file mode 100644 index 0000000..435e95e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c_source.html new file mode 100644 index 0000000..834dfb2 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c_source.html @@ -0,0 +1,164 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex1_16bitUnsignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex1_16bitUnsignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop Watchdog Timer
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
69  //unsigned multiplication
+
70  MPY32_setOperandOne16Bit(MPY32_MULTIPLY_UNSIGNED,
+
71  0x1234);
+
72 
+
73  //Set Operand 2 to begin the multiplication operation
+
74  MPY32_setOperandTwo16Bit(0x5678);
+
75 
+
76  //Enter LPM4
+
77  __bis_SR_register(LPM4_bits);
+
78 
+
79  //BREAKPOINT HERE to verify the correct Result in Registers:
+
80  //Verify if RESLO == 0x0060 and RESHI == 0x0626
+ +
82 }
+
83 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html new file mode 100644 index 0000000..d6d79e3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex2_8bitUnsignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex2_8bitUnsignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 8x8 Unsigned Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RESLO and RESHI.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex2_8bitUnsignedMultiply.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.js new file mode 100644 index 0000000..8dd2660 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c_source.html new file mode 100644 index 0000000..08ca28f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c_source.html @@ -0,0 +1,164 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex2_8bitUnsignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex2_8bitUnsignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop Watchdog Timer
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
69  //unsigned multiplication
+
70  MPY32_setOperandOne8Bit(
+
71  MPY32_MULTIPLY_UNSIGNED,
+
72  0x12);
+
73  //Set 8- bit Operand 2 to begin the multiplication operation
+
74  MPY32_setOperandTwo8Bit(
+
75  0x56);
+
76 
+
77  //Enter LPM4
+
78  __bis_SR_register(LPM4_bits);
+
79  //BREAKPOINT HERE to verify the correct Result in Registers,
+
80  //RES0=0x060c RES1=0x0000
+ +
82 }
+
83 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html new file mode 100644 index 0000000..51c0ec2 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html @@ -0,0 +1,222 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex3_16bitSignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex3_16bitSignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + + + +

+Variables

int16_t multiplier = 0x1234
 
int16_t operand = -6578
 
int64_t Result
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 68 of file mpy32_ex3_16bitSignedMultiply.c.

+ +

References __no_operation(), multiplier, operand, and Result.

+ +
+
+

Variable Documentation

+ +

◆ multiplier

+ +
+
+ + + + +
int16_t multiplier = 0x1234
+
+

MPY - 16x16 Signed Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RESLO, RESHI and SUMEXT = FFFF if result is negative, SUMEXT = 0 otherwise. Result is also stored as Result variable.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex3_16bitSignedMultiply.c.

+ +

Referenced by main().

+ +
+
+ +

◆ operand

+ +
+
+ + + + +
int16_t operand = -6578
+
+ +

Definition at line 65 of file mpy32_ex3_16bitSignedMultiply.c.

+ +

Referenced by main().

+ +
+
+ +

◆ Result

+ +
+
+ + + + +
int64_t Result
+
+ +

Definition at line 66 of file mpy32_ex3_16bitSignedMultiply.c.

+ +

Referenced by main().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.js new file mode 100644 index 0000000..34f5024 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "multiplier", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html#a3b6affddfe426e29d8e6f98049e8a9f2", null ], + [ "operand", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html#a917f1d27bc92d7287c57835107470d07", null ], + [ "Result", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html#af5df517f0190d126def9ba83a94ef595", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c_source.html new file mode 100644 index 0000000..cd9dcdc --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c_source.html @@ -0,0 +1,174 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex3_16bitSignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex3_16bitSignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 int16_t multiplier = 0x1234;
+
65 int16_t operand = -6578;
+
66 int64_t Result;
+
67 
+
68 void main (void)
+
69 {
+
70  //Stop Watchdog Timer
+
71  WDT_A_hold(WDT_A_BASE);
+
72 
+
73  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
74  //signed multiplication
+
75  MPY32_setOperandOne16Bit(
+
76  MPY32_MULTIPLY_SIGNED,
+
77  multiplier);
+
78  //Set 16-bit Operand 2 to begin the multiplication operation
+
79  MPY32_setOperandTwo16Bit(
+
80  operand);
+
81 
+
82  //Read out the result
+
83  Result = MPY32_getResult();
+
84 
+
85  //Enter LPM4
+
86  __bis_SR_register(LPM4_bits);
+
87 
+
88  //BREAKPOINT HERE to verify the correct Result
+ +
90 }
+
91 
+
int16_t multiplier
+
void main(void)
+ + + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html new file mode 100644 index 0000000..6f35c38 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex4_8bitSignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex4_8bitSignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 8x8 Signed Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RESLO, RESHI and SUMEXT = FFFF if result is negative, SUMEXT = 0 otherwise.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex4_8bitSignedMultiply.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.js new file mode 100644 index 0000000..40e7093 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c_source.html new file mode 100644 index 0000000..e6aa7d5 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c_source.html @@ -0,0 +1,170 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex4_8bitSignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex4_8bitSignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  uint8_t value1,value2;
+
67 
+
68  //Stop Watchdog Timer
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Assign operands for signed multiplication
+
72  value1 = 0x04; //value1 == 4
+
73  value2 = 0x84; //value2 == -124
+
74 
+
75  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
76  //signed multiplication
+
77  MPY32_setOperandOne8Bit(
+
78  MPY32_MULTIPLY_SIGNED,
+
79  value1);
+
80 
+
81  //Set 8- bit Operand 2 to begin the multiplication operation
+
82  MPY32_setOperandTwo8Bit(
+
83  value2);
+
84 
+
85  //Enter LPM4
+
86  __bis_SR_register(LPM4_bits);
+
87  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
89 }
+
90 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html new file mode 100644 index 0000000..996ac62 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex5_16bitUnsignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex5_16bitUnsignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 16x16 Unsigned Multiply Accumulate

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. A second multiply accumulate operation is performed after that. Results are stored in RESLO and RESHI. SUMEXT contains the carry of the result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex5_16bitUnsignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.js new file mode 100644 index 0000000..e5976b1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c_source.html new file mode 100644 index 0000000..0c8e17c --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c_source.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex5_16bitUnsignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex5_16bitUnsignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  //Stop Watchdog Timer
+
67  WDT_A_hold(WDT_A_BASE);
+
68 
+
69  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
70  //unsigned multiplication
+
71  MPY32_setOperandOne16Bit(
+
72  MPY32_MULTIPLY_UNSIGNED,
+
73  0x1234);
+
74  //Set 16-bit Operand 2 to begin the multiplication operation
+
75  MPY32_setOperandTwo16Bit(
+
76  0x5678);
+
77 
+
78  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
79  //unsigned multiplication added to the current result
+
80  MPY32_setOperandOne16Bit(
+
81  MPY32_MULTIPLYACCUMULATE_UNSIGNED,
+
82  0x1234);
+
83  //Set 16-bit Operand 2 to begin the multiplication operation
+
84  MPY32_setOperandTwo16Bit(
+
85  0x5678);
+
86 
+
87  //Enter LPM4
+
88  __bis_SR_register(LPM4_bits);
+
89 
+
90  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
92 }
+
93 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html new file mode 100644 index 0000000..9d56db5 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html @@ -0,0 +1,156 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex6_8bitUnsignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex6_8bitUnsignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 8x8 Unsigned Multiply Accumulate

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. A second multiply accumulate operation is performed after that. Results are stored in RESLO and RESHI. SUMEXT contains the carry of the result.

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 62 of file mpy32_ex6_8bitUnsignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.js new file mode 100644 index 0000000..6a1fdfd --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c_source.html new file mode 100644 index 0000000..4f125d1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c_source.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex6_8bitUnsignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex6_8bitUnsignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
59 //******************************************************************************
+
60 #include "driverlib.h"
+
61 
+
62 void main (void)
+
63 {
+
64  //Stop Watchdog Timer
+
65  WDT_A_hold(WDT_A_BASE);
+
66 
+
67  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
68  //unsigned multiplication
+
69  MPY32_setOperandOne8Bit(
+
70  MPY32_MULTIPLY_UNSIGNED,
+
71  0x12);
+
72  //Set 8- bit Operand 2 to begin the multiplication operation
+
73  MPY32_setOperandTwo8Bit(
+
74  0x56);
+
75 
+
76  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
77  //unsigned multiplication added to the current result
+
78  MPY32_setOperandOne8Bit(
+
79  MPY32_MULTIPLYACCUMULATE_UNSIGNED,
+
80  0x12);
+
81  //Set 8- bit Operand 2 to begin the multiplication operation
+
82  MPY32_setOperandTwo8Bit(
+
83  0x56);
+
84 
+
85  //Enter LPM4
+
86  __bis_SR_register(LPM4_bits);
+
87 
+
88  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
90 }
+
91 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html new file mode 100644 index 0000000..e4cbd66 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex7_16bitSignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex7_16bitSignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 16x16 Signed Multiply Accumulate

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. A second multiply-accumulate operation is performed after that. Results are stored in RESLO and RESHI. SUMEXT contains the extended sign of the result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex7_16bitSignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.js new file mode 100644 index 0000000..53f600e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c_source.html new file mode 100644 index 0000000..2ca5974 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c_source.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex7_16bitSignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex7_16bitSignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  //Stop Watchdog Timer
+
67  WDT_A_hold(WDT_A_BASE);
+
68 
+
69  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
70  //unsigned multiplication
+
71  MPY32_setOperandOne16Bit(
+
72  MPY32_MULTIPLY_UNSIGNED,
+
73  0x1234);
+
74  //Set 16-bit Operand 2 to begin the multiplication operation
+
75  MPY32_setOperandTwo16Bit(
+
76  0x5678);
+
77 
+
78  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
79  //signed multiplication added to the current result
+
80  MPY32_setOperandOne16Bit(
+
81  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
82  0x1234);
+
83  //Set 16-bit Operand 2 to begin the multiplication operation
+
84  MPY32_setOperandTwo16Bit(
+
85  0x5678);
+
86 
+
87  //Enter LPM4
+
88  __bis_SR_register(LPM4_bits);
+
89 
+
90  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
92 }
+
93 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html new file mode 100644 index 0000000..1c4cdc1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex8_8bitSignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex8_8bitSignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 8x8 Signed Multiply Accumulate

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. A second multiply accumulate operation is performed after that. Results are stored in RESLO and RESHI. SUMEXT contains the extended sign of result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex8_8bitSignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.js new file mode 100644 index 0000000..fa67428 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c_source.html new file mode 100644 index 0000000..24931b2 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c_source.html @@ -0,0 +1,180 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex8_8bitSignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex8_8bitSignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  uint8_t value1,value2;
+
67 
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
72  //unsigned multiplication
+
73  MPY32_setOperandOne16Bit(
+
74  MPY32_MULTIPLY_UNSIGNED,
+
75  0x1234);
+
76  //Set 8- bit Operand 2 to begin the multiplication operation
+
77  MPY32_setOperandTwo16Bit(
+
78  0x5678);
+
79 
+
80  //Load Operand Values for Signed MAC
+
81  value1 = 0x12;
+
82  value2 = 0x16;
+
83 
+
84  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
85  //unsigned multiplication added to the current result
+
86  MPY32_setOperandOne8Bit(
+
87  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
88  value1);
+
89 
+
90  //Set 8- bit Operand 2 to begin the multiplication operation
+
91  MPY32_setOperandTwo8Bit(
+
92  value2);
+
93 
+
94  //Enter LPM4
+
95  __bis_SR_register(LPM4_bits);
+
96 
+
97  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
99 }
+
100 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html new file mode 100644 index 0000000..49fd40b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html @@ -0,0 +1,182 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex9_32bitUnsignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex9_32bitUnsignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + +

+Variables

uint64_t Result
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 65 of file mpy32_ex9_32bitUnsignedMultiply.c.

+ +

References __no_operation(), and Result.

+ +
+
+

Variable Documentation

+ +

◆ Result

+ +
+
+ + + + +
uint64_t Result
+
+

MPY - 32x32 Unsigned Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RES0, RES1, RES2 and RES3.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex9_32bitUnsignedMultiply.c.

+ +

Referenced by main().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.js new file mode 100644 index 0000000..7c5f401 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Result", "_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html#a84a5e5c775453416939a34ab72557bc5", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c_source.html new file mode 100644 index 0000000..faa3c80 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c_source.html @@ -0,0 +1,177 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/mpy32/mpy32_ex9_32bitUnsignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex9_32bitUnsignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 uint64_t Result;
+
64 
+
65 void main (void)
+
66 {
+
67  //Stop Watchdog Timer
+
68  WDT_A_hold(WDT_A_BASE);
+
69 
+
70  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
71  //unsigned multiplication
+
72  MPY32_setOperandOne32Bit(
+
73  MPY32_MULTIPLY_UNSIGNED,
+
74  0x12341234);
+
75  //Set 32-bit Operand 2 to begin the multiplication operation
+
76  MPY32_setOperandTwo32Bit(
+
77  0x56785678);
+
78 
+
79  //Wait for the result to become ready
+ + + + + +
85 
+
86  //Read out Result
+
87  Result = MPY32_getResult();
+
88 
+
89  //Enter LPM4
+
90  __bis_SR_register(LPM4_bits);
+
91 
+
92  //BREAKPOINT HERE to verify the correct Result
+ +
94 }
+
95 
+
void main(void)
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.html new file mode 100644 index 0000000..669ea0f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.html @@ -0,0 +1,202 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/rtc_c/rtc_c_ex1_calendarmode.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
rtc_c_ex1_calendarmode.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void RTC_ISR (void)
 
+ + + +

+Variables

volatile Calendar newTime
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 73 of file rtc_c_ex1_calendarmode.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ RTC_ISR()

+ +
+
+ + + + + + + + +
void RTC_ISR (void )
+
+ +

Definition at line 154 of file rtc_c_ex1_calendarmode.c.

+ +

References __no_operation(), and newTime.

+ +
+
+

Variable Documentation

+ +

◆ newTime

+ +
+
+ + + + +
volatile Calendar newTime
+
+

RTC_C in Calendar mode, Interruptions every 1s, 1m, and 5th day of week at 5:00pm

+

This program demonstrates the RTC mode by triggering an interrupt every second and minute. This code toggles P1.0 every second. This code recommends an external LFXT1 crystal for RTC accuracy. Note that if XT1 is not present the code loops in an infinite loop. ACLK = LFXT1 = 32768Hz, MCLK = SMCLK = default DCO = 32 x ACLK = 1048576Hz

+

NOTE: Refer device header file and pass in baseaddress parameter for RTC_C as RTC_C_BASE or RTC_CE_BASE as defined in User's guide

+

+Tested On: MSP430F6736

+

/|\ | XIN|- | | | 32kHz —|RST XOUT|- | | | P1.0 |--> Toggles every second | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • RTC peripheral
  • +
  • UCS peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • RTC_VECTOR
  • +
+ +

Definition at line 71 of file rtc_c_ex1_calendarmode.c.

+ +

Referenced by RTC_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.js new file mode 100644 index 0000000..3fe706b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "RTC_ISR", "_m_s_p430_f5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.html#aab67b5b38d41e40c3d03447137ba8ef5", null ], + [ "newTime", "_m_s_p430_f5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.html#ac6f7bbb5bb5d80ecf8c2eb3916ee8187", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c_source.html new file mode 100644 index 0000000..f770d56 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c_source.html @@ -0,0 +1,262 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/rtc_c/rtc_c_ex1_calendarmode.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
rtc_c_ex1_calendarmode.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
67 //******************************************************************************
+
68 
+
69 #include "driverlib.h"
+
70 
+
71 volatile Calendar newTime;
+
72 
+
73 void main (void)
+
74 {
+
75  Calendar currentTime;
+
76 
+
77  WDT_A_hold(WDT_A_BASE);
+
78 
+
79  //Set P1.0 to output direction
+
80  GPIO_setAsOutputPin(
+
81  GPIO_PORT_P1,
+
82  GPIO_PIN0
+
83  );
+
84 
+
85  //Initialize LFXT1
+
86  UCS_turnOnLFXT1(UCS_XT1_DRIVE_3,
+
87  UCS_XCAP_3
+
88  );
+
89 
+
90  //Setup Current Time for Calendar
+
91  currentTime.Seconds = 0x00;
+
92  currentTime.Minutes = 0x26;
+
93  currentTime.Hours = 0x13;
+
94  currentTime.DayOfWeek = 0x03;
+
95  currentTime.DayOfMonth = 0x20;
+
96  currentTime.Month = 0x07;
+
97  currentTime.Year = 0x2011;
+
98 
+
99  //Initialize Calendar Mode of RTC
+
100  /*
+
101  * Base Address of the RTC_C
+
102  * Pass in current time, intialized above
+
103  * Use BCD as Calendar Register Format
+
104  */
+
105  /*Refer device header file and pass in baseaddress parameter for RTC_C
+
106  as RTC_C_BASE or RTC_CE_BASE as defined in User's guide*/
+
107  RTC_C_initCalendar(RTC_C_BASE,
+
108  &currentTime,
+
109  RTC_C_FORMAT_BCD);
+
110 
+
111  //Setup Calendar Alarm for 5:00pm on the 5th day of the week.
+
112  //Note: Does not specify day of the week.
+
113  /*Refer device header file and pass in baseaddress parameter for RTC_C
+
114  as RTC_C_BASE or RTC_CE_BASE as defined in User's guide*/
+
115  RTC_C_configureCalendarAlarmParam param = {0};
+
116  param.minutesAlarm = 0x00;
+
117  param.hoursAlarm = 0x17;
+
118  param.dayOfWeekAlarm = RTC_C_ALARMCONDITION_OFF;
+
119  param.dayOfMonthAlarm = 0x05;
+
120  RTC_C_configureCalendarAlarm(RTC_C_BASE, &param);
+
121 
+
122  //Specify an interrupt to assert every minute
+
123  /*Refer device header file and pass in baseaddress parameter for RTC_C
+
124  as RTC_C_BASE or RTC_CE_BASE as defined in User's guide*/
+
125  RTC_C_setCalendarEvent(RTC_C_BASE,
+
126  RTC_C_CALENDAREVENT_MINUTECHANGE);
+
127 
+
128  //Enable interrupt for RTC Ready Status, which asserts when the RTC
+
129  //Calendar registers are ready to read.
+
130  //Also, enable interrupts for the Calendar alarm and Calendar event.
+
131  /*Refer device header file and pass in baseaddress parameter for RTC_C
+
132  as RTC_C_BASE or RTC_CE_BASE as defined in User's guide*/
+
133  RTC_C_enableInterrupt(RTC_C_BASE,
+
134  RTCRDYIE + RTCTEVIE + RTCAIE);
+
135  RTC_C_enableInterrupt(RTC_C_BASE,
+
136  RTCRDYIFG + RTCTEVIFG + RTCAIFG);
+
137 
+
138  //Start RTC Clock
+
139  /*Refer device header file and pass in baseaddress parameter for RTC_C
+
140  as RTC_C_BASE or RTC_CE_BASE as defined in User's guide*/
+
141  RTC_C_startClock(RTC_C_BASE);
+
142 
+
143  //Enter LPM3 mode with interrupts enabled
+
144  __bis_SR_register(LPM3_bits + GIE);
+
145  __no_operation();
+
146 }
+
147 
+
148 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
149 #pragma vector=RTC_VECTOR
+
150 __interrupt
+
151 #elif defined(__GNUC__)
+
152 __attribute__((interrupt(RTC_VECTOR)))
+
153 #endif
+
154 void RTC_ISR (void)
+
155 {
+
156  switch (__even_in_range(RTCIV, 16)) {
+
157  case RTCIV_NONE: break; //No interrupts
+
158  case RTCIV_RTCOFIFG: break; //RTCOFIFG
+
159  case RTCIV_RTCRDYIFG: //RTCRDYIFG
+
160  //Toggle P1.0 every second
+
161  GPIO_toggleOutputOnPin(
+
162  GPIO_PORT_P1,
+
163  GPIO_PIN0);
+
164  break;
+
165  case RTCIV_RTCTEVIFG: //RTCEVIFG
+
166  //Interrupts every minute
+
167  __no_operation();
+
168 
+
169  //Read out New Time a Minute Later BREAKPOINT HERE
+
170  /*Refer device header file and pass in baseaddress
+
171  parameter for RTC_C as RTC_C_BASE or RTC_CE_BASE as
+
172  defined in User's guide*/
+
173  newTime = RTC_C_getCalendarTime(RTC_C_BASE);
+
174  break;
+
175  case RTCIV_RTCAIFG: //RTCAIFG
+
176  //Interrupts 5:00pm on 5th day of week
+
177  __no_operation();
+
178  break;
+
179  case RTCIV_RT0PSIFG: break; //RT0PSIFG
+
180  case RTCIV_RT1PSIFG: break; //RT1PSIFG
+
181 
+
182  default: break;
+
183  }
+
184 }
+
185 
+
void main(void)
+
void RTC_ISR(void)
+
volatile Calendar newTime
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.html new file mode 100644 index 0000000..2b670ce --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.html @@ -0,0 +1,198 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_a/timer_a_ex1_pwmSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex1_pwmSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define TIMER_PERIOD   511
 
#define DUTY_CYCLE   350
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE

+ +
+
+ + + + +
#define DUTY_CYCLE   350
+
+ +

Definition at line 64 of file timer_a_ex1_pwmSingle.c.

+ +
+
+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   511
+
+

Timer_A3, PWM TA1.1, Up Mode, DCO SMCLK

+

Description: This program generates PWM outputs on P2.2 using Timer1_A configured for up mode. The value , TIMER_PERIOD, defines the PWM period and the value DUTY_CYCLE the PWM duty cycle. Using ~1.045MHz SMCLK as TACLK, the timer period is ~500us with a 75% duty cycle on P2.2 ACLK = n/a, SMCLK = MCLK = TACLK = default DCO ~1.045MHz.

+

+Tested On: MSP430F5529

+ + + + + +
/ |
RST
+

| | | P2.0/TA1.1|--> CCR1 - 75% PWM | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file timer_a_ex1_pwmSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file timer_a_ex1_pwmSingle.c.

+ +

References __no_operation(), DUTY_CYCLE, param, and TIMER_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.js new file mode 100644 index 0000000..97979da --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c = +[ + [ "DUTY_CYCLE", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.html#a940d0fcbbee0921e43201c554231947c", null ], + [ "TIMER_PERIOD", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "main", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c_source.html new file mode 100644 index 0000000..4f6d101 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c_source.html @@ -0,0 +1,178 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_a/timer_a_ex1_pwmSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex1_pwmSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*******************************************************************************
+
59 //******************************************************************************
+
60 
+
61 #include "driverlib.h"
+
62 
+
63 #define TIMER_PERIOD 511
+
64 #define DUTY_CYCLE 350
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //P2.0 as PWM output
+
72  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
73  GPIO_PORT_P2,
+
74  GPIO_PIN0
+
75  );
+
76 
+
77  //Generate PWM - Timer runs in Up mode
+
78  Timer_A_outputPWMParam param = {0};
+
79  param.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
80  param.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
81  param.timerPeriod = TIMER_PERIOD;
+
82  param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
+
83  param.compareOutputMode = TIMER_A_OUTPUTMODE_RESET_SET;
+
84  param.dutyCycle = DUTY_CYCLE;
+
85  Timer_A_outputPWM(TIMER_A1_BASE, &param);
+
86 
+
87  //Enter LPM0
+
88  __bis_SR_register(LPM0_bits);
+
89 
+
90  //For debugger
+ +
92 }
+
93 
+
void main(void)
+
#define DUTY_CYCLE
+
#define TIMER_PERIOD
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html new file mode 100644 index 0000000..203ae88 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html @@ -0,0 +1,204 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_a/timer_a_ex2_continousModeOperationWithCCR0Interrupt.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex2_continousModeOperationWithCCR0Interrupt.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define COMPARE_VALUE   50000
 
+ + + + + +

+Functions

void main (void)
 
void TIMER1_A0_ISR (void)
 
+

Macro Definition Documentation

+ +

◆ COMPARE_VALUE

+ +
+
+ + + + +
#define COMPARE_VALUE   50000
+
+

TIMER_A, Toggle P1.0, CCR0 Cont. Mode ISR, DCO SMCLK

+

Toggle P1.0 using software and TA_0 ISR. Toggles every 50000 SMCLK cycles. SMCLK provides clock source for TACLK. During the TA_0 ISR, P1.0 is toggled and 50000 clock cycles are added to CCR0. TA_0 ISR is triggered every 50000 cycles. CPU is normally off and used only during TA_ISR. ACLK = n/a, MCLK = SMCLK = TACLK = default DCO ~1.045MHz

+

+Tested On: MSP430F5529,MSP430FR5739

+ + + + + +
/ |
RST
+

| | | P1.0|-->LED

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • TimerA peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • Timer A0
  • +
+ +

Definition at line 64 of file timer_a_ex2_continousModeOperationWithCCR0Interrupt.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file timer_a_ex2_continousModeOperationWithCCR0Interrupt.c.

+ +

References __no_operation(), and COMPARE_VALUE.

+ +
+
+ +

◆ TIMER1_A0_ISR()

+ +
+
+ + + + + + + + +
void TIMER1_A0_ISR (void )
+
+ +

Definition at line 120 of file timer_a_ex2_continousModeOperationWithCCR0Interrupt.c.

+ +

References COMPARE_VALUE.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.js new file mode 100644 index 0000000..fd8c9b0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c = +[ + [ "COMPARE_VALUE", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html#a655c866eb3f7ee47831709b091612e63", null ], + [ "main", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMER1_A0_ISR", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html#a7041a18d2acb50837a4cbfb1bd386bd7", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c_source.html new file mode 100644 index 0000000..fe09bd3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c_source.html @@ -0,0 +1,221 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_a/timer_a_ex2_continousModeOperationWithCCR0Interrupt.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex2_continousModeOperationWithCCR0Interrupt.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //
+
61 //*****************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 #define COMPARE_VALUE 50000
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Set P1.0 to output direction
+
72  GPIO_setAsOutputPin(
+
73  GPIO_PORT_P1,
+
74  GPIO_PIN0
+
75  );
+
76 
+
77  //Start timer in continuous mode sourced by SMCLK
+
78  Timer_A_initContinuousModeParam initContParam = {0};
+
79  initContParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
80  initContParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
81  initContParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
82  initContParam.timerClear = TIMER_A_DO_CLEAR;
+
83  initContParam.startTimer = false;
+
84  Timer_A_initContinuousMode(TIMER_A1_BASE, &initContParam);
+
85 
+
86  //Initiaze compare mode
+
87  Timer_A_clearCaptureCompareInterrupt(TIMER_A1_BASE,
+
88  TIMER_A_CAPTURECOMPARE_REGISTER_0
+
89  );
+
90 
+
91  Timer_A_initCompareModeParam initCompParam = {0};
+
92  initCompParam.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_0;
+
93  initCompParam.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_ENABLE;
+
94  initCompParam.compareOutputMode = TIMER_A_OUTPUTMODE_OUTBITVALUE;
+
95  initCompParam.compareValue = COMPARE_VALUE;
+
96  Timer_A_initCompareMode(TIMER_A1_BASE, &initCompParam);
+
97 
+
98  Timer_A_startCounter( TIMER_A1_BASE,
+
99  TIMER_A_CONTINUOUS_MODE
+
100  );
+
101 
+
102  //Enter LPM0, enable interrupts
+
103  __bis_SR_register(LPM0_bits + GIE);
+
104 
+
105  //For debugger
+
106  __no_operation();
+
107 }
+
108 
+
109 //******************************************************************************
+
110 //
+
111 //This is the TIMER1_A3 interrupt vector service routine.
+
112 //
+
113 //******************************************************************************
+
114 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
115 #pragma vector=TIMER1_A0_VECTOR
+
116 __interrupt
+
117 #elif defined(__GNUC__)
+
118 __attribute__((interrupt(TIMER1_A0_VECTOR)))
+
119 #endif
+
120 void TIMER1_A0_ISR (void)
+
121 {
+
122  uint16_t compVal = Timer_A_getCaptureCompareCount(TIMER_A1_BASE,
+
123  TIMER_A_CAPTURECOMPARE_REGISTER_0)
+
124  + COMPARE_VALUE;
+
125 
+
126  //Toggle P1.0
+
127  GPIO_toggleOutputOnPin(
+
128  GPIO_PORT_P1,
+
129  GPIO_PIN0
+
130  );
+
131 
+
132  //Add Offset to CCR0
+
133  Timer_A_setCompareValue(TIMER_A1_BASE,
+
134  TIMER_A_CAPTURECOMPARE_REGISTER_0,
+
135  compVal
+
136  );
+
137 }
+
138 
+ + + + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html new file mode 100644 index 0000000..6e054cb --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html @@ -0,0 +1,179 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_a/timer_a_ex3_continousModeOperationWithTAIEInterrupt.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex3_continousModeOperationWithTAIEInterrupt.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void TIMER1_A1_ISR (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

TIMER_A, Toggle P1.0, Overflow ISR, 32kHz ACLK

+

Description: Toggle P1.0 using software and the TIMER_A overflow ISR. In this example an ISR triggers when TB overflows. Inside the ISR P1.0 is toggled. Toggle rate is exactly 0.25Hz = [32kHz/FFFFh]/2. Proper use of the TAIV interrupt vector generator is demonstrated. ACLK = TBCLK = 32kHz, MCLK = SMCLK = default DCO ~ 1.045MHz

+

+Tested On: MSP430F5529,MSP430FR5739

+ + + + + +
/ |
RST
+

| | | P1.0|-->LED

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • TIMER_A7
  • +
+ +

Definition at line 64 of file timer_a_ex3_continousModeOperationWithTAIEInterrupt.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ TIMER1_A1_ISR()

+ +
+
+ + + + + + + + +
void TIMER1_A1_ISR (void )
+
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.js new file mode 100644 index 0000000..388c0af --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMER1_A1_ISR", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html#a75b17bc1a2d3b4b8e3b7fff08b7651a8", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c_source.html new file mode 100644 index 0000000..97f146f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c_source.html @@ -0,0 +1,210 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_a/timer_a_ex3_continousModeOperationWithTAIEInterrupt.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex3_continousModeOperationWithTAIEInterrupt.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
59 //
+
60 //*****************************************************************************
+
61 
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  //Stop WDT
+
67  WDT_A_hold(WDT_A_BASE);
+
68 
+
69  //Set P1.0 to output direction
+
70  GPIO_setAsOutputPin(
+
71  GPIO_PORT_P1,
+
72  GPIO_PIN0
+
73  );
+
74 
+
75  //Start timer in continuous mode sourced by ACLK
+
76  Timer_A_clearTimerInterrupt(TIMER_A1_BASE);
+
77 
+
78  Timer_A_initContinuousModeParam param = {0};
+
79  param.clockSource = TIMER_A_CLOCKSOURCE_ACLK;
+
80  param.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
81  param.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_ENABLE;
+
82  param.timerClear = TIMER_A_DO_CLEAR;
+
83  param.startTimer = true;
+
84  Timer_A_initContinuousMode(TIMER_A1_BASE, &param);
+
85 
+
86  //Enter LPM0, enable interrupts
+
87  __bis_SR_register(LPM0_bits + GIE);
+
88 
+
89  //For debugger
+ +
91 }
+
92 
+
93 //******************************************************************************
+
94 //
+
95 //This is the TIMER1_A3 interrupt vector service routine.
+
96 //
+
97 //******************************************************************************
+
98 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
99 #pragma vector=TIMER1_A1_VECTOR
+
100 __interrupt
+
101 #elif defined(__GNUC__)
+
102 __attribute__((interrupt(TIMER1_A1_VECTOR)))
+
103 #endif
+
104 void TIMER1_A1_ISR (void)
+
105 {
+
106  //Any access, read or write, of the TAIV register automatically resets the
+
107  //highest "pending" interrupt flag
+
108  switch ( __even_in_range(TA1IV,14) ){
+
109  case 0: break; //No interrupt
+
110  case 2: break; //CCR1 not used
+
111  case 4: break; //CCR2 not used
+
112  case 6: break; //CCR3 not used
+
113  case 8: break; //CCR4 not used
+
114  case 10: break; //CCR5 not used
+
115  case 12: break; //CCR6 not used
+
116  case 14:
+
117  //Toggle P1.0 // overflow
+
118  GPIO_toggleOutputOnPin(
+
119  GPIO_PORT_P1,
+
120  GPIO_PIN0
+
121  );
+
122  break;
+
123  default: break;
+
124  }
+
125 }
+
126 
+ + +
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html new file mode 100644 index 0000000..c33e6db --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html @@ -0,0 +1,216 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_a/timer_a_ex4_pwmMultipleUpDown.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex4_pwmMultipleUpDown.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Macros

#define TIMER_PERIOD   127
 
#define DUTY_CYCLE1   32
 
#define DUTY_CYCLE2   96
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE1

+ +
+
+ + + + +
#define DUTY_CYCLE1   32
+
+ +

Definition at line 67 of file timer_a_ex4_pwmMultipleUpDown.c.

+ +
+
+ +

◆ DUTY_CYCLE2

+ +
+
+ + + + +
#define DUTY_CYCLE2   96
+
+ +

Definition at line 68 of file timer_a_ex4_pwmMultipleUpDown.c.

+ +
+
+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   127
+
+

Timer_A3, PWM TA1.1-2, Up/Down Mode, DCO SMCLK

+

Description: This program generates two PWM outputs on P2.0,P2.1 using Timer1_A configured for up/down mode. The value in CCR0, 128, defines the PWM period/2 and the values in CCR1 and CCR2 the PWM duty cycles. Using ~1.045MHz SMCLK as TACLK, the timer period is ~233us with a 75% duty cycle on P2.0 and 25% on P2.1. SMCLK = MCLK = TACLK = default DCO ~1.045MHz.

+

+Tested On: MSP430F5529

+ + + + + +
/ |
RST
+

| | | P2.0/TA1.1|--> CCR1 - 75% PWM | P2.1/TA1.2|--> CCR2 - 25% PWM

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 66 of file timer_a_ex4_pwmMultipleUpDown.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 70 of file timer_a_ex4_pwmMultipleUpDown.c.

+ +

References __no_operation(), DUTY_CYCLE1, DUTY_CYCLE2, and TIMER_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.js new file mode 100644 index 0000000..a62ac33 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c = +[ + [ "DUTY_CYCLE1", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html#abb796f001390b47f0f733ea9a08481db", null ], + [ "DUTY_CYCLE2", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html#a497fa7efc7cefe7b023b4215f48cfe2a", null ], + [ "TIMER_PERIOD", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "main", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c_source.html new file mode 100644 index 0000000..bb2274a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c_source.html @@ -0,0 +1,203 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_a/timer_a_ex4_pwmMultipleUpDown.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex4_pwmMultipleUpDown.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*******************************************************************************
+
61 //
+
62 //*****************************************************************************
+
63 
+
64 #include "driverlib.h"
+
65 
+
66 #define TIMER_PERIOD 127
+
67 #define DUTY_CYCLE1 32
+
68 #define DUTY_CYCLE2 96
+
69 
+
70 void main (void)
+
71 {
+
72  //Stop WDT
+
73  WDT_A_hold(WDT_A_BASE);
+
74 
+
75  //P2.0 and P2.1 output
+
76  //P2.0 and P2.1 options select
+
77  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
78  GPIO_PORT_P2,
+
79  GPIO_PIN0 + GPIO_PIN1
+
80  );
+
81 
+
82  //Start Timer
+
83  Timer_A_initUpDownModeParam initUpDownParam = {0};
+
84  initUpDownParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
85  initUpDownParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
86  initUpDownParam.timerPeriod = TIMER_PERIOD;
+
87  initUpDownParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
88  initUpDownParam.captureCompareInterruptEnable_CCR0_CCIE =
+
89  TIMER_A_CCIE_CCR0_INTERRUPT_DISABLE;
+
90  initUpDownParam.timerClear = TIMER_A_DO_CLEAR;
+
91  initUpDownParam.startTimer = false;
+
92  Timer_A_initUpDownMode(TIMER_A1_BASE, &initUpDownParam);
+
93 
+
94  Timer_A_startCounter( TIMER_A1_BASE,
+
95  TIMER_A_UPDOWN_MODE
+
96  );
+
97 
+
98  //Initialze compare registers to generate PWM1
+
99  Timer_A_initCompareModeParam initComp1Param = {0};
+
100  initComp1Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
+
101  initComp1Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
102  initComp1Param.compareOutputMode = TIMER_A_OUTPUTMODE_TOGGLE_SET;
+
103  initComp1Param.compareValue = DUTY_CYCLE1;
+
104  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp1Param);
+
105 
+
106  //Initialze compare registers to generate PWM2
+
107  Timer_A_initCompareModeParam initComp2Param = {0};
+
108  initComp2Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_2;
+
109  initComp2Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
110  initComp2Param.compareOutputMode = TIMER_A_OUTPUTMODE_TOGGLE_SET;
+
111  initComp2Param.compareValue = DUTY_CYCLE2;
+
112  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp2Param);
+
113 
+
114  //Enter LPM0
+
115  __bis_SR_register(LPM0_bits);
+
116 
+
117  //For debugger
+
118  __no_operation();
+
119 }
+
120 
+
#define DUTY_CYCLE2
+
void main(void)
+
#define DUTY_CYCLE1
+
#define TIMER_PERIOD
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html new file mode 100644 index 0000000..9a84420 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html @@ -0,0 +1,215 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_a/timer_a_ex5_pwmMultipleUp.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex5_pwmMultipleUp.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Macros

#define TIMER_PERIOD   511
 
#define DUTY_CYCLE1   384
 
#define DUTY_CYCLE2   128
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE1

+ +
+
+ + + + +
#define DUTY_CYCLE1   384
+
+ +

Definition at line 64 of file timer_a_ex5_pwmMultipleUp.c.

+ +
+
+ +

◆ DUTY_CYCLE2

+ +
+
+ + + + +
#define DUTY_CYCLE2   128
+
+ +

Definition at line 65 of file timer_a_ex5_pwmMultipleUp.c.

+ +
+
+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   511
+
+

This program generates two PWM outputs on P2.0,P2.1 using Timer1_A configured for up mode. The value in CCR0, 512-1, defines the PWM period and the values in CCR1 and CCR2 the PWM duty cycles. Using ~1.045MHz SMCLK as TACLK, the timer period is ~500us with a 75% duty cycle on P2.2 and 25% on P2.3. ACLK = n/a, SMCLK = MCLK = TACLK = default DCO ~1.045MHz.

+

+Tested On: MSP430F5529

+ + + + + +
/ |
RST
+

| | | P2.0/TA1.1|--> CCR1 - 75% PWM | P2.1/TA1.2|--> CCR2 - 25% PWM

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file timer_a_ex5_pwmMultipleUp.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 67 of file timer_a_ex5_pwmMultipleUp.c.

+ +

References __no_operation(), DUTY_CYCLE1, DUTY_CYCLE2, and TIMER_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.js new file mode 100644 index 0000000..223f3fc --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c = +[ + [ "DUTY_CYCLE1", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html#abb796f001390b47f0f733ea9a08481db", null ], + [ "DUTY_CYCLE2", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html#a497fa7efc7cefe7b023b4215f48cfe2a", null ], + [ "TIMER_PERIOD", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "main", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c_source.html new file mode 100644 index 0000000..d1fec9d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c_source.html @@ -0,0 +1,202 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_a/timer_a_ex5_pwmMultipleUp.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex5_pwmMultipleUp.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*******************************************************************************
+
59 //*****************************************************************************
+
60 
+
61 #include "driverlib.h"
+
62 
+
63 #define TIMER_PERIOD 511
+
64 #define DUTY_CYCLE1 384
+
65 #define DUTY_CYCLE2 128
+
66 
+
67 void main (void)
+
68 {
+
69  //Stop WDT
+
70  WDT_A_hold(WDT_A_BASE);
+
71 
+
72  //P2.0 and P2.1 output
+
73  //P2.0 and P2.1 options select
+
74  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
75  GPIO_PORT_P2,
+
76  GPIO_PIN0 + GPIO_PIN1
+
77  );
+
78 
+
79  //Start timer
+
80  Timer_A_initUpModeParam initUpParam = {0};
+
81  initUpParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
82  initUpParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
83  initUpParam.timerPeriod = TIMER_PERIOD;
+
84  initUpParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
85  initUpParam.captureCompareInterruptEnable_CCR0_CCIE =
+
86  TIMER_A_CCIE_CCR0_INTERRUPT_DISABLE;
+
87  initUpParam.timerClear = TIMER_A_DO_CLEAR;
+
88  initUpParam.startTimer = false;
+
89  Timer_A_initUpMode(TIMER_A1_BASE, &initUpParam);
+
90 
+
91  Timer_A_startCounter(TIMER_A1_BASE,
+
92  TIMER_A_UP_MODE
+
93  );
+
94 
+
95  //Initialize compare mode to generate PWM1
+
96  Timer_A_initCompareModeParam initComp1Param = {0};
+
97  initComp1Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
+
98  initComp1Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
99  initComp1Param.compareOutputMode = TIMER_A_OUTPUTMODE_RESET_SET;
+
100  initComp1Param.compareValue = DUTY_CYCLE1;
+
101  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp1Param);
+
102 
+
103  //Initialize compare mode to generate PWM2
+
104  Timer_A_initCompareModeParam initComp2Param = {0};
+
105  initComp2Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_2;
+
106  initComp2Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
107  initComp2Param.compareOutputMode = TIMER_A_OUTPUTMODE_RESET_SET;
+
108  initComp2Param.compareValue = DUTY_CYCLE2;
+
109  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp2Param);
+
110 
+
111  //Enter LPM0
+
112  __bis_SR_register(LPM0_bits);
+
113 
+
114  //For debugger
+
115  __no_operation();
+
116 }
+
117 
+
#define DUTY_CYCLE2
+
void main(void)
+
#define DUTY_CYCLE1
+
#define TIMER_PERIOD
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html new file mode 100644 index 0000000..fbb9499 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html @@ -0,0 +1,197 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_a/timer_a_ex6_upDownModeOperation.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex6_upDownModeOperation.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define TIMER_A_PERIOD   250
 
#define DUTY_CYCLE   250
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE

+ +
+
+ + + + +
#define DUTY_CYCLE   250
+
+ +

Definition at line 65 of file timer_a_ex6_upDownModeOperation.c.

+ +
+
+ +

◆ TIMER_A_PERIOD

+ +
+
+ + + + +
#define TIMER_A_PERIOD   250
+
+

Toggle P1.7 using hardware TA1.0 output. Timer1_A is configured for up/down mode with CCR0 defining period, TA1.0 also output on P1.7. In this example, CCR0 is loaded with 250 and TA1.0 will toggle P1.7 at TACLK/2*250. Thus the output frequency on P1.7 will be the TACLK/1000. No CPU or software resources required. As coded with TACLK = SMCLK, P1.7 output frequency is ~1.045M/1000. SMCLK = MCLK = TACLK = default DCO ~1.045MHz

+

+Tested On: MSP430F5529

+ + + + + +
/ |
RST
+

| | | P1.7/TA1.0|--> SMCLK/1000

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file timer_a_ex6_upDownModeOperation.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 67 of file timer_a_ex6_upDownModeOperation.c.

+ +

References __no_operation(), DUTY_CYCLE, and TIMER_A_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.js new file mode 100644 index 0000000..1fc0150 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c = +[ + [ "DUTY_CYCLE", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html#a940d0fcbbee0921e43201c554231947c", null ], + [ "TIMER_A_PERIOD", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html#ae899bfdc491d37c006b4c301d9f8e147", null ], + [ "main", "_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c_source.html new file mode 100644 index 0000000..08d2b90 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c_source.html @@ -0,0 +1,194 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_a/timer_a_ex6_upDownModeOperation.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex6_upDownModeOperation.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
59 //
+
60 //*****************************************************************************
+
61 
+
62 #include "driverlib.h"
+
63 
+
64 #define TIMER_A_PERIOD 250
+
65 #define DUTY_CYCLE 250
+
66 
+
67 void main (void)
+
68 {
+
69  //Stop WDT
+
70  WDT_A_hold(WDT_A_BASE);
+
71 
+
72  //P1.7 output
+
73  //P1.7 option select
+
74  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
75  GPIO_PORT_P1,
+
76  GPIO_PIN7
+
77  );
+
78 
+
79  //Start timer in up down mode
+
80  Timer_A_initUpDownModeParam initUpDownParam = {0};
+
81  initUpDownParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
82  initUpDownParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
83  initUpDownParam.timerPeriod = TIMER_A_PERIOD;
+
84  initUpDownParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
85  initUpDownParam.captureCompareInterruptEnable_CCR0_CCIE =
+
86  TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
87  initUpDownParam.timerClear = TIMER_A_DO_CLEAR;
+
88  initUpDownParam.startTimer = false;
+
89  Timer_A_initUpDownMode(TIMER_A1_BASE, &initUpDownParam);
+
90 
+
91  //Init compare mode
+
92  Timer_A_initCompareModeParam initCompParam = {0};
+
93  initCompParam.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_0;
+
94  initCompParam.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
95  initCompParam.compareOutputMode = TIMER_A_OUTPUTMODE_TOGGLE;
+
96  initCompParam.compareValue = DUTY_CYCLE;
+
97  Timer_A_initCompareMode(TIMER_A1_BASE, &initCompParam);
+
98 
+
99  Timer_A_startCounter(
+
100  TIMER_A1_BASE,
+
101  TIMER_A_UPDOWN_MODE
+
102  );
+
103 
+
104  //Enter LPM0
+
105  __bis_SR_register(LPM0_bits);
+
106 
+
107  //For debugger
+
108  __no_operation();
+
109 }
+
110 
+
void main(void)
+ +
#define TIMER_A_PERIOD
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html new file mode 100644 index 0000000..30ddfe4 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html @@ -0,0 +1,197 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_b/timer_b_ex1_continuousModeCCR0.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex1_continuousModeCCR0.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define COMPARE_VALUE   50000
 
+ + + + + +

+Functions

void main (void)
 
void TIMERB0_ISR (void)
 
+

Macro Definition Documentation

+ +

◆ COMPARE_VALUE

+ +
+
+ + + + +
#define COMPARE_VALUE   50000
+
+

Timer_B, Toggle P1.0, CCR0 Cont. Mode ISR, DCO SMCLK

+

Description: Toggle P1.0 using software and TB_0 ISR. Toggles every 50000 SMCLK cycles. SMCLK provides clock source for TBCLK. During the TB_0 ISR, P1.0 is toggled and 50000 clock cycles are added to CCR0. TB_0 ISR is triggered every 50000 cycles. CPU is normally off and used only during TB_ISR. ACLK = n/a, MCLK = SMCLK = TBCLK = default DCO ~1.045MHz

+

+Tested On: MSP430F5529

+ + + + + +
/ |
RST
+

| | | P1.0|-->LED

+ +

Definition at line 54 of file timer_b_ex1_continuousModeCCR0.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 56 of file timer_b_ex1_continuousModeCCR0.c.

+ +

References __no_operation(), and COMPARE_VALUE.

+ +
+
+ +

◆ TIMERB0_ISR()

+ +
+
+ + + + + + + + +
void TIMERB0_ISR (void )
+
+ +

Definition at line 102 of file timer_b_ex1_continuousModeCCR0.c.

+ +

References COMPARE_VALUE.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.js new file mode 100644 index 0000000..6a76afd --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c = +[ + [ "COMPARE_VALUE", "_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html#a655c866eb3f7ee47831709b091612e63", null ], + [ "main", "_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMERB0_ISR", "_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html#a17ea7521d47a1d5aa678bc645f70737b", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c_source.html new file mode 100644 index 0000000..e34d139 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c_source.html @@ -0,0 +1,212 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_b/timer_b_ex1_continuousModeCCR0.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex1_continuousModeCCR0.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
50 //******************************************************************************
+
51 
+
52 #include "driverlib.h"
+
53 
+
54 #define COMPARE_VALUE 50000
+
55 
+
56 void main(void)
+
57 {
+
58  //Stop WDT
+
59  WDT_A_hold(WDT_A_BASE);
+
60 
+
61  //Set P1.0 to output direction
+
62  GPIO_setAsOutputPin(
+
63  GPIO_PORT_P1,
+
64  GPIO_PIN0
+
65  );
+
66 
+
67  //Start timer in continuous mode sourced by SMCLK
+
68  Timer_B_initContinuousModeParam initContParam = {0};
+
69  initContParam.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
70  initContParam.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
71  initContParam.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_DISABLE;
+
72  initContParam.timerClear = TIMER_B_DO_CLEAR;
+
73  initContParam.startTimer = false;
+
74  Timer_B_initContinuousMode(TIMER_B0_BASE, &initContParam);
+
75 
+
76  //Initiaze compare mode
+
77  Timer_B_clearCaptureCompareInterrupt(TIMER_B0_BASE,
+
78  TIMER_B_CAPTURECOMPARE_REGISTER_0);
+
79 
+
80  Timer_B_initCompareModeParam initCompParam = {0};
+
81  initCompParam.compareRegister = TIMER_B_CAPTURECOMPARE_REGISTER_0;
+
82  initCompParam.compareInterruptEnable = TIMER_B_CAPTURECOMPARE_INTERRUPT_ENABLE;
+
83  initCompParam.compareOutputMode = TIMER_B_OUTPUTMODE_OUTBITVALUE;
+
84  initCompParam.compareValue = COMPARE_VALUE;
+
85  Timer_B_initCompareMode(TIMER_B0_BASE, &initCompParam);
+
86 
+
87  Timer_B_startCounter( TIMER_B0_BASE,
+
88  TIMER_B_CONTINUOUS_MODE
+
89  );
+
90 
+
91  __bis_SR_register(LPM0_bits + GIE); // Enter LPM0, enable interrupts
+
92  __no_operation(); // For debugger
+
93 }
+
94 
+
95 // Timer B0 interrupt service routine
+
96 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
97 #pragma vector=TIMERB0_VECTOR
+
98 __interrupt
+
99 #elif defined(__GNUC__)
+
100 __attribute__((interrupt(TIMERB0_VECTOR)))
+
101 #endif
+
102 void TIMERB0_ISR (void)
+
103 {
+
104  uint16_t compVal = Timer_B_getCaptureCompareCount(TIMER_B0_BASE,
+
105  TIMER_B_CAPTURECOMPARE_REGISTER_0)
+
106  + COMPARE_VALUE;
+
107 
+
108  GPIO_toggleOutputOnPin(
+
109  GPIO_PORT_P1,
+
110  GPIO_PIN0
+
111  );
+
112 
+
113  // Add Offset to CCR0 [Cont mode]
+
114  Timer_B_setCompareValue(TIMER_B0_BASE,
+
115  TIMER_B_CAPTURECOMPARE_REGISTER_0,
+
116  compVal
+
117  );
+
118 }
+
119 
+
void TIMERB0_ISR(void)
+
void main(void)
+
#define COMPARE_VALUE
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html new file mode 100644 index 0000000..36cf20f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html @@ -0,0 +1,172 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_b/timer_b_ex2_overflowISR.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex2_overflowISR.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void TIMERB1_ISR (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

Timer_B, Toggle P1.0, Overflow ISR, 32kHz ACLK

+

Description: Toggle P1.0 using software and the Timer_B overflow ISR. In this example an ISR triggers when TB overflows. Inside the ISR P1.0 is toggled. Toggle rate is exactly 0.25Hz = [32kHz/FFFFh]/2. Proper use of the TBIV interrupt vector generator is demonstrated. ACLK = TBCLK = 32kHz, MCLK = SMCLK = default DCO ~ 1.045MHz

+

+Tested On: MSP430F5529

+ + + + + +
/ |
RST
+

| | | P1.0|-->LED

+ +

Definition at line 51 of file timer_b_ex2_overflowISR.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ TIMERB1_ISR()

+ +
+
+ + + + + + + + +
void TIMERB1_ISR (void )
+
+ +

Definition at line 86 of file timer_b_ex2_overflowISR.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.js new file mode 100644 index 0000000..bd0029d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMERB1_ISR", "_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html#a35a1821354c82e0b10bf23a612416f1e", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c_source.html new file mode 100644 index 0000000..78fcb37 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c_source.html @@ -0,0 +1,204 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_b/timer_b_ex2_overflowISR.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex2_overflowISR.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
48 //******************************************************************************
+
49 #include "driverlib.h"
+
50 
+
51 void main(void)
+
52 {
+
53  //Stop WDT
+
54  WDT_A_hold(WDT_A_BASE);
+
55 
+
56  //Set P1.0 to output direction
+
57  GPIO_setAsOutputPin(
+
58  GPIO_PORT_P1,
+
59  GPIO_PIN0
+
60  );
+
61  Timer_B_clearTimerInterrupt(TIMER_B0_BASE);
+
62 
+
63  Timer_B_initContinuousModeParam param = {0};
+
64  param.clockSource = TIMER_B_CLOCKSOURCE_ACLK;
+
65  param.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
66  param.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_ENABLE;
+
67  param.timerClear = TIMER_B_DO_CLEAR;
+
68  param.startTimer = false;
+
69  Timer_B_initContinuousMode(TIMER_B0_BASE, &param);
+
70 
+
71  Timer_B_startCounter( TIMER_B0_BASE,
+
72  TIMER_B_CONTINUOUS_MODE
+
73  );
+
74 
+
75  __bis_SR_register(LPM3_bits + GIE); // Enter LPM3, enable interrupts
+
76  __no_operation(); // For debugger
+
77 }
+
78 
+
79 // Timer_B7 Interrupt Vector (TBIV) handler
+
80 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
81 #pragma vector=TIMER0_B1_VECTOR
+
82 __interrupt
+
83 #elif defined(__GNUC__)
+
84 __attribute__((interrupt(TIMER0_B1_VECTOR)))
+
85 #endif
+
86 void TIMERB1_ISR(void)
+
87 {
+
88  /* Any access, read or write, of the TBIV register automatically resets the
+
89  highest "pending" interrupt flag. */
+
90  switch( __even_in_range(TBIV,14) )
+
91  {
+
92  case 0: break; // No interrupt
+
93  case 2: break; // CCR1 not used
+
94  case 4: break; // CCR2 not used
+
95  case 6: break; // CCR3 not used
+
96  case 8: break; // CCR4 not used
+
97  case 10: break; // CCR5 not used
+
98  case 12: break; // CCR6 not used
+
99  case 14: // overflow
+
100  //Toggle P1.0
+
101  GPIO_toggleOutputOnPin(
+
102  GPIO_PORT_P1,
+
103  GPIO_PIN0
+
104  );
+
105 
+
106  break;
+
107  default: break;
+
108  }
+
109 }
+
void TIMERB1_ISR(void)
+
void main(void)
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.html new file mode 100644 index 0000000..0d5cf1f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.html @@ -0,0 +1,137 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_b/timer_b_ex3_pwm.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex3_pwm.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 57 of file timer_b_ex3_pwm.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.js new file mode 100644 index 0000000..cc3bc97 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c_source.html new file mode 100644 index 0000000..1c7fcf2 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c_source.html @@ -0,0 +1,212 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_b/timer_b_ex3_pwm.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex3_pwm.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Timer_B, PWM TB1-6, Up Mode, DCO SMCLK
+
34 //
+
35 // Description: This program generates two PWM outputs on P5.7/P7.4 using
+
36 // Timer_B configured for up mode. The value in CCR0, 512-1, defines the PWM
+
37 // period and the values in CCR1-2 the PWM duty cycles. Using ~1048kHz SMCLK
+
38 // as TBCLK, the timer period is ~488us.
+
39 // ACLK = 32kHz, SMCLK = MCLK = TBCLK = default DCO ~1048kHz.
+
40 //
+
41 // Tested On: MSP430F5529
+
42 // -----------------
+
43 // /|\| XIN|-
+
44 // | | | 32kHz
+
45 // --|RST XOUT|-
+
46 // | |
+
47 // | P5.7/TB0.1|--> CCR1 - 75% PWM
+
48 // | P7.4/TB0.2|--> CCR2 - 25% PWM
+
49 // | |
+
50 // | |
+
51 // | |
+
52 // | |
+
53 //
+
54 //******************************************************************************
+
55 #include "driverlib.h"
+
56 
+
57 void main(void)
+
58 {
+
59  //Stop WDT
+
60  WDT_A_hold(WDT_A_BASE);
+
61 
+
62  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
63  GPIO_PORT_P5,
+
64  GPIO_PIN7
+
65  );
+
66 
+
67  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
68  GPIO_PORT_P7,
+
69  GPIO_PIN4
+
70  );
+
71 
+
72  //Start timer
+
73  Timer_B_initUpModeParam initUpParam = {0};
+
74  initUpParam.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
75  initUpParam.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
76  initUpParam.timerPeriod = 511;
+
77  initUpParam.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_DISABLE;
+
78  initUpParam.captureCompareInterruptEnable_CCR0_CCIE =
+
79  TIMER_B_CCIE_CCR0_INTERRUPT_DISABLE;
+
80  initUpParam.timerClear = TIMER_B_DO_CLEAR;
+
81  initUpParam.startTimer = false;
+
82  Timer_B_initUpMode(TIMER_B0_BASE, &initUpParam);
+
83 
+
84  Timer_B_startCounter(TIMER_B0_BASE,
+
85  TIMER_B_UP_MODE
+
86  );
+
87 
+
88  //Initialize compare mode to generate PWM1
+
89  Timer_B_initCompareModeParam initComp1Param = {0};
+
90  initComp1Param.compareRegister = TIMER_B_CAPTURECOMPARE_REGISTER_1;
+
91  initComp1Param.compareInterruptEnable = TIMER_B_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
92  initComp1Param.compareOutputMode = TIMER_B_OUTPUTMODE_RESET_SET;
+
93  initComp1Param.compareValue = 383;
+
94  Timer_B_initCompareMode(TIMER_B0_BASE, &initComp1Param);
+
95 
+
96  //Initialize compare mode to generate PWM2
+
97  Timer_B_initCompareModeParam initComp2Param = {0};
+
98  initComp2Param.compareRegister = TIMER_B_CAPTURECOMPARE_REGISTER_2;
+
99  initComp2Param.compareInterruptEnable = TIMER_B_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
100  initComp2Param.compareOutputMode = TIMER_B_OUTPUTMODE_RESET_SET;
+
101  initComp2Param.compareValue = 128;
+
102  Timer_B_initCompareMode(TIMER_B0_BASE, &initComp2Param);
+
103 
+
104  __bis_SR_register(LPM0_bits + GIE); // CPU off
+
105 }
+
void main(void)
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html new file mode 100644 index 0000000..f1e029e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html @@ -0,0 +1,202 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_b/timer_b_ex4_upModeOperation.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex4_upModeOperation.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define TIMER_PERIOD   50000
 
+ + + + + +

+Functions

void main (void)
 
void TIMERB0_ISR (void)
 
+

Macro Definition Documentation

+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   50000
+
+

Timer_B, Toggle P1.0, CCR0 Up Mode ISR, DCO SMCLK

+

Description: Toggle P1.0 using software and TB_0 ISR. Timer_B is configured for up mode, thus the timer overflows when TBR counts to CCR0. In this example, CCR0 is loaded with 50000. ACLK = n/a, MCLK = SMCLK = TBCLK = default DCO ~1.045MHz

+

+Tested On: MSP430F5229

+ + + + + +
/ |
RST
+

| | | P1.0|-->LED

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • Timer B0
  • +
+ +

Definition at line 61 of file timer_b_ex4_upModeOperation.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 63 of file timer_b_ex4_upModeOperation.c.

+ +

References __no_operation(), param, and TIMER_PERIOD.

+ +
+
+ +

◆ TIMERB0_ISR()

+ +
+
+ + + + + + + + +
void TIMERB0_ISR (void )
+
+ +

Definition at line 106 of file timer_b_ex4_upModeOperation.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.js new file mode 100644 index 0000000..00e75a6 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c = +[ + [ "TIMER_PERIOD", "_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "main", "_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMERB0_ISR", "_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html#a17ea7521d47a1d5aa678bc645f70737b", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c_source.html new file mode 100644 index 0000000..f0a3337 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c_source.html @@ -0,0 +1,200 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_b/timer_b_ex4_upModeOperation.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex4_upModeOperation.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
58 //*****************************************************************************
+
59 #include "driverlib.h"
+
60 
+
61 #define TIMER_PERIOD 50000
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop WDT
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set P1.0 to output direction
+
69  GPIO_setAsOutputPin(
+
70  GPIO_PORT_P1,
+
71  GPIO_PIN0
+
72  );
+
73 
+
74  //Start timer
+
75  Timer_B_clearTimerInterrupt(TIMER_B0_BASE);
+
76 
+
77  Timer_B_initUpModeParam param = {0};
+
78  param.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
79  param.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
80  param.timerPeriod = TIMER_PERIOD;
+
81  param.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_DISABLE;
+
82  param.captureCompareInterruptEnable_CCR0_CCIE =
+
83  TIMER_B_CAPTURECOMPARE_INTERRUPT_ENABLE;
+
84  param.timerClear = TIMER_B_DO_CLEAR;
+
85  param.startTimer = true;
+
86  Timer_B_initUpMode(TIMER_B0_BASE, &param);
+
87 
+
88  //Enter LPM0, enable interrupts
+
89  __bis_SR_register(LPM0_bits + GIE);
+
90 
+
91  //For debugger
+ +
93 }
+
94 
+
95 //******************************************************************************
+
96 //
+
97 //This is the Timer B0 interrupt vector service routine.
+
98 //
+
99 //******************************************************************************
+
100 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
101 #pragma vector=TIMERB0_VECTOR
+
102 __interrupt
+
103 #elif defined(__GNUC__)
+
104 __attribute__((interrupt(TIMERB0_VECTOR)))
+
105 #endif
+
106 void TIMERB0_ISR (void)
+
107 {
+
108  //Toggle P1.0 using exclusive-OR
+
109  GPIO_toggleOutputOnPin(
+
110  GPIO_PORT_P1,
+
111  GPIO_PIN0
+
112  );
+
113 }
+
114 
+
void TIMERB0_ISR(void)
+
void main(void)
+
#define TIMER_PERIOD
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html new file mode 100644 index 0000000..cc93b54 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html @@ -0,0 +1,198 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_b/timer_b_ex5_singlePWM.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex5_singlePWM.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define TIMER_PERIOD   511
 
#define DUTY_CYCLE   383
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE

+ +
+
+ + + + +
#define DUTY_CYCLE   383
+
+ +

Definition at line 64 of file timer_b_ex5_singlePWM.c.

+ +
+
+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   511
+
+

Timer_B, PWM TB0.1, Up Mode, DCO SMCLK

+

Description: This program generates PWM outputs on P5.7 using Timer_B configured for up mode. The value , TIMER_PERIOD, defines the PWM period and the value DUTY_CYCLE the PWM duty cycle. Using ~1.045MHz SMCLK as TBCLK, the timer period is ~500us with a 75% duty cycle on P5.7 ACLK = n/a, SMCLK = MCLK = TBCLK = default DCO ~1.045MHz.

+

+Tested On: MSP430F5529

+ + + + + +
/ |
RST
+

| | | P5.7/TB0.1|--> CCR1 - 75% PWM | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file timer_b_ex5_singlePWM.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file timer_b_ex5_singlePWM.c.

+ +

References __no_operation(), DUTY_CYCLE, param, and TIMER_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.js new file mode 100644 index 0000000..1e298d9 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c = +[ + [ "DUTY_CYCLE", "_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html#a940d0fcbbee0921e43201c554231947c", null ], + [ "TIMER_PERIOD", "_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "main", "_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c_source.html new file mode 100644 index 0000000..208dfea --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c_source.html @@ -0,0 +1,177 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/timer_b/timer_b_ex5_singlePWM.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex5_singlePWM.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*******************************************************************************
+
59 //******************************************************************************
+
60 
+
61 #include "driverlib.h"
+
62 
+
63 #define TIMER_PERIOD 511
+
64 #define DUTY_CYCLE 383
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //P5.7 as PWM output
+
72  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
73  GPIO_PORT_P5,
+
74  GPIO_PIN7
+
75  );
+
76 
+
77  //Generate PWM - Timer runs in Up mode
+
78  Timer_B_outputPWMParam param = {0};
+
79  param.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
80  param.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
81  param.timerPeriod = TIMER_PERIOD;
+
82  param.compareRegister = TIMER_B_CAPTURECOMPARE_REGISTER_1;
+
83  param.compareOutputMode = TIMER_B_OUTPUTMODE_RESET_SET;
+
84  param.dutyCycle = DUTY_CYCLE;
+
85  Timer_B_outputPWM(TIMER_B0_BASE, &param);
+
86 
+
87  //Enter LPM0
+
88  __bis_SR_register(LPM0_bits);
+
89 
+
90  //For debugger
+ +
92 }
+
void main(void)
+
#define DUTY_CYCLE
+
#define TIMER_PERIOD
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.html new file mode 100644 index 0000000..859597e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.html @@ -0,0 +1,149 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/tlv/tlv_ex1_getDeviceType.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tlv_ex1_getDeviceType.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main ()
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

tlv - getDeviceType

+

+Tested on MSP430F5438A, MSP430FR5739

+

/|| | | | | –| | Device Type | | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT_A
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 58 of file tlv_ex1_getDeviceType.c.

+ +

References status.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.js new file mode 100644 index 0000000..c3b410f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.html#acdef7a1fd863a6d3770c1268cb06add3", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c_source.html new file mode 100644 index 0000000..1152752 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c_source.html @@ -0,0 +1,152 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/tlv/tlv_ex1_getDeviceType.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tlv_ex1_getDeviceType.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
54 //******************************************************************************
+
55 
+
56 #include "driverlib.h"
+
57 
+
58 void main()
+
59 {
+
60  //Stop WDT
+
61  WDT_A_hold(WDT_A_BASE);
+
62 
+
63  uint16_t status = TLV_getDeviceType();
+
64 
+
65 }
+
void main()
+ +
uint16_t status
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html new file mode 100644 index 0000000..b18ac38 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html @@ -0,0 +1,837 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/tlv/tlv_ex2_readTLVDescriptors.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tlv_ex2_readTLVDescriptors.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + +

+Functions

void readDieRecord (void)
 
void readADCCAL (void)
 
void readREFCAL (void)
 
void readPeripheral (void)
 
void main (void)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Variables

struct s_TLV_Die_Record * pDIEREC
 
uint8_t bDieRecord_bytes
 
uint16_t temp
 
uint32_t WaferID
 
uint16_t DieX
 
uint16_t DieY
 
uint16_t TestRes
 
struct s_TLV_ADC_Cal_Data * pADCCAL
 
uint8_t bADCCAL_bytes
 
uint16_t ADCGain
 
uint16_t ADCOffset
 
uint16_t ADC_15V_Ref_30C
 
uint16_t ADC_15V_Ref_85C
 
uint16_t ADC_20V_Ref_30C
 
uint16_t ADC_20V_Ref_85C
 
uint16_t ADC_25V_Ref_30C
 
uint16_t ADC_25V_Ref_85C
 
struct s_TLV_REF_Cal_Data * pREFCAL
 
uint8_t bREFCAL_bytes
 
uint16_t REF_15V
 
uint16_t REF_20V
 
uint16_t REF_25V
 
struct s_Peripheral_Memory_Data * pPeriph
 
uint8_t bPeriph_bytes
 
uint16_t Memory_1
 
uint16_t Memory_2
 
uint16_t Memory_3
 
uint16_t Memory_4
 
uint16_t PMM_Exist
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 90 of file tlv_ex2_readTLVDescriptors.c.

+ +

References readADCCAL(), readDieRecord(), readPeripheral(), and readREFCAL().

+ +
+
+ +

◆ readADCCAL()

+ +
+
+ + + + + + + + +
void readADCCAL (void )
+
+
+ +

◆ readDieRecord()

+ +
+
+ + + + + + + + +
void readDieRecord (void )
+
+ +

Definition at line 112 of file tlv_ex2_readTLVDescriptors.c.

+ +

References bDieRecord_bytes, DieX, DieY, pDIEREC, TestRes, and WaferID.

+ +

Referenced by main().

+ +
+
+ +

◆ readPeripheral()

+ +
+
+ + + + + + + + +
void readPeripheral (void )
+
+ +

Definition at line 193 of file tlv_ex2_readTLVDescriptors.c.

+ +

References bPeriph_bytes, Memory_1, Memory_2, Memory_3, Memory_4, PMM_Exist, and pPeriph.

+ +

Referenced by main().

+ +
+
+ +

◆ readREFCAL()

+ +
+
+ + + + + + + + +
void readREFCAL (void )
+
+ +

Definition at line 162 of file tlv_ex2_readTLVDescriptors.c.

+ +

References bREFCAL_bytes, pREFCAL, REF_15V, REF_20V, and REF_25V.

+ +

Referenced by main().

+ +
+
+

Variable Documentation

+ +

◆ ADC_15V_Ref_30C

+ +
+
+ + + + +
uint16_t ADC_15V_Ref_30C
+
+ +

Definition at line 71 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readADCCAL().

+ +
+
+ +

◆ ADC_15V_Ref_85C

+ +
+
+ + + + +
uint16_t ADC_15V_Ref_85C
+
+ +

Definition at line 71 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readADCCAL().

+ +
+
+ +

◆ ADC_20V_Ref_30C

+ +
+
+ + + + +
uint16_t ADC_20V_Ref_30C
+
+ +

Definition at line 71 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readADCCAL().

+ +
+
+ +

◆ ADC_20V_Ref_85C

+ +
+
+ + + + +
uint16_t ADC_20V_Ref_85C
+
+ +

Definition at line 72 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readADCCAL().

+ +
+
+ +

◆ ADC_25V_Ref_30C

+ +
+
+ + + + +
uint16_t ADC_25V_Ref_30C
+
+ +

Definition at line 72 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readADCCAL().

+ +
+
+ +

◆ ADC_25V_Ref_85C

+ +
+
+ + + + +
uint16_t ADC_25V_Ref_85C
+
+ +

Definition at line 72 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readADCCAL().

+ +
+
+ +

◆ ADCGain

+ +
+
+ + + + +
uint16_t ADCGain
+
+ +

Definition at line 70 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readADCCAL().

+ +
+
+ +

◆ ADCOffset

+ +
+
+ + + + +
uint16_t ADCOffset
+
+ +

Definition at line 70 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readADCCAL().

+ +
+
+ +

◆ bADCCAL_bytes

+ +
+
+ + + + +
uint8_t bADCCAL_bytes
+
+ +

Definition at line 69 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readADCCAL().

+ +
+
+ +

◆ bDieRecord_bytes

+ +
+
+ + + + +
uint8_t bDieRecord_bytes
+
+ +

Definition at line 62 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readDieRecord().

+ +
+
+ +

◆ bPeriph_bytes

+ +
+
+ + + + +
uint8_t bPeriph_bytes
+
+ +

Definition at line 81 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readPeripheral().

+ +
+
+ +

◆ bREFCAL_bytes

+ +
+
+ + + + +
uint8_t bREFCAL_bytes
+
+ +

Definition at line 76 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readREFCAL().

+ +
+
+ +

◆ DieX

+ +
+
+ + + + +
uint16_t DieX
+
+ +

Definition at line 65 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readDieRecord().

+ +
+
+ +

◆ DieY

+ +
+
+ + + + +
uint16_t DieY
+
+ +

Definition at line 65 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readDieRecord().

+ +
+
+ +

◆ Memory_1

+ +
+
+ + + + +
uint16_t Memory_1
+
+ +

Definition at line 82 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readPeripheral().

+ +
+
+ +

◆ Memory_2

+ +
+
+ + + + +
uint16_t Memory_2
+
+ +

Definition at line 82 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readPeripheral().

+ +
+
+ +

◆ Memory_3

+ +
+
+ + + + +
uint16_t Memory_3
+
+ +

Definition at line 82 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readPeripheral().

+ +
+
+ +

◆ Memory_4

+ +
+
+ + + + +
uint16_t Memory_4
+
+ +

Definition at line 82 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readPeripheral().

+ +
+
+ +

◆ pADCCAL

+ +
+
+ + + + +
struct s_TLV_ADC_Cal_Data* pADCCAL
+
+ +

Definition at line 68 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readADCCAL().

+ +
+
+ +

◆ pDIEREC

+ +
+
+ + + + +
struct s_TLV_Die_Record* pDIEREC
+
+

The contents of TLV device descriptors are read out using the TLV functions and then stored into local variables.

+

ACLK = n/a, MCLK = SMCLK = default DCO ~ 1.045MHz

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969

+

/|| XIN|- | | | –|RST XOUT|- | | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 61 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readDieRecord().

+ +
+
+ +

◆ PMM_Exist

+ +
+
+ + + + +
uint16_t PMM_Exist
+
+ +

Definition at line 83 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readPeripheral().

+ +
+
+ +

◆ pPeriph

+ +
+
+ + + + +
struct s_Peripheral_Memory_Data* pPeriph
+
+ +

Definition at line 80 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readPeripheral().

+ +
+
+ +

◆ pREFCAL

+ +
+
+ + + + +
struct s_TLV_REF_Cal_Data* pREFCAL
+
+ +

Definition at line 75 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readREFCAL().

+ +
+
+ +

◆ REF_15V

+ +
+
+ + + + +
uint16_t REF_15V
+
+ +

Definition at line 77 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readREFCAL().

+ +
+
+ +

◆ REF_20V

+ +
+
+ + + + +
uint16_t REF_20V
+
+ +

Definition at line 77 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readREFCAL().

+ +
+
+ +

◆ REF_25V

+ +
+
+ + + + +
uint16_t REF_25V
+
+ +

Definition at line 77 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readREFCAL().

+ +
+
+ +

◆ temp

+ +
+
+ + + + +
uint16_t temp
+
+ +

Definition at line 63 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ TestRes

+ +
+
+ + + + +
uint16_t TestRes
+
+ +

Definition at line 65 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readDieRecord().

+ +
+
+ +

◆ WaferID

+ +
+
+ + + + +
uint32_t WaferID
+
+ +

Definition at line 64 of file tlv_ex2_readTLVDescriptors.c.

+ +

Referenced by readDieRecord().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.js new file mode 100644 index 0000000..580696a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.js @@ -0,0 +1,37 @@ +var _m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "readADCCAL", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a49ec1ea965f4f96de6db5c4154349057", null ], + [ "readDieRecord", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a277b8de8228358f448f822ff06c1081d", null ], + [ "readPeripheral", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#ac133c16cc912dc9f57b8914d00bc0d40", null ], + [ "readREFCAL", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a96df953f49934af6a5627ce43a954ed0", null ], + [ "ADC_15V_Ref_30C", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#ad6496c498893826b78ccb83d98b6cf5a", null ], + [ "ADC_15V_Ref_85C", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#ab492e99cef6a159e96936b87160b2ed5", null ], + [ "ADC_20V_Ref_30C", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a35805d0f0c3ff649e674e6f8735f4697", null ], + [ "ADC_20V_Ref_85C", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a1b719fcb0e6399dac4fd90fdfb5a99d5", null ], + [ "ADC_25V_Ref_30C", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a56e6d1447dc2ca65a389b9781e0f1103", null ], + [ "ADC_25V_Ref_85C", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#ac8f3f1a9ad8c8814e5393227dd70e17b", null ], + [ "ADCGain", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a8dbe076fac2ca320f671e90da4fb4fd9", null ], + [ "ADCOffset", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#aa7cc130e903b7f8e1953466ff0290659", null ], + [ "bADCCAL_bytes", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a7aa9b3eed291511084e0e5393a688b12", null ], + [ "bDieRecord_bytes", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#ad86e261749772b629d805d20a771946e", null ], + [ "bPeriph_bytes", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a3330341d33215c552991fd47572e9cab", null ], + [ "bREFCAL_bytes", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#ab7240ddb5ea92d5135e32c5050de2ff1", null ], + [ "DieX", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a38c050191d2a20c9e471012609dc5fd6", null ], + [ "DieY", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#af5d5fbe727514605b6b339ee5336642b", null ], + [ "Memory_1", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a9a7d13cffdc7ca481310247ecbc8503d", null ], + [ "Memory_2", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a6cbc2699c151d4b1e17f74e1b640af3f", null ], + [ "Memory_3", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a9cec42edb0853f07e8ae719f4c688a21", null ], + [ "Memory_4", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#aadba76baaf79f2caffba458fc1a218a5", null ], + [ "pADCCAL", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#ad13c61e61e372f4c0a9d101695015fd1", null ], + [ "pDIEREC", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a90053704e55062d84fb0c5334e03c6f9", null ], + [ "PMM_Exist", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#aa3041214d28fd9b144fa40fd9d2ebd38", null ], + [ "pPeriph", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a9622441232ea724691fda7a569a558bc", null ], + [ "pREFCAL", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#af0c72d4f2c2746c13c1a15805727ed8a", null ], + [ "REF_15V", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#af27f0fffd135427c637272fa6e3e79ed", null ], + [ "REF_20V", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a99a2e86d37a080aae2c408cdfe784670", null ], + [ "REF_25V", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a89ad7c6cc666021cd62cb5cfc2d35fab", null ], + [ "temp", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a36142ddde297ed1d5577c81230997301", null ], + [ "TestRes", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a8cff184e50949393c92c035bcf85b461", null ], + [ "WaferID", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#ac60a79f85dcf288b613ac10382fc2c74", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c_source.html new file mode 100644 index 0000000..53d478d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c_source.html @@ -0,0 +1,326 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/tlv/tlv_ex2_readTLVDescriptors.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tlv_ex2_readTLVDescriptors.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
56 //*****************************************************************************
+
57 
+
58 #include "driverlib.h"
+
59 
+
60 // Die Record Variables
+
61 struct s_TLV_Die_Record * pDIEREC;
+ +
63 uint16_t temp;
+
64 uint32_t WaferID;
+
65 uint16_t DieX, DieY, TestRes;
+
66 
+
67 // ADC Variables
+
68 struct s_TLV_ADC_Cal_Data * pADCCAL;
+
69 uint8_t bADCCAL_bytes;
+
70 uint16_t ADCGain, ADCOffset;
+ + +
73 
+
74 // REF Variables
+
75 struct s_TLV_REF_Cal_Data * pREFCAL;
+
76 uint8_t bREFCAL_bytes;
+
77 uint16_t REF_15V, REF_20V, REF_25V;
+
78 
+
79 // Peripheral Variables
+
80 struct s_Peripheral_Memory_Data * pPeriph;
+
81 uint8_t bPeriph_bytes;
+ +
83 uint16_t PMM_Exist;
+
84 
+
85 void readDieRecord(void);
+
86 void readADCCAL(void);
+
87 void readREFCAL(void);
+
88 void readPeripheral(void);
+
89 
+
90 void main(void)
+
91 {
+
92  //Stop WDT
+
93  WDT_A_hold(WDT_A_BASE);
+
94 
+
95  readDieRecord();
+
96  readADCCAL();
+
97  readREFCAL();
+ +
99 
+
100  // Place breakpoint here
+
101  while(1);
+
102 }
+
103 
+
104 //******************************************************************************
+
105 //
+
106 // This function will search the TLV block for the Die Record tag and store the
+
107 // address of the first data in the block in the reference pointer passed as an
+
108 // argument. The data is then saved to local variables.
+
109 //
+
110 //******************************************************************************
+
111 
+
112 void readDieRecord(void)
+
113 {
+
114  // Read Die Record Values
+
115  TLV_getInfo(TLV_TAG_DIERECORD,
+
116  0,
+ +
118  (uint16_t **)&pDIEREC
+
119  );
+
120 
+
121  WaferID = pDIEREC->wafer_id;
+
122  DieX = pDIEREC->die_x_position;
+
123  DieY = pDIEREC->die_y_position;
+
124  TestRes = pDIEREC->test_results;
+
125 }
+
126 
+
127 //******************************************************************************
+
128 //
+
129 // This function will search the TLV block for the ADC CAL tag and store the
+
130 // address of the first data in the block in the reference pointer passed as an
+
131 // argument. The data is then saved to local variables.
+
132 //
+
133 //******************************************************************************
+
134 
+
135 void readADCCAL(void)
+
136 {
+
137  // Read ADC12 Calibration Values
+
138  TLV_getInfo(TLV_TAG_ADCCAL,
+
139  0,
+
140  &bADCCAL_bytes,
+
141  (uint16_t **)&pADCCAL
+
142  );
+
143 
+
144  ADCGain = pADCCAL->adc_gain_factor;
+
145  ADCOffset = pADCCAL->adc_offset;
+
146  ADC_15V_Ref_30C = pADCCAL->adc_ref15_30_temp;
+
147  ADC_15V_Ref_85C = pADCCAL->adc_ref15_85_temp;
+
148  ADC_20V_Ref_30C = pADCCAL->adc_ref20_30_temp;
+
149  ADC_20V_Ref_85C = pADCCAL->adc_ref20_85_temp;
+
150  ADC_25V_Ref_30C = pADCCAL->adc_ref25_30_temp;
+
151  ADC_25V_Ref_85C = pADCCAL->adc_ref25_85_temp;
+
152 }
+
153 
+
154 //******************************************************************************
+
155 //
+
156 // This function will search the TLV block for the REF CAL tag and store the
+
157 // address of the first data in the block in the reference pointer passed as an
+
158 // argument. The data is then saved to local variables.
+
159 //
+
160 //******************************************************************************
+
161 
+
162 void readREFCAL(void)
+
163 {
+
164  // Read REF Calibration Values
+
165  TLV_getInfo(TLV_TAG_REFCAL,
+
166  0,
+
167  &bREFCAL_bytes,
+
168  (uint16_t **)&pREFCAL
+
169  );
+
170 
+
171  REF_15V = pREFCAL->ref_ref15;
+
172  REF_20V = pREFCAL->ref_ref20;
+
173  REF_25V = pREFCAL->ref_ref25;
+
174 }
+
175 
+
176 //******************************************************************************
+
177 //
+
178 // The function checks for the existence of memory blocks in a device.
+
179 // This is followed by checking if the PMM module exists and is defined in the
+
180 // peripheral descriptor section.
+
181 //
+
182 // The function TLV_getInfo searches the TLV block for the Peripheral tag and
+
183 // stores the address of the first data in the block in the reference pointer
+
184 // passed as an argument. The data is then saved to local variables.
+
185 //
+
186 // The function Get_TLV_peripheral returns a non-zero value indicating the PMM
+
187 // peripheral exists TLV_getPeripheral the current device. This same procedure can be
+
188 // replicated for any peripheral that is listed in the device datasheet. The
+
189 // tag code that corresponds to each peripheral can be found in tlv.h
+
190 
+
191 //******************************************************************************
+
192 
+
193 void readPeripheral(void)
+
194 {
+
195  // Read Peripheral Memory Descriptors
+
196  TLV_getInfo(TLV_TAG_PDTAG,
+
197  0,
+
198  &bPeriph_bytes,
+
199  (uint16_t **)&pPeriph
+
200  );
+
201 
+
202  Memory_1 = pPeriph->memory_1;
+
203  Memory_2 = pPeriph->memory_2;
+
204  Memory_3 = pPeriph->memory_3;
+
205  Memory_4 = pPeriph->memory_4;
+
206 
+
207  // Read PMM Descriptor to Show its Availability
+
208  PMM_Exist = TLV_getPeripheral(TLV_PID_PMM, 0);
+
209 }
+
uint16_t ADC_20V_Ref_85C
+
void readDieRecord(void)
+
uint8_t bPeriph_bytes
+
uint16_t ADC_20V_Ref_30C
+
uint16_t temp
+
uint16_t DieX
+
void readADCCAL(void)
+
uint16_t ADC_25V_Ref_30C
+
void main(void)
+
uint16_t Memory_2
+
uint8_t bADCCAL_bytes
+
uint16_t REF_25V
+
uint16_t TestRes
+
uint16_t ADCGain
+
struct s_TLV_Die_Record * pDIEREC
+
struct s_Peripheral_Memory_Data * pPeriph
+
void readREFCAL(void)
+
uint16_t REF_20V
+
uint16_t Memory_1
+
uint16_t Memory_3
+
uint16_t PMM_Exist
+
uint16_t ADCOffset
+
uint16_t Memory_4
+
uint16_t ADC_15V_Ref_85C
+
uint8_t bREFCAL_bytes
+
void readPeripheral(void)
+
uint32_t WaferID
+
uint16_t ADC_25V_Ref_85C
+
struct s_TLV_ADC_Cal_Data * pADCCAL
+
uint16_t ADC_15V_Ref_30C
+
uint8_t bDieRecord_bytes
+
struct s_TLV_REF_Cal_Data * pREFCAL
+
uint16_t REF_15V
+
uint16_t DieY
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html new file mode 100644 index 0000000..75783f8 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html @@ -0,0 +1,352 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/tlv/tlv_ex3_calibrateTempSensor.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tlv_ex3_calibrateTempSensor.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Functions

void calibrateADC (void)
 
void main (void)
 
void ADC12ISR (void)
 
+ + + + + + + + + + + + + + + +

+Variables

uint16_t temp
 
volatile float DegF
 
volatile float DegC
 
float mref
 
float nref
 
uint8_t bADCCAL_bytes
 
struct s_TLV_ADC_Cal_Data * pADCCAL
 
+

Function Documentation

+ +

◆ ADC12ISR()

+ +
+
+ + + + + + + + +
void ADC12ISR (void )
+
+ +

Definition at line 208 of file tlv_ex3_calibrateTempSensor.c.

+ +

References __bic_SR_register_on_exit(), and temp.

+ +
+
+ +

◆ calibrateADC()

+ +
+
+ + + + + + + + +
void calibrateADC (void )
+
+ +

Definition at line 127 of file tlv_ex3_calibrateTempSensor.c.

+ +

References __delay_cycles(), bADCCAL_bytes, mref, nref, pADCCAL, and param.

+ +

Referenced by main().

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 93 of file tlv_ex3_calibrateTempSensor.c.

+ +

References __no_operation(), calibrateADC(), DegC, DegF, mref, nref, and temp.

+ +
+
+

Variable Documentation

+ +

◆ bADCCAL_bytes

+ +
+
+ + + + +
uint8_t bADCCAL_bytes
+
+ +

Definition at line 78 of file tlv_ex3_calibrateTempSensor.c.

+ +

Referenced by calibrateADC().

+ +
+
+ +

◆ DegC

+ +
+
+ + + + +
volatile float DegC
+
+ +

Definition at line 76 of file tlv_ex3_calibrateTempSensor.c.

+ +

Referenced by main().

+ +
+
+ +

◆ DegF

+ +
+
+ + + + +
volatile float DegF
+
+ +

Definition at line 75 of file tlv_ex3_calibrateTempSensor.c.

+ +

Referenced by main().

+ +
+
+ +

◆ mref

+ +
+
+ + + + +
float mref
+
+ +

Definition at line 77 of file tlv_ex3_calibrateTempSensor.c.

+ +

Referenced by calibrateADC(), and main().

+ +
+
+ +

◆ nref

+ +
+
+ + + + +
float nref
+
+ +

Definition at line 77 of file tlv_ex3_calibrateTempSensor.c.

+ +

Referenced by calibrateADC(), and main().

+ +
+
+ +

◆ pADCCAL

+ +
+
+ + + + +
struct s_TLV_ADC_Cal_Data* pADCCAL
+
+ +

Definition at line 79 of file tlv_ex3_calibrateTempSensor.c.

+ +

Referenced by calibrateADC().

+ +
+
+ +

◆ temp

+ +
+
+ + + + +
uint16_t temp
+
+

TLV - Sample Calibrated A10 Internal Temp Sensor as Input, AVcc Ref

+

After initialization, the the calibration constants for the unit are read in through the TLV. A single sample is made on A10 with reference to internal 1.5V Vref. Software sets ADC12SC to start sample and conversion - ADC12SC automatically cleared at EOC. ADC12 internal oscillator times sample and conversion. In Mainloop MSP430 waits in LPM4 to save power until ADC10 conversion complete, ADC12_A_ISR will force exit from any LPMx in Mainloop on reti.

+

The results of the temperature sense can be viewed in the watch window by watching the variables DegC and DegF

+

ACLK = n/a, MCLK = SMCLK = default DCO ~ 1.045MHz, ADC12CLK = ADC12OSC

+
           MSP430F5438A
+        -----------------
+    /|\|                 |
+     | |                 |
+     --|RST              |
+       |Temp Sensor-->A10|
+       |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC12 peripheral
  • +
  • A10
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • ADC12_A_VECTOR
  • +
+ +

Definition at line 74 of file tlv_ex3_calibrateTempSensor.c.

+ +

Referenced by ADC12ISR(), and main().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.js new file mode 100644 index 0000000..5f7faa7 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.js @@ -0,0 +1,13 @@ +var _m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c = +[ + [ "ADC12ISR", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#ae0194f6cfda5bea946ec788350bcc32c", null ], + [ "calibrateADC", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#a0b3380f399a29ee713eff84ccc3e63ed", null ], + [ "main", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "bADCCAL_bytes", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#a7aa9b3eed291511084e0e5393a688b12", null ], + [ "DegC", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#ae2c5ba4879be8505b366623576465d6f", null ], + [ "DegF", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#a2ae78c37216c42fbff18911fc5f94486", null ], + [ "mref", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#aa78b10a9eddb4a2e29fd41ac0e14dfdf", null ], + [ "nref", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#ad8613314420046e0ca1c455de439f76a", null ], + [ "pADCCAL", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#ad13c61e61e372f4c0a9d101695015fd1", null ], + [ "temp", "_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#a36142ddde297ed1d5577c81230997301", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c_source.html new file mode 100644 index 0000000..248481f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c_source.html @@ -0,0 +1,322 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/tlv/tlv_ex3_calibrateTempSensor.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tlv_ex3_calibrateTempSensor.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
70 //******************************************************************************
+
71 
+
72 #include "driverlib.h"
+
73 
+
74 uint16_t temp;
+
75 volatile float DegF;
+
76 volatile float DegC;
+
77 float mref, nref;
+
78 uint8_t bADCCAL_bytes;
+
79 struct s_TLV_ADC_Cal_Data * pADCCAL;
+
80 
+
81 //******************************************************************************
+
82 //
+
83 // This function will initialize and calibrate ADC for temperature sensing.
+
84 // The embedded function call of Get_TLV_Info searches the TLV block of data
+
85 // (defined in the device header file) for the ADC calibration block, then
+
86 // returns the address of the first data descriptor to the pointer passed into
+
87 // it. The slope and offset of the corrected temperature curve are then
+
88 // calculated for temperature calibration purposes.
+
89 //
+
90 //******************************************************************************
+
91 void calibrateADC(void);
+
92 
+
93 void main (void)
+
94 {
+
95  //Stop Watchdog Timer
+
96  WDT_A_hold(WDT_A_BASE);
+
97 
+
98  calibrateADC();
+
99 
+
100  while (1)
+
101  {
+
102  //Enable/Start first sampling and conversion cycle
+
103  /*
+
104  * Base address of ADC12 Module
+
105  * Start the conversion into memory buffer 0
+
106  * Use the repeated sequence of channels
+
107  */
+
108  ADC12_A_startConversion(ADC12_A_BASE,
+
109  ADC12_A_MEMORY_0,
+
110  ADC12_A_SEQOFCHANNELS);
+
111 
+
112  //LPM0 with interrupts enabled
+
113  __bis_SR_register(LPM4_bits + GIE);
+
114  __no_operation();
+
115 
+
116  //Temperature in Celsius
+
117  DegC = (temp - nref) / mref;
+
118 
+
119  //Temperature in Fahrenheit
+
120  DegF = (9*DegC)/5 + 32;
+
121 
+
122  //SET BREAKPOINT HERE and watch IntDegC and IntDegF
+
123  __no_operation();
+
124  }
+
125 }
+
126 
+
127 void calibrateADC(void)
+
128 {
+
129  //Initialize the ADC12 Module
+
130  /*
+
131  * Base Address of ADC12 Module
+
132  * Use internal ADC12 bit as sample/hold signal to start conversion
+
133  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
134  * Use default clock divider of 1
+
135  */
+
136  ADC12_A_init(ADC12_A_BASE,
+
137  ADC12_A_SAMPLEHOLDSOURCE_SC,
+
138  ADC12_A_CLOCKSOURCE_ADC12OSC,
+
139  ADC12_A_CLOCKDIVIDER_1);
+
140 
+
141  ADC12_A_enable(ADC12_A_BASE);
+
142 
+
143  /*
+
144  * Base Address of ADC12 Module
+
145  * For memory buffers 0-7 sample/hold for 256 clock cycles
+
146  * For memory buffers 8-15 sample/hold for 4 clock cycles (default)
+
147  * Disable Multiple Sampling
+
148  */
+
149  ADC12_A_setupSamplingTimer(ADC12_A_BASE,
+
150  ADC12_A_CYCLEHOLD_256_CYCLES,
+
151  ADC12_A_CYCLEHOLD_4_CYCLES,
+
152  ADC12_A_MULTIPLESAMPLESDISABLE);
+
153 
+
154  //Configure Memory Buffer
+
155  /*
+
156  * Base Addres of ADC12 Module
+
157  * Configure memory buffer 0
+
158  * Map temp sensor to memory buffer 0
+
159  * Vref+ = Vref+ (int)
+
160  * Vref- = AVss
+
161  * Memory buffer 0 is not the end of a sequence
+
162  */
+
163  ADC12_A_configureMemoryParam param = {0};
+
164  param.memoryBufferControlIndex = ADC12_A_MEMORY_0;
+
165  param.inputSourceSelect = ADC12_A_INPUT_TEMPSENSOR;
+
166  param.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_INT;
+
167  param.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
+
168  param.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;
+
169  ADC12_A_configureMemory(ADC12_A_BASE ,&param);
+
170 
+
171 
+
172  //Enable memory buffer 0 interrupt
+
173  ADC12_A_clearInterrupt(ADC12_A_BASE,
+
174  ADC12IFG0);
+
175  ADC12_A_enableInterrupt(ADC12_A_BASE,
+
176  ADC12IE0);
+
177 
+
178  //Configure internal reference
+
179  //If ref generator busy, WAIT
+
180  while ( REF_ACTIVE == Ref_isRefGenBusy(REF_BASE) ) ;
+
181  //Select internal ref = 1.5V
+
182  Ref_setReferenceVoltage(REF_BASE,
+
183  REF_VREF1_5V);
+
184  //Internal Reference ON
+
185  Ref_enableReferenceVoltage(REF_BASE);
+
186 
+
187  //Delay (~75us) for Ref to settle
+
188  __delay_cycles(75);
+
189 
+
190  // TLV access Function Call
+
191  TLV_getInfo(TLV_TAG_ADCCAL,
+
192  0,
+
193  &bADCCAL_bytes,
+
194  (uint16_t **)&pADCCAL
+
195  );
+
196 
+
197  mref = ((float)
+
198  (pADCCAL->adc_ref15_85_temp-pADCCAL->adc_ref15_30_temp))/(85-30);
+
199  nref = pADCCAL->adc_ref15_85_temp-mref*85;
+
200 }
+
201 
+
202 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
203 #pragma vector=ADC12_VECTOR
+
204 __interrupt
+
205 #elif defined(__GNUC__)
+
206 __attribute__((interrupt(ADC12_VECTOR)))
+
207 #endif
+
208 void ADC12ISR (void)
+
209 {
+
210  switch (__even_in_range(ADC12IV,34)){
+
211  case 0: break; //Vector 0: No interrupt
+
212  case 2: break; //Vector 2: ADC overflow
+
213  case 4: break; //Vector 4: ADC timing overflow
+
214  case 6: //Vector 6: ADC12IFG0
+
215  //Move results, IFG is cleared
+
216  temp = ADC12_A_getResults(ADC12_A_BASE,
+
217  ADC12_A_MEMORY_0);
+
218 
+
219  //Exit active CPU
+
220  __bic_SR_register_on_exit(LPM4_bits);
+
221  break;
+
222  case 8: break; //Vector 8: ADC12IFG1
+
223  case 10: break; //Vector 10: ADC12IFG2
+
224  case 12: break; //Vector 12: ADC12IFG3
+
225  case 14: break; //Vector 14: ADC12IFG4
+
226  case 16: break; //Vector 16: ADC12IFG5
+
227  case 18: break; //Vector 18: ADC12IFG6
+
228  case 20: break; //Vector 20: ADC12IFG7
+
229  case 22: break; //Vector 22: ADC12IFG8
+
230  case 24: break; //Vector 24: ADC12IFG9
+
231  case 26: break; //Vector 26: ADC12IFG10
+
232  case 28: break; //Vector 28: ADC12IFG11
+
233  case 30: break; //Vector 30: ADC12IFG12
+
234  case 32: break; //Vector 32: ADC12IFG13
+
235  case 34: break; //Vector 34: ADC12IFG14
+
236  default: break;
+
237  }
+
238 }
+
239 
+
void calibrateADC(void)
+
volatile float DegF
+
uint16_t temp
+
void main(void)
+
uint8_t bADCCAL_bytes
+ +
struct s_TLV_ADC_Cal_Data * pADCCAL
+ +
void ADC12ISR(void)
+
volatile float DegC
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html new file mode 100644 index 0000000..e4eb600 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html @@ -0,0 +1,181 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/wdt_a/wdt_a_ex1_intervalSMCLK.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
wdt_a_ex1_intervalSMCLK.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void WDT_A_ISR (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

WDT - Toggle P1.0, Interval Overflow ISR, DCO SMCLK

+

Toggle P1.0 using software timed by the WDT ISR. Toggle rate is approx. 30ms = {(default DCO 1.045MHz) / 32768} based on default DCO = SMCLK clock source used in this example for the WDT. ACLK = n/a, MCLK = SMCLK = default DCO ~1.045MHz

+

+Tested On: MSP430F5529,MSP430FR5739

+ + + + + + + +
/ |
RST
P1.0 -->LED
+

| |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • WDT_A_VECTOR
  • +
+ +

Definition at line 62 of file wdt_a_ex1_intervalSMCLK.c.

+ +

References __no_operation().

+ +
+
+ +

◆ WDT_A_ISR()

+ +
+
+ + + + + + + + +
void WDT_A_ISR (void )
+
+ +

Definition at line 95 of file wdt_a_ex1_intervalSMCLK.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js new file mode 100644 index 0000000..b33bfe0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "WDT_A_ISR", "_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html#afa209a204489cffc3a47f48db05b9713", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c_source.html new file mode 100644 index 0000000..1d2e9bd --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c_source.html @@ -0,0 +1,185 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/wdt_a/wdt_a_ex1_intervalSMCLK.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
wdt_a_ex1_intervalSMCLK.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
59 //******************************************************************************
+
60 #include "driverlib.h"
+
61 
+
62 void main (void)
+
63 {
+
64  //Initialize WDT module in timer interval mode,
+
65  //with SMCLK as source at an interval of 32 ms.
+
66  WDT_A_initIntervalTimer(WDT_A_BASE,
+
67  WDT_A_CLOCKSOURCE_SMCLK,
+
68  WDT_A_CLOCKDIVIDER_32K);
+
69 
+
70  WDT_A_start(WDT_A_BASE);
+
71 
+
72  //Enable Watchdog Interupt
+
73  SFR_clearInterrupt(SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT);
+
74  SFR_enableInterrupt(SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT);
+
75 
+
76  //Set P1.0 to output direction
+
77  GPIO_setAsOutputPin(
+
78  GPIO_PORT_P1,
+
79  GPIO_PIN0
+
80  );
+
81 
+
82  //Enter LPM0, enable interrupts
+
83  __bis_SR_register(LPM0_bits + GIE);
+
84  //For debugger
+ +
86 }
+
87 
+
88 //Watchdog Timer interrupt service routine
+
89 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
90 #pragma vector=WDT_VECTOR
+
91 __interrupt
+
92 #elif defined(__GNUC__)
+
93 __attribute__((interrupt(WDT_VECTOR)))
+
94 #endif
+
95 void WDT_A_ISR (void)
+
96 {
+
97  //Toggle P1.0
+
98  GPIO_toggleOutputOnPin(
+
99  GPIO_PORT_P1,
+
100  GPIO_PIN0);
+
101 }
+
102 
+
void main(void)
+
void WDT_A_ISR(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html new file mode 100644 index 0000000..b8f41ad --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html @@ -0,0 +1,181 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/wdt_a/wdt_a_ex2_intervalACLK.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
wdt_a_ex2_intervalACLK.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void WDT_A_ISR (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

WDT - Toggle P1.0, Interval Overflow ISR, 32kHz ACLK

+

Toggle P1.0 using software timed by WDT ISR. Toggle rate is exactly 250ms based on 32kHz ACLK WDT clock source. In this example the WDT is configured to divide 32768 watch-crystal(2^15) by 2^13 with an ISR triggered @ 4Hz = [WDT CLK source/32768]. ACLK = REFO , MCLK = SMCLK = default DCO ~1.045MHz

+

+Tested On: MSP430F5529,MSP430FR5739

+ + + + + + + +
/ |
RST
P1.0 -->LED
+

| |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • WDT_A_VECTOR
  • +
+ +

Definition at line 63 of file wdt_a_ex2_intervalACLK.c.

+ +

References __no_operation().

+ +
+
+ +

◆ WDT_A_ISR()

+ +
+
+ + + + + + + + +
void WDT_A_ISR (void )
+
+ +

Definition at line 96 of file wdt_a_ex2_intervalACLK.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js new file mode 100644 index 0000000..2bfc50b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "WDT_A_ISR", "_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html#afa209a204489cffc3a47f48db05b9713", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c_source.html new file mode 100644 index 0000000..3687947 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c_source.html @@ -0,0 +1,185 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/wdt_a/wdt_a_ex2_intervalACLK.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
wdt_a_ex2_intervalACLK.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Initialize WDT module in timer interval mode,
+
66  //with ACLK as source at an interval of 250 ms.
+
67  WDT_A_initIntervalTimer(WDT_A_BASE,
+
68  WDT_A_CLOCKSOURCE_ACLK,
+
69  WDT_A_CLOCKDIVIDER_8192);
+
70 
+
71  WDT_A_start(WDT_A_BASE);
+
72 
+
73  //Enable Watchdog Interupt
+
74  SFR_clearInterrupt(SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT);
+
75  SFR_enableInterrupt(SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT);
+
76 
+
77  //Set P1.0 to output direction
+
78  GPIO_setAsOutputPin(
+
79  GPIO_PORT_P1,
+
80  GPIO_PIN0
+
81  );
+
82 
+
83  //Enter LPM3, enable interrupts
+
84  __bis_SR_register(LPM3_bits + GIE);
+
85  //For debugger
+ +
87 }
+
88 
+
89 //Watchdog Timer interrupt service routine
+
90 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
91 #pragma vector=WDT_VECTOR
+
92 __interrupt
+
93 #elif defined(__GNUC__)
+
94 __attribute__((interrupt(WDT_VECTOR)))
+
95 #endif
+
96 void WDT_A_ISR (void)
+
97 {
+
98  //Toggle P1.0
+
99  GPIO_toggleOutputOnPin(
+
100  GPIO_PORT_P1,
+
101  GPIO_PIN0);
+
102 }
+
103 
+
void main(void)
+
void WDT_A_ISR(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html new file mode 100644 index 0000000..17f114a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html @@ -0,0 +1,159 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/wdt_a/wdt_a_ex3_watchdogACLK.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
wdt_a_ex3_watchdogACLK.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

WDT - Failsafe Clock, 10KHz VLOCLK

+

Configure WDT in watchdog to timeout sourced by ACLK. LPM3 is entered. This example will demonstrate WDT fail-safe feature by automatically selecting VLOCLK as WDT clock source if ACLK fails. Watchdog timeout will toggle on P1.0 every 3 seconds in main function. VLOCLK = 10KHZ, ACLK = 32768, MCLK = SMCLK = default DCO ~1.045MHz

+

+Tested On: MSP430F5529,MSP430FR5739

+ + + + + + + +
/ |
RST
P1.0 -->LED
+

| |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 63 of file wdt_a_ex3_watchdogACLK.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js new file mode 100644 index 0000000..087afbe --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c = +[ + [ "main", "_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c_source.html b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c_source.html new file mode 100644 index 0000000..d7ebb89 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c_source.html @@ -0,0 +1,172 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/wdt_a/wdt_a_ex3_watchdogACLK.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
wdt_a_ex3_watchdogACLK.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Watchdog mode -> reset after expired time
+
66  //WDT is clocked by VLOCLK since ALCK is failed without initialization
+
67  //Set Watchdog Timer timeout 3s - SET BREAKPOINT HERE
+
68  WDT_A_initWatchdogTimer(WDT_A_BASE,
+
69  WDT_A_CLOCKSOURCE_ACLK,
+
70  WDT_A_CLOCKDIVIDER_32K);
+
71 
+
72  WDT_A_start(WDT_A_BASE);
+
73 
+
74  //Set P1.0 to output direction
+
75  GPIO_setAsOutputPin(
+
76  GPIO_PORT_P1,
+
77  GPIO_PIN0
+
78  );
+
79 
+
80  //Toggle P1.0
+
81  GPIO_toggleOutputOnPin(
+
82  GPIO_PORT_P1,
+
83  GPIO_PIN0
+
84  );
+
85 
+
86  //Enter LPM3
+
87  __bis_SR_register(LPM3_bits + GIE);
+
88  //For debugger
+ +
90 }
+
91 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2crc_2crc__ex1__build_signature_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2crc_2crc__ex1__build_signature_8c.html new file mode 100644 index 0000000..7a2e323 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2crc_2crc__ex1__build_signature_8c.html @@ -0,0 +1,159 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/crc/crc_ex1_buildSignature.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
crc_ex1_buildSignature.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

CRC - Build Signature and Rebuild to test.

+

The CRC is first used to build a signature using a seed and multiple data values. This signature is considered as the checksum and can be sent by a UART connection along with the data to verify the correct data has been sent. The second half of this program is used to test the CRC checksum of the data that has been created, by recreating the same checksum and comparing it to the first checksum. If the two checksum are equal, then P1.0 is set and the LED is turned on. Breakpoints can be set before the CRC_setData() function to observe the CRC register values and see the subsequent signatures before/after each data set.

+

+Tested On: MSP430F5529,MSP430FR5739

+ + + + + + + +
/ |
RST
P1.0 --> LED
+

| |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • CRC peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 69 of file crc_ex1_buildSignature.c.

+ +

References __no_operation(), GPIO_setOutputHighOnPin(), and i.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2crc_2crc__ex1__build_signature_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2crc_2crc__ex1__build_signature_8c.js new file mode 100644 index 0000000..b22e6fe --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2crc_2crc__ex1__build_signature_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2crc_2crc__ex1__build_signature_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2crc_2crc__ex1__build_signature_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2crc_2crc__ex1__build_signature_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2crc_2crc__ex1__build_signature_8c_source.html new file mode 100644 index 0000000..23cfccc --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2crc_2crc__ex1__build_signature_8c_source.html @@ -0,0 +1,206 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/crc/crc_ex1_buildSignature.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
crc_ex1_buildSignature.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
65 //******************************************************************************
+
66 
+
67 #include "driverlib.h"
+
68 
+
69 void main (void)
+
70 {
+
71  uint16_t crcSeed = 0xBEEF;
+
72  uint16_t data[] = {0x0123,
+
73  0x4567,
+
74  0x8910,
+
75  0x1112,
+
76  0x1314};
+
77  uint16_t crcResult;
+
78  uint8_t i;
+
79 
+
80  //Stop WDT
+
81  WDT_A_hold(WDT_A_BASE);
+
82 
+
83  //Set P1.0 as an output
+
84  GPIO_setAsOutputPin(
+
85  GPIO_PORT_P1,
+
86  GPIO_PIN0);
+
87 
+
88  //Set the CRC seed
+
89  CRC_setSeed(CRC_BASE,
+
90  crcSeed);
+
91 
+
92  for (i = 0; i < 5; i++)
+
93  {
+
94  //Add all of the values into the CRC signature
+
95  CRC_set16BitData(CRC_BASE,
+
96  data[i]);
+
97  }
+
98 
+
99  //Save the current CRC signature checksum to be compared for later
+
100  crcResult = CRC_getResult(CRC_BASE);
+
101 
+
102 
+
103  //*** Test the CRC ***//
+
104 
+
105  //Reset the CRC Signature and set the same seed
+
106  CRC_setSeed(CRC_BASE,
+
107  crcSeed);
+
108 
+
109  for (i = 0; i < 5; i++)
+
110  {
+
111  //Add all of the values into the CRC signature
+
112  CRC_set16BitData(CRC_BASE,
+
113  data[i]);
+
114  }
+
115 
+
116  //Compare the 2 CRC Resulting Signature Checksums
+
117  if (crcResult == CRC_getResult(CRC_BASE)){
+
118  //set P1.0
+ +
120  GPIO_PORT_P1,
+
121  GPIO_PIN0);
+
122  }
+
123 
+
124  //Enter LPM4, interrupts enabled
+
125  __bis_SR_register(LPM4_bits);
+
126  __no_operation();
+
127 }
+
128 
+
void main(void)
+ + +
__no_operation()
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html new file mode 100644 index 0000000..0a4538d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html @@ -0,0 +1,220 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_a_spi/eusci_a_spi_ex1_master.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_a_spi_ex1_master.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCI_A0_ISR (void)
 
+ + + + + +

+Variables

uint8_t RXData = 0
 
uint8_t TXData = 0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 80 of file eusci_a_spi_ex1_master.c.

+ +

References __delay_cycles(), __no_operation(), i, param, and TXData.

+ +
+
+ +

◆ USCI_A0_ISR()

+ +
+
+ + + + + + + + +
void USCI_A0_ISR (void )
+
+ +

Definition at line 171 of file eusci_a_spi_ex1_master.c.

+ +

References __delay_cycles(), RXData, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData = 0
+
+

USCI_A0, SPI 3-Wire Master Incremented Data This example shows how SPI master talks to SPI slave using 3-wire mode. Incrementing data is sent by the master starting at 0x01. Received data is expected to be same as the previous transmission. eUSCI RX ISR is used to handle communication with the CPU, normally in LPM0. If high, P1.0 indicates valid data reception. Because all execution after LPM0 is in ISRs, initialization waits for DCO to stabilize against SMCLK. MCLK = SMCLK = ACLK = ~32.768kHz

+

Use with SPI Slave Data Echo code example. If slave is in debug mode, P1.1 slave reset signal conflicts with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.

    Tested on  MSP430FR4133
+            -----------------
+       /|\ |                 |
+        |  |                 |
+

Master—+->|RST | | | | P1.0|-> Data Out (UCA0SIMO) | | | P1.1|<- Data In (UCA0SOMI) | | | P1.2|-> Serial Clock Out (UCA0CLK)

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • SPI peripheral
  • +
  • GPIO Port peripheral (for SPI pins)
  • +
  • UCA0SIMO
  • +
  • UCA0SOMI
  • +
  • UCA0CLK
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_A0_VECTOR
  • +
+ +

Definition at line 77 of file eusci_a_spi_ex1_master.c.

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 78 of file eusci_a_spi_ex1_master.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.js new file mode 100644 index 0000000..2d2efd1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCI_A0_ISR", "_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html#a7d5728ccc412d2d610500fa338c2d003", null ], + [ "RXData", "_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html#a597ef8ed788642728c57f66b3a21544f", null ], + [ "TXData", "_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c_source.html new file mode 100644 index 0000000..561a38c --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c_source.html @@ -0,0 +1,270 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_a_spi/eusci_a_spi_ex1_master.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_a_spi_ex1_master.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*****************************************************************************
+
74 //*****************************************************************************
+
75 #include "driverlib.h"
+
76 
+
77 uint8_t RXData = 0;
+
78 uint8_t TXData = 0;
+
79 
+
80 void main(void)
+
81 {
+
82  volatile uint16_t i;
+
83 
+
84  //Stop watchdog timer
+
85  WDT_A_hold(WDT_A_BASE);
+
86 
+
87  // Configure Pins for XIN
+
88  //Set P4.1 and P4.2 as Module Function Input.
+
89  /*
+
90 
+
91  * Select Port 4
+
92  * Set Pin 1, 2 to input Module Function, (XIN).
+
93  */
+
94  GPIO_setAsPeripheralModuleFunctionInputPin(
+
95  GPIO_PORT_P4,
+
96  GPIO_PIN1 + GPIO_PIN2,
+
97  GPIO_PRIMARY_MODULE_FUNCTION
+
98  );
+
99 
+
100  //Set external frequency for XT1
+
101  CS_setExternalClockSource(32768);
+
102 
+
103  //Select XT1 as the clock source for SMCLK with no frequency divider
+
104  CS_initClockSignal(CS_SMCLK, CS_XT1CLK_SELECT, CS_CLOCK_DIVIDER_1);
+
105 
+
106  //Start XT1 with no time out
+
107  CS_turnOnXT1(CS_XT1_DRIVE_0);
+
108 
+
109  // Configure SPI Pins for UCA0CLK, UCA0TXD/UCA0SIMO and UCA0RXD/UCA0SOMI
+
110  /*
+
111  * Select Port 1
+
112  * Set Pin 0, Pin 1 and Pin 2 to input Secondary Module Function
+
113  */
+
114  GPIO_setAsPeripheralModuleFunctionInputPin(
+
115  GPIO_PORT_P1,
+
116  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2,
+
117  GPIO_PRIMARY_MODULE_FUNCTION
+
118  );
+
119 
+
120  /*
+
121  * Disable the GPIO power-on default high-impedance mode to activate
+
122  * previously configured port settings
+
123  */
+
124  PMM_unlockLPM5();
+
125 
+
126  //Initialize Master
+
127  EUSCI_A_SPI_initMasterParam param = {0};
+
128  param.selectClockSource = EUSCI_A_SPI_CLOCKSOURCE_SMCLK;
+
129  param.clockSourceFrequency = CS_getSMCLK();
+
130  param.desiredSpiClock = 500000;
+
131  param.msbFirst = EUSCI_A_SPI_MSB_FIRST;
+
132  param.clockPhase = EUSCI_A_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
+
133  param.clockPolarity = EUSCI_A_SPI_CLOCKPOLARITY_INACTIVITY_HIGH;
+
134  param.spiMode = EUSCI_A_SPI_3PIN;
+
135  EUSCI_A_SPI_initMaster(EUSCI_A0_BASE, &param);
+
136 
+
137  //Enable SPI module
+
138  EUSCI_A_SPI_enable(EUSCI_A0_BASE);
+
139 
+
140  //Clear receive interrupt flag
+
141  EUSCI_A_SPI_clearInterrupt(EUSCI_A0_BASE,
+
142  EUSCI_A_SPI_RECEIVE_INTERRUPT
+
143  );
+
144 
+
145  // Enable USCI_A0 RX interrupt
+
146  EUSCI_A_SPI_enableInterrupt(EUSCI_A0_BASE,
+
147  EUSCI_A_SPI_RECEIVE_INTERRUPT);
+
148 
+
149  //Wait for slave to initialize
+
150  __delay_cycles(100);
+
151 
+
152  TXData = 0x1; // Holds TX data
+
153 
+
154  //USCI_A0 TX buffer ready?
+
155  while (!EUSCI_A_SPI_getInterruptStatus(EUSCI_A0_BASE,
+
156  EUSCI_A_SPI_TRANSMIT_INTERRUPT)) ;
+
157 
+
158  //Transmit Data to slave
+
159  EUSCI_A_SPI_transmitData(EUSCI_A0_BASE, TXData);
+
160 
+
161  __bis_SR_register(LPM0_bits + GIE); // CPU off, enable interrupts
+
162  __no_operation(); // Remain in LPM0
+
163 }
+
164 
+
165 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
166 #pragma vector=USCI_A0_VECTOR
+
167 __interrupt
+
168 #elif defined(__GNUC__)
+
169 __attribute__((interrupt(USCI_A0_VECTOR)))
+
170 #endif
+
171 void USCI_A0_ISR(void)
+
172 {
+
173  switch(__even_in_range(UCA0IV, USCI_SPI_UCTXIFG))
+
174  {
+
175  case USCI_SPI_UCRXIFG: // UCRXIFG
+
176  //USCI_A0 TX buffer ready?
+
177  while (!EUSCI_A_SPI_getInterruptStatus(EUSCI_A0_BASE,
+
178  EUSCI_A_SPI_TRANSMIT_INTERRUPT));
+
179 
+
180  RXData = EUSCI_A_SPI_receiveData(EUSCI_A0_BASE);
+
181 
+
182  //Increment data
+
183  TXData++;
+
184 
+
185  //Send next value
+
186  EUSCI_A_SPI_transmitData(EUSCI_A0_BASE,
+
187  TXData
+
188  );
+
189 
+
190  //Delay between transmissions for slave to process information
+
191  __delay_cycles(40);
+
192  break;
+
193  default:
+
194  break;
+
195  }
+
196 }
+
197 
+
uint8_t RXData
+
void main(void)
+
void USCI_A0_ISR(void)
+
uint8_t TXData
+
MPU_initThreeSegmentsParam param
+ + +
__no_operation()
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html new file mode 100644 index 0000000..91618f1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html @@ -0,0 +1,220 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_a_spi/eusci_a_spi_ex1_slave.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_a_spi_ex1_slave.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCI_A0_ISR (void)
 
+ + + + + +

+Variables

uint8_t transmitData = 0x01
 
uint8_t receiveData = 0x00
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 76 of file eusci_a_spi_ex1_slave.c.

+ +

References param.

+ +
+
+ +

◆ USCI_A0_ISR()

+ +
+
+ + + + + + + + +
void USCI_A0_ISR (void )
+
+ +

Definition at line 146 of file eusci_a_spi_ex1_slave.c.

+ +

References receiveData, and transmitData.

+ +
+
+

Variable Documentation

+ +

◆ receiveData

+ +
+
+ + + + +
uint8_t receiveData = 0x00
+
+ +

Definition at line 74 of file eusci_a_spi_ex1_slave.c.

+ +
+
+ +

◆ transmitData

+ +
+
+ + + + +
uint8_t transmitData = 0x01
+
+

SPI slave talks to SPI master using 3-wire mode. Data is received from master and data from slave is then transmitted back to master. USCI RX ISR is used to handle communication, CPU normally in LPM4. Prior to initial data exchange, master pulses slaves RST for complete reset.

+

Use with eusci_spi_ex1_master code example. If the slave is in debug mode, the reset signal from the master will conflict with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.

  Tested on  MSP430FR4133
+          -----------------
+     /|\ |                 |
+      |  |                 |
+

Master—+->|RST | | | | P1.0|-> Data Out (UCA0SIMO) | | | P1.1|<- Data In (UCA0SOMI) | | | P1.2|-> Serial Clock Out (UCA0CLK)

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • SPI peripheral
  • +
  • GPIO Port peripheral (for SPI pins)
  • +
  • UCA0SIMO
  • +
  • UCA0SOMI
  • +
  • UCA0CLK
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_A0_VECTOR
  • +
+ +

Definition at line 74 of file eusci_a_spi_ex1_slave.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.js new file mode 100644 index 0000000..26fb4e2 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCI_A0_ISR", "_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html#a7d5728ccc412d2d610500fa338c2d003", null ], + [ "receiveData", "_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html#a216001f02f93a2c0b512c1b8724bdc60", null ], + [ "transmitData", "_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html#ac23b8f721ac5b7a4315ba2c3409b9e0a", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c_source.html new file mode 100644 index 0000000..6c891c5 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c_source.html @@ -0,0 +1,245 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_a_spi/eusci_a_spi_ex1_slave.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_a_spi_ex1_slave.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*****************************************************************************
+
70 //
+
71 //*****************************************************************************
+
72 #include "driverlib.h"
+
73 
+
74 uint8_t transmitData = 0x01, receiveData = 0x00;
+
75 
+
76 void main(void)
+
77 {
+
78  //Stop watchdog timer
+
79  WDT_A_hold(WDT_A_BASE);
+
80 
+
81  // Configure Pins for XIN
+
82  //Set P4.1 and P4.2 as Module Function Input.
+
83  /*
+
84 
+
85  * Select Port 4
+
86  * Set Pin 1, 2 to input Module Function, (XIN).
+
87  */
+
88  GPIO_setAsPeripheralModuleFunctionInputPin(
+
89  GPIO_PORT_P4,
+
90  GPIO_PIN1 + GPIO_PIN2,
+
91  GPIO_PRIMARY_MODULE_FUNCTION
+
92  );
+
93 
+
94  // Configure SPI Pins for UCA0CLK, UCA0TXD/UCA0SIMO and UCA0RXD/UCA0SOMI
+
95  /*
+
96  * Select Port 1
+
97  * Set Pin 0, Pin 1 and Pin 2 to input Secondary Module Function
+
98  */
+
99  GPIO_setAsPeripheralModuleFunctionInputPin(
+
100  GPIO_PORT_P1,
+
101  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2,
+
102  GPIO_PRIMARY_MODULE_FUNCTION
+
103  );
+
104 
+
105  /*
+
106  * Disable the GPIO power-on default high-impedance mode to activate
+
107  * previously configured port settings
+
108  */
+
109  PMM_unlockLPM5();
+
110 
+
111  //Initialize slave to MSB first, inactive high clock polarity and 3 wire SPI
+
112  EUSCI_A_SPI_initSlaveParam param = {0};
+
113  param.msbFirst = EUSCI_A_SPI_MSB_FIRST;
+
114  param.clockPhase = EUSCI_A_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
+
115  param.clockPolarity = EUSCI_A_SPI_CLOCKPOLARITY_INACTIVITY_HIGH;
+
116  param.spiMode = EUSCI_A_SPI_3PIN;
+
117  EUSCI_A_SPI_initSlave(EUSCI_A0_BASE, &param);
+
118 
+
119  //Enable SPI Module
+
120  EUSCI_A_SPI_enable(EUSCI_A0_BASE);
+
121 
+
122  //Clear receive interrupt flag
+
123  EUSCI_A_SPI_clearInterrupt(EUSCI_A0_BASE,
+
124  EUSCI_A_SPI_RECEIVE_INTERRUPT
+
125  );
+
126 
+
127  //Enable Receive interrupt
+
128  EUSCI_A_SPI_enableInterrupt(EUSCI_A0_BASE,
+
129  EUSCI_A_SPI_RECEIVE_INTERRUPT
+
130  );
+
131 
+
132  __bis_SR_register(LPM0_bits + GIE); // Enter LPM0, enable interrupts
+
133 }
+
134 
+
135 //******************************************************************************
+
136 //
+
137 //This is the USCI_A0 interrupt vector service routine.
+
138 //
+
139 //******************************************************************************
+
140 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
141 #pragma vector=USCI_A0_VECTOR
+
142 __interrupt
+
143 #elif defined(__GNUC__)
+
144 __attribute__((interrupt(USCI_A0_VECTOR)))
+
145 #endif
+
146 void USCI_A0_ISR (void)
+
147 {
+
148  switch(__even_in_range(UCA0IV, USCI_SPI_UCTXIFG))
+
149  {
+
150  case USCI_SPI_UCRXIFG: // UCRXIFG
+
151  //USCI_A0 TX buffer ready?
+
152  while (!EUSCI_A_SPI_getInterruptStatus(EUSCI_A0_BASE,
+
153  EUSCI_A_SPI_TRANSMIT_INTERRUPT
+
154  ));
+
155 
+
156  //Transmit data to master
+
157  EUSCI_A_SPI_transmitData(EUSCI_A0_BASE,
+ +
159  );
+
160 
+
161  //Receive data from master
+
162  receiveData = EUSCI_A_SPI_receiveData(EUSCI_A0_BASE);
+
163 
+
164  //Increment data to be transmitted
+
165  transmitData++;
+
166  break;
+
167  default:
+
168  break;
+
169  }
+
170 }
+
171 
+
uint8_t receiveData
+
void main(void)
+
void USCI_A0_ISR(void)
+
uint8_t transmitData
+
MPU_initThreeSegmentsParam param
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html new file mode 100644 index 0000000..1336476 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html @@ -0,0 +1,260 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_a_uart/eusci_a_uart_ex1_loopbackAdvanced.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_a_uart_ex1_loopbackAdvanced.c File Reference
+
+
+
#include "driverlib.h"
+#include "Board.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void EUSCI_A0_ISR (void)
 
+ + + + + + + + + +

+Variables

uint16_t i
 
uint8_t RXData = 0
 
uint8_t TXData = 0
 
uint8_t check = 0
 
+

Function Documentation

+ +

◆ EUSCI_A0_ISR()

+ +
+
+ + + + + + + + +
void EUSCI_A0_ISR (void )
+
+ +

Definition at line 149 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +

References check, RXData, and TXData.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 69 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +

References check, param, STATUS_FAIL, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ check

+ +
+
+ + + + +
uint8_t check = 0
+
+ +

Definition at line 67 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +
+
+ +

◆ i

+ +
+
+ + + + +
uint16_t i
+
+

EUSCI_A0 External Loopback test using EUSCI_A_UART_init API

+

Description: This demo connects TX to RX of the MSP430 UART The example code shows proper initialization of registers and interrupts to receive and transmit data.

+

SMCLK = MCLK = BRCLK = DCOCLKDIV = ~1MHz, ACLK = 32.768kHz

+
      MSP430FR2xx_4xx Board
+        -----------------
+  RST -|          UCA0TXD|----|
+       |                 |    |
+       |                 |    |
+       |          UCA0RXD|----|
+       |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • UART peripheral
  • +
  • GPIO Port peripheral (for UART pins)
  • +
  • UCA0TXD
  • +
  • UCA0RXD
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_A0_VECTOR.
  • +
+ +

Definition at line 65 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +
+
+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData = 0
+
+ +

Definition at line 66 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 66 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.js new file mode 100644 index 0000000..b5f64c3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.js @@ -0,0 +1,9 @@ +var _m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c = +[ + [ "EUSCI_A0_ISR", "_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#a06404fa75e5db173d0570112cbb0d39a", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "check", "_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#ad47d5b159b4c95a163edac9d1b659751", null ], + [ "i", "_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#a78f7a37dba921e0b0347b960fb40bc51", null ], + [ "RXData", "_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#a597ef8ed788642728c57f66b3a21544f", null ], + [ "TXData", "_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c_source.html new file mode 100644 index 0000000..9b14f35 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c_source.html @@ -0,0 +1,255 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_a_uart/eusci_a_uart_ex1_loopbackAdvanced.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_a_uart_ex1_loopbackAdvanced.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 #include "Board.h"
+
64 
+
65 uint16_t i;
+
66 uint8_t RXData = 0, TXData = 0;
+
67 uint8_t check = 0;
+
68 
+
69 void main(void)
+
70 {
+
71  //Stop Watchdog Timer
+
72  WDT_A_hold(WDT_A_BASE);
+
73 
+
74  //Set ACLK = REFOCLK with clock divider of 1
+
75  CS_initClockSignal(CS_ACLK,CS_REFOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
76  //Set SMCLK = DCO with frequency divider of 1
+
77  CS_initClockSignal(CS_SMCLK,CS_DCOCLKDIV_SELECT,CS_CLOCK_DIVIDER_1);
+
78  //Set MCLK = DCO with frequency divider of 1
+
79  CS_initClockSignal(CS_MCLK,CS_DCOCLKDIV_SELECT,CS_CLOCK_DIVIDER_1);
+
80 
+
81  //Configure UART pins
+
82  GPIO_setAsPeripheralModuleFunctionInputPin(
+
83  GPIO_PORT_UCA0TXD,
+
84  GPIO_PIN_UCA0TXD,
+
85  GPIO_FUNCTION_UCA0TXD
+
86  );
+
87  GPIO_setAsPeripheralModuleFunctionInputPin(
+
88  GPIO_PORT_UCA0RXD,
+
89  GPIO_PIN_UCA0RXD,
+
90  GPIO_FUNCTION_UCA0RXD
+
91  );
+
92 
+
93  /*
+
94  * Disable the GPIO power-on default high-impedance mode to activate
+
95  * previously configured port settings
+
96  */
+
97  PMM_unlockLPM5();
+
98 
+
99  //Configure UART
+
100  //SMCLK = 1MHz, Baudrate = 115200
+
101  //UCBRx = 8, UCBRFx = 0, UCBRSx = 0xD6, UCOS16 = 0
+
102  EUSCI_A_UART_initParam param = {0};
+
103  param.selectClockSource = EUSCI_A_UART_CLOCKSOURCE_SMCLK;
+
104  param.clockPrescalar = 8;
+
105  param.firstModReg = 0;
+
106  param.secondModReg = 0xD6;
+
107  param.parity = EUSCI_A_UART_NO_PARITY;
+
108  param.msborLsbFirst = EUSCI_A_UART_LSB_FIRST;
+
109  param.numberofStopBits = EUSCI_A_UART_ONE_STOP_BIT;
+
110  param.uartMode = EUSCI_A_UART_MODE;
+
111  param.overSampling = EUSCI_A_UART_LOW_FREQUENCY_BAUDRATE_GENERATION;
+
112 
+
113  if (STATUS_FAIL == EUSCI_A_UART_init(EUSCI_A0_BASE, &param)) {
+
114  return;
+
115  }
+
116 
+
117  EUSCI_A_UART_enable(EUSCI_A0_BASE);
+
118 
+
119  EUSCI_A_UART_clearInterrupt(EUSCI_A0_BASE,
+
120  EUSCI_A_UART_RECEIVE_INTERRUPT);
+
121 
+
122  // Enable USCI_A0 RX interrupt
+
123  EUSCI_A_UART_enableInterrupt(EUSCI_A0_BASE,
+
124  EUSCI_A_UART_RECEIVE_INTERRUPT);
+
125 
+
126  // Enable global interrupts
+
127  __enable_interrupt();
+
128  while (1)
+
129  {
+
130  // Increment TX data
+
131  TXData = TXData+1;
+
132  // Load data onto buffer
+
133  EUSCI_A_UART_transmitData(EUSCI_A0_BASE, TXData);
+
134  while(check != 1);
+
135  check = 0;
+
136  }
+
137 }
+
138 //******************************************************************************
+
139 //
+
140 //This is the USCI_A0 interrupt vector service routine.
+
141 //
+
142 //******************************************************************************
+
143 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
144 #pragma vector=USCI_A0_VECTOR
+
145 __interrupt
+
146 #elif defined(__GNUC__)
+
147 __attribute__((interrupt(USCI_A0_VECTOR)))
+
148 #endif
+
149 void EUSCI_A0_ISR(void)
+
150 {
+
151  switch(__even_in_range(UCA0IV,USCI_UART_UCTXCPTIFG))
+
152  {
+
153  case USCI_NONE: break;
+
154  case USCI_UART_UCRXIFG:
+
155  RXData = EUSCI_A_UART_receiveData(EUSCI_A0_BASE);
+
156  // Check value
+
157  if(!(RXData == TXData))
+
158  {
+
159  while(1);
+
160  }
+
161  check =1;
+
162  break;
+
163  case USCI_UART_UCTXIFG: break;
+
164  case USCI_UART_UCSTTIFG: break;
+
165  case USCI_UART_UCTXCPTIFG: break;
+
166  }
+
167 }
+
168 
+ +
void EUSCI_A0_ISR(void)
+ + + + + +
MPU_initThreeSegmentsParam param
+ +
#define STATUS_FAIL
Definition: hw_memmap.h:23
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html new file mode 100644 index 0000000..21b58f3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html @@ -0,0 +1,283 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex1_masterRxMultiple.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex1_masterRxMultiple.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
#define RXCOUNT   0x05
 
#define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ   1000
 
#define CS_SMCLK_FLLREF_RATIO   30
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t RXData
 
+

Macro Definition Documentation

+ +

◆ CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ

+ +
+
+ + + + +
#define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ   1000
+
+ +

Definition at line 91 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +
+
+ +

◆ CS_SMCLK_FLLREF_RATIO

+ +
+
+ + + + +
#define CS_SMCLK_FLLREF_RATIO   30
+
+ +

Definition at line 98 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +
+
+ +

◆ RXCOUNT

+ +
+
+ + + + +
#define RXCOUNT   0x05
+
+ +

Definition at line 84 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +
+
+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

MSP430FR4133 Demo - USCI_B0 I2C Master RX multiple bytes from MSP430 Slave

+

Description: This demo connects two MSP430's via the I2C bus. The master reads 5 bytes from the slave. This is the MASTER CODE. The data from the slave transmitter begins at 0 and increments with each transfer. The USCI_B0 RX interrupt is used to know when new data has been received. ACLK = n/a, MCLK = SMCLK = BRCLK = DCO = ~1MHz

                          /|\  /|\
+         MSP430FR4133      10k  10k     MSP430FR4133
+             slave         |    |        master
+       -----------------   |    |   -----------------
+     -|XIN  P5.2/UCB0SDA|<-|----+->|P5.2/UCB0SDA  XIN|-
+      |                 |  |       |                 | 32kHz
+     -|XOUT             |  |       |             XOUT|-
+      |     P5.3/UCB0SCL|<-+------>|P5.3/UCB0SCL     |
+      |                 |          |             P1.0|--> LED
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
  • CS
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR
  • +
+ +

Definition at line 77 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 214 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +

References __bic_SR_register_on_exit(), RXCOUNT, and RXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData
+
+ +

Definition at line 100 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.js new file mode 100644 index 0000000..2af1981 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.js @@ -0,0 +1,10 @@ +var _m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c = +[ + [ "CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#abb16bfdd33b9d2ea4f8d121f54e3e6b8", null ], + [ "CS_SMCLK_FLLREF_RATIO", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#aadaa11d9acd1cd658f32638079eafed6", null ], + [ "RXCOUNT", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#a70033793a4008a84a5022c8e8467c71b", null ], + [ "SLAVE_ADDRESS", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "RXData", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#a597ef8ed788642728c57f66b3a21544f", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c_source.html new file mode 100644 index 0000000..52f100c --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c_source.html @@ -0,0 +1,354 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex1_masterRxMultiple.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex1_masterRxMultiple.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
63 //******************************************************************************
+
64 #include "driverlib.h"
+
65 
+
66 //*****************************************************************************
+
67 //
+
68 //Set the address for slave module. This is a 7-bit address sent in the
+
69 //following format:
+
70 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
71 //
+
72 //A zero in the "RS" position of the first byte means that the master
+
73 //transmits (sends) data to the selected slave, and a one in this position
+
74 //means that the master receives data from the slave.
+
75 //
+
76 //*****************************************************************************
+
77 #define SLAVE_ADDRESS 0x48
+
78 
+
79 //*****************************************************************************
+
80 //
+
81 //Specify Expected Receive data count.
+
82 //
+
83 //*****************************************************************************
+
84 #define RXCOUNT 0x05
+
85 
+
86 //*****************************************************************************
+
87 //
+
88 //Target frequency for SMCLK in kHz
+
89 //
+
90 //*****************************************************************************
+
91 #define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ 1000
+
92 
+
93 //*****************************************************************************
+
94 //
+
95 //SMCLK/FLLRef Ratio
+
96 //
+
97 //*****************************************************************************
+
98 #define CS_SMCLK_FLLREF_RATIO 30
+
99 
+
100 uint8_t RXData;
+
101 void main (void)
+
102 {
+
103  WDT_A_hold(WDT_A_BASE);
+
104 
+
105  //Set DCO FLL reference = REFO
+
106  CS_initClockSignal(
+
107  CS_FLLREF,
+
108  CS_REFOCLK_SELECT,
+
109  CS_CLOCK_DIVIDER_1
+
110  );
+
111 
+
112  //Set Ratio and Desired MCLK Frequency and initialize DCO
+
113  CS_initFLLSettle(
+ + +
116  );
+
117 
+
118  //Set SMCLK = DCO with frequency divider of 1
+
119  CS_initClockSignal(
+
120  CS_SMCLK,
+
121  CS_DCOCLKDIV_SELECT,
+
122  CS_CLOCK_DIVIDER_1
+
123  );
+
124 
+
125  //Set MCLK = DCO with frequency divider of 1
+
126  CS_initClockSignal(
+
127  CS_MCLK,
+
128  CS_DCOCLKDIV_SELECT,
+
129  CS_CLOCK_DIVIDER_1
+
130  );
+
131 
+
132  // Configure Pins for I2C
+
133  /*
+
134  * Select Port 5
+
135  * Set Pin 2, 3 to input with function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
136  */
+
137  GPIO_setAsPeripheralModuleFunctionInputPin(
+
138  GPIO_PORT_P5,
+
139  GPIO_PIN2 + GPIO_PIN3,
+
140  GPIO_PRIMARY_MODULE_FUNCTION
+
141  );
+
142 
+
143  //Set P1.0 as an output pin.
+
144  /*
+
145 
+
146  * Select Port 1
+
147  * Set Pin 0 as output
+
148  */
+
149  GPIO_setAsOutputPin(
+
150  GPIO_PORT_P1,
+
151  GPIO_PIN0
+
152  );
+
153 
+
154  /*
+
155  * Disable the GPIO power-on default high-impedance mode to activate
+
156  * previously configured port settings
+
157  */
+
158  PMM_unlockLPM5();
+
159 
+
160  EUSCI_B_I2C_initMasterParam param = {0};
+
161  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
162  param.i2cClk = CS_getSMCLK();
+
163  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
164  param.byteCounterThreshold = RXCOUNT;
+
165  param.autoSTOPGeneration = EUSCI_B_I2C_SEND_STOP_AUTOMATICALLY_ON_BYTECOUNT_THRESHOLD;
+
166  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
167 
+
168  //Specify slave address
+
169  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
171  );
+
172 
+
173  //Set Master in receive mode
+
174  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
175  EUSCI_B_I2C_RECEIVE_MODE
+
176  );
+
177 
+
178  //Enable I2C Module to start operations
+
179  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
180 
+
181  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
182  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
183  EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT +
+
184  EUSCI_B_I2C_NAK_INTERRUPT
+
185  );
+
186 
+
187  //Enable master Receive interrupt
+
188  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
189  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
190  EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT +
+
191  EUSCI_B_I2C_NAK_INTERRUPT
+
192  );
+
193 
+
194  while (1)
+
195  {
+
196  __delay_cycles(2000);
+
197 
+
198  while (EUSCI_B_I2C_SENDING_STOP ==
+
199  EUSCI_B_I2C_masterIsStopSent(EUSCI_B0_BASE));
+
200 
+
201  EUSCI_B_I2C_masterReceiveStart(EUSCI_B0_BASE);
+
202 
+
203  // Enter LPM0 w/ interrupt
+
204  __bis_SR_register(CPUOFF+GIE);
+
205  }
+
206 }
+
207 
+
208 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
209 #pragma vector=USCI_B0_VECTOR
+
210 __interrupt
+
211 #elif defined(__GNUC__)
+
212 __attribute__((interrupt(USCI_B0_VECTOR)))
+
213 #endif
+
214 void USCIB0_ISR(void)
+
215 {
+
216  static uint8_t count = 0;
+
217  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
218  {
+
219  case USCI_NONE: // No interrupts break;
+
220  break;
+
221  case USCI_I2C_UCALIFG: // Arbitration lost
+
222  break;
+
223  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
224  EUSCI_B_I2C_masterReceiveStart(EUSCI_B0_BASE);
+
225  break;
+
226  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
227  break;
+
228  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
229  break;
+
230  case USCI_I2C_UCRXIFG3: // RXIFG3
+
231  break;
+
232  case USCI_I2C_UCTXIFG3: // TXIFG3
+
233  break;
+
234  case USCI_I2C_UCRXIFG2: // RXIFG2
+
235  break;
+
236  case USCI_I2C_UCTXIFG2: // TXIFG2
+
237  break;
+
238  case USCI_I2C_UCRXIFG1: // RXIFG1
+
239  break;
+
240  case USCI_I2C_UCTXIFG1: // TXIFG1
+
241  break;
+
242  case USCI_I2C_UCRXIFG0: // RXIFG0
+
243  // Get RX data
+
244  RXData = EUSCI_B_I2C_masterReceiveSingle(
+
245  EUSCI_B0_BASE
+
246  );
+
247  if (++count >= RXCOUNT) {
+
248  count = 0;
+
249  __bic_SR_register_on_exit(CPUOFF); // Exit LPM0
+
250  }
+
251  break; // Vector 24: RXIFG0 break;
+
252  case USCI_I2C_UCTXIFG0: // TXIFG0
+
253  break;
+
254  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
255  GPIO_toggleOutputOnPin(
+
256  GPIO_PORT_P1,
+
257  GPIO_PIN0
+
258  );
+
259  break;
+
260  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
261  break;
+
262  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
263  break;
+
264  default:
+
265  break;
+
266  }
+
267 }
+
268 
+ +
void USCIB0_ISR(void)
+ + +
#define CS_SMCLK_FLLREF_RATIO
+
#define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ
+ +
MPU_initThreeSegmentsParam param
+ +
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html new file mode 100644 index 0000000..5d82ac5 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html @@ -0,0 +1,220 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex1_slaveTxMultiple.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex1_slaveTxMultiple.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t TXData = 0
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

EUSCI_B0 I2C Slave TX multiple bytes to MSP430 Master

+

Description: This demo connects two MSP430's via the I2C bus. The master reads from the slave. This is the SLAVE code. The TX data begins at 0 and is incremented each time it is sent. A stop condition is used as a trigger to initialize the outgoing data. The USCI_B0 TX interrupt is used to know when to TX. Tested on MSP430FR4133 /|\ /|\ MSP430FR4133 10k 10k MSP430FR4133 slave | | master --------------— | | --------------— -|XIN P5.2/UCB0SDA|<-|-—+->|P5.2/UCB0SDA XIN|- | | | | | 32kHz -|XOUT | | | XOUT|- | P5.3/UCB0SCL|<-+---—>|P5.3/UCB0SCL | | | | P1.0|--> LED

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 80 of file eusci_b_i2c_ex1_slaveTxMultiple.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 84 of file eusci_b_i2c_ex1_slaveTxMultiple.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 134 of file eusci_b_i2c_ex1_slaveTxMultiple.c.

+ +

References TXData.

+ +
+
+

Variable Documentation

+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 82 of file eusci_b_i2c_ex1_slaveTxMultiple.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.js new file mode 100644 index 0000000..fa4b606 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "TXData", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c_source.html new file mode 100644 index 0000000..9480f82 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c_source.html @@ -0,0 +1,259 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex1_slaveTxMultiple.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex1_slaveTxMultiple.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*****************************************************************************
+
65 //
+
66 //*****************************************************************************
+
67 #include "driverlib.h"
+
68 
+
69 //*****************************************************************************
+
70 //
+
71 //Set the address for slave module. This is a 7-bit address sent in the
+
72 //following format:
+
73 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
74 //
+
75 //A zero in the "RS" position of the first byte means that the master
+
76 //transmits (sends) data to the selected slave, and a one in this position
+
77 //means that the master receives data from the slave.
+
78 //
+
79 //*****************************************************************************
+
80 #define SLAVE_ADDRESS 0x48
+
81 
+
82 uint8_t TXData = 0;
+
83 
+
84 void main(void)
+
85 {
+
86  WDT_A_hold(WDT_A_BASE);
+
87 
+
88  // Configure Pins for I2C
+
89  /*
+
90  * Select Port 5
+
91  * Set Pin 2, 3 to input with function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
92  */
+
93  GPIO_setAsPeripheralModuleFunctionInputPin(
+
94  GPIO_PORT_P5,
+
95  GPIO_PIN2 + GPIO_PIN3,
+
96  GPIO_PRIMARY_MODULE_FUNCTION
+
97  );
+
98 
+
99  /*
+
100  * Disable the GPIO power-on default high-impedance mode to activate
+
101  * previously configured port settings
+
102  */
+
103  PMM_unlockLPM5();
+
104 
+
105  EUSCI_B_I2C_initSlaveParam param = {0};
+
106  param.slaveAddress = 0x48;
+
107  param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
108  param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
109  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &param);
+
110 
+
111  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
112 
+
113  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
114  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
115  EUSCI_B_I2C_STOP_INTERRUPT
+
116  );
+
117 
+
118  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
119  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
120  EUSCI_B_I2C_STOP_INTERRUPT
+
121  );
+
122 
+
123  // Enter LPM0 w/ interrupts
+
124  __bis_SR_register(CPUOFF + GIE);
+
125  __no_operation();
+
126 }
+
127 
+
128 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
129 #pragma vector=USCI_B0_VECTOR
+
130 __interrupt
+
131 #elif defined(__GNUC__)
+
132 __attribute__((interrupt(USCI_B0_VECTOR)))
+
133 #endif
+
134 void USCIB0_ISR(void)
+
135 {
+
136  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
137  {
+
138  case USCI_NONE: // No interrupts break;
+
139  break;
+
140  case USCI_I2C_UCALIFG: // Arbitration lost
+
141  break;
+
142  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
143  break;
+
144  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
145  break;
+
146  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
147  TXData = 0;
+
148  break;
+
149  case USCI_I2C_UCRXIFG3: // RXIFG3
+
150  break;
+
151  case USCI_I2C_UCTXIFG3: // TXIFG3
+
152  break;
+
153  case USCI_I2C_UCRXIFG2: // RXIFG2
+
154  break;
+
155  case USCI_I2C_UCTXIFG2: // TXIFG2
+
156  break;
+
157  case USCI_I2C_UCRXIFG1: // RXIFG1
+
158  break;
+
159  case USCI_I2C_UCTXIFG1: // TXIFG1
+
160  break;
+
161  case USCI_I2C_UCRXIFG0: // RXIFG0
+
162  break;
+
163  case USCI_I2C_UCTXIFG0: // TXIFG0
+
164  EUSCI_B_I2C_slavePutData(EUSCI_B0_BASE,
+
165  TXData++);
+
166  break;
+
167  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
168  GPIO_toggleOutputOnPin(
+
169  GPIO_PORT_P1,
+
170  GPIO_PIN0
+
171  );
+
172  break;
+
173  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
174  break;
+
175  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
176  break;
+
177  default:
+
178  break;
+
179  }
+
180 }
+
void USCIB0_ISR(void)
+
void main(void)
+ +
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html new file mode 100644 index 0000000..6bdb545 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html @@ -0,0 +1,241 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex2_masterRxSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex2_masterRxSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
#define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ   1000
 
#define CS_SMCLK_FLLREF_RATIO   30
 
+ + + +

+Functions

void main (void)
 
+ + + +

+Variables

uint8_t RXData
 
+

Macro Definition Documentation

+ +

◆ CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ

+ +
+
+ + + + +
#define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ   1000
+
+ +

Definition at line 89 of file eusci_b_i2c_ex2_masterRxSingle.c.

+ +
+
+ +

◆ CS_SMCLK_FLLREF_RATIO

+ +
+
+ + + + +
#define CS_SMCLK_FLLREF_RATIO   30
+
+ +

Definition at line 96 of file eusci_b_i2c_ex2_masterRxSingle.c.

+ +
+
+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

This example shows how to configure the I2C module as a master for single byte reception in interrupt driven mode. The address of the slave module that the master is communicating with also set in this example.

+

Description: This demo connects two MSP430's via the I2C bus. The master reads from the slave. This is the MASTER CODE. The data from the slave transmitter begins at 0 and increments with each transfer. The USCI_B0 RX interrupt is used to know when new data has been received. ACLK = n/a, MCLK = SMCLK = BRCLK = DCO = ~1MHz

                          /|\  /|\
+         MSP430FR4133      10k  10k     MSP430FR4133
+             slave         |    |        master
+       -----------------   |    |   -----------------
+     -|XIN  P5.2/UCB0SDA|<-|----+->|P5.2/UCB0SDA  XIN|-
+      |                 |  |       |                 | 32kHz
+     -|XOUT             |  |       |             XOUT|-
+      |     P5.3/UCB0SCL|<-+------>|P5.3/UCB0SCL     |
+      |                 |          |             P1.0|--> LED
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
  • CS
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 82 of file eusci_b_i2c_ex2_masterRxSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData
+
+ +

Definition at line 98 of file eusci_b_i2c_ex2_masterRxSingle.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.js new file mode 100644 index 0000000..e97e8cd --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.js @@ -0,0 +1,8 @@ +var _m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c = +[ + [ "CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html#abb16bfdd33b9d2ea4f8d121f54e3e6b8", null ], + [ "CS_SMCLK_FLLREF_RATIO", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html#aadaa11d9acd1cd658f32638079eafed6", null ], + [ "SLAVE_ADDRESS", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "RXData", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html#a597ef8ed788642728c57f66b3a21544f", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c_source.html new file mode 100644 index 0000000..9fc9859 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c_source.html @@ -0,0 +1,272 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex2_masterRxSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex2_masterRxSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*****************************************************************************
+
53 
+
67 //
+
68 //*****************************************************************************
+
69 #include "driverlib.h"
+
70 
+
71 //*****************************************************************************
+
72 //
+
73 //Set the address for slave module. This is a 7-bit address sent in the
+
74 //following format:
+
75 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
76 //
+
77 //A zero in the "RS" position of the first byte means that the master
+
78 //transmits (sends) data to the selected slave, and a one in this position
+
79 //means that the master receives data from the slave.
+
80 //
+
81 //*****************************************************************************
+
82 #define SLAVE_ADDRESS 0x48
+
83 
+
84 //*****************************************************************************
+
85 //
+
86 //Target frequency for SMCLK in kHz
+
87 //
+
88 //*****************************************************************************
+
89 #define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ 1000
+
90 
+
91 //*****************************************************************************
+
92 //
+
93 //SMCLK/FLLRef Ratio
+
94 //
+
95 //*****************************************************************************
+
96 #define CS_SMCLK_FLLREF_RATIO 30
+
97 
+
98 uint8_t RXData;
+
99 void main (void)
+
100 {
+
101  //Stop WDT
+
102  WDT_A_hold(WDT_A_BASE);
+
103 
+
104  //Set Ratio and Desired MCLK Frequency and initialize DCO
+
105  CS_initFLLSettle(
+ + +
108  );
+
109 
+
110  //Set SMCLK = DCO with frequency divider of 1
+
111  CS_initClockSignal(
+
112  CS_SMCLK,
+
113  CS_DCOCLKDIV_SELECT,
+
114  CS_CLOCK_DIVIDER_1
+
115  );
+
116 
+
117  //Set MCLK = DCO with frequency divider of 1
+
118  CS_initClockSignal(
+
119  CS_MCLK,
+
120  CS_DCOCLKDIV_SELECT,
+
121  CS_CLOCK_DIVIDER_1
+
122  );
+
123 
+
124  // Configure Pins for I2C
+
125  /*
+
126  * Select Port 5
+
127  * Set Pin 2, 3 to input with function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
128  */
+
129  GPIO_setAsPeripheralModuleFunctionInputPin(
+
130  GPIO_PORT_P5,
+
131  GPIO_PIN2 + GPIO_PIN3,
+
132  GPIO_PRIMARY_MODULE_FUNCTION
+
133  );
+
134 
+
135  //Set P1.0 as an output pin.
+
136  /*
+
137 
+
138  * Select Port 1
+
139  * Set Pin 0 as output
+
140  */
+
141  GPIO_setAsOutputPin(
+
142  GPIO_PORT_P1,
+
143  GPIO_PIN0
+
144  );
+
145 
+
146  /*
+
147  * Disable the GPIO power-on default high-impedance mode to activate
+
148  * previously configured port settings
+
149  */
+
150  PMM_unlockLPM5();
+
151 
+
152  EUSCI_B_I2C_initMasterParam param = {0};
+
153  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
154  param.i2cClk = CS_getSMCLK();
+
155  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
156  param.byteCounterThreshold = 1;
+
157  param.autoSTOPGeneration = EUSCI_B_I2C_SEND_STOP_AUTOMATICALLY_ON_BYTECOUNT_THRESHOLD;
+
158  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
159 
+
160  //Specify slave address
+
161  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
163  );
+
164 
+
165  //Set Master in receive mode
+
166  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
167  EUSCI_B_I2C_RECEIVE_MODE
+
168  );
+
169 
+
170  //Enable I2C Module to start operations
+
171  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
172 
+
173  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
174  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
175  EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT
+
176  );
+
177 
+
178  //Enable master Receive interrupt
+
179  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
180  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
181  EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT
+
182  );
+
183 
+
184  while (1)
+
185  {
+
186  __delay_cycles(2000);
+
187 
+
188  // I2C start condition
+
189  RXData = EUSCI_B_I2C_masterReceiveSingleByte(EUSCI_B0_BASE);
+
190 
+
191  }
+
192 }
+ +
void main(void)
+
#define CS_SMCLK_FLLREF_RATIO
+
#define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ
+
#define SLAVE_ADDRESS
+
MPU_initThreeSegmentsParam param
+ +
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html new file mode 100644 index 0000000..c3f1078 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html @@ -0,0 +1,228 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex2_slaveTxSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex2_slaveTxSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t TXData = 0x00
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

Description: This demo connects two MSP430's via the I2C bus. The master reads from the slave. This is the SLAVE code. The TX data begins at 0 and is incremented each time it is sent. A stop condition is used as a trigger to increment the outgoing data. The USCI_B0 TX interrupt is used to know when to TX. Tested on MSP430FR4133

                          /|\  /|\
+         MSP430FR4133      10k  10k     MSP430FR4133
+             slave         |    |        master
+       -----------------   |    |   -----------------
+     -|XIN  P5.2/UCB0SDA|<-|----+->|P5.2/UCB0SDA  XIN|-
+      |                 |  |       |                 | 32kHz
+     -|XOUT             |  |       |             XOUT|-
+      |     P5.3/UCB0SCL|<-+------>|P5.3/UCB0SCL     |
+      |                 |          |             P1.0|--> LED
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
  • CS
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 79 of file eusci_b_i2c_ex2_slaveTxSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 83 of file eusci_b_i2c_ex2_slaveTxSingle.c.

+ +

References __no_operation(), param, and SLAVE_ADDRESS.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 139 of file eusci_b_i2c_ex2_slaveTxSingle.c.

+ +

References TXData.

+ +
+
+

Variable Documentation

+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0x00
+
+ +

Definition at line 81 of file eusci_b_i2c_ex2_slaveTxSingle.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.js new file mode 100644 index 0000000..f08be8f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "TXData", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c_source.html new file mode 100644 index 0000000..58f47fb --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c_source.html @@ -0,0 +1,263 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex2_slaveTxSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex2_slaveTxSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*****************************************************************************
+
65 //*****************************************************************************
+
66 #include "driverlib.h"
+
67 
+
68 //*****************************************************************************
+
69 //
+
70 //Set the address for slave module. This is a 7-bit address sent in the
+
71 //following format:
+
72 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
73 //
+
74 //A zero in the "RS" position of the first byte means that the master
+
75 //transmits (sends) data to the selected slave, and a one in this position
+
76 //means that the master receives data from the slave.
+
77 //
+
78 //*****************************************************************************
+
79 #define SLAVE_ADDRESS 0x48
+
80 
+
81 uint8_t TXData = 0x00;
+
82 
+
83 void main(void)
+
84 {
+
85  WDT_A_hold(WDT_A_BASE);
+
86 
+
87  // Configure Pins for I2C
+
88  /*
+
89  * Select Port 5
+
90  * Set Pin 2, 3 to input with function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
91  */
+
92  GPIO_setAsPeripheralModuleFunctionInputPin(
+
93  GPIO_PORT_P5,
+
94  GPIO_PIN2 + GPIO_PIN3,
+
95  GPIO_PRIMARY_MODULE_FUNCTION
+
96  );
+
97 
+
98  /*
+
99  * Disable the GPIO power-on default high-impedance mode to activate
+
100  * previously configured port settings
+
101  */
+
102  PMM_unlockLPM5();
+
103 
+
104  // eUSCI configuration
+
105  EUSCI_B_I2C_initSlaveParam param = {0};
+
106  param.slaveAddress = SLAVE_ADDRESS;
+
107  param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
108  param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
109  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &param);
+
110 
+
111  //Enable I2C Module to start operations
+
112  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
113 
+
114  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
115  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
116  EUSCI_B_I2C_STOP_INTERRUPT
+
117  );
+
118 
+
119  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
120  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
121  EUSCI_B_I2C_STOP_INTERRUPT
+
122  );
+
123 
+
124  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
125  __no_operation();
+
126 }
+
127 
+
128 //******************************************************************************
+
129 //
+
130 //This is the USCI_B0 interrupt vector service routine.
+
131 //
+
132 //******************************************************************************
+
133 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
134 #pragma vector=USCI_B0_VECTOR
+
135 __interrupt
+
136 #elif defined(__GNUC__)
+
137 __attribute__((interrupt(USCI_B0_VECTOR)))
+
138 #endif
+
139 void USCIB0_ISR(void)
+
140 {
+
141  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
142  {
+
143  case USCI_NONE: // No interrupts break;
+
144  break;
+
145  case USCI_I2C_UCALIFG: // Arbitration lost
+
146  break;
+
147  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
148  break;
+
149  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
150  break;
+
151  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
152  TXData++;
+
153  break;
+
154  case USCI_I2C_UCRXIFG3: // RXIFG3
+
155  break;
+
156  case USCI_I2C_UCTXIFG3: // TXIFG3
+
157  break;
+
158  case USCI_I2C_UCRXIFG2: // RXIFG2
+
159  break;
+
160  case USCI_I2C_UCTXIFG2: // TXIFG2
+
161  break;
+
162  case USCI_I2C_UCRXIFG1: // RXIFG1
+
163  break;
+
164  case USCI_I2C_UCTXIFG1: // TXIFG1
+
165  break;
+
166  case USCI_I2C_UCRXIFG0: // RXIFG0
+
167  break;
+
168  case USCI_I2C_UCTXIFG0: // TXIFG0
+
169  EUSCI_B_I2C_slavePutData(EUSCI_B0_BASE,
+
170  TXData
+
171  );
+
172  break;
+
173  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
174  break;
+
175  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
176  break;
+
177  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
178  break;
+
179  default:
+
180  break;
+
181  }
+
182 }
+
183 
+
void USCIB0_ISR(void)
+
void main(void)
+ +
#define SLAVE_ADDRESS
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html new file mode 100644 index 0000000..f873e32 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html @@ -0,0 +1,284 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex3_masterTxMultiple.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex3_masterTxMultiple.c File Reference
+
+
+
#include "driverlib.h"
+#include "Board.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
#define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ   1000
 
#define CS_SMCLK_FLLREF_RATIO   30
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + + + +

+Variables

uint8_t TXData = 0
 
uint8_t TXByteCtr
 
+

Macro Definition Documentation

+ +

◆ CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ

+ +
+
+ + + + +
#define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ   1000
+
+ +

Definition at line 90 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +
+
+ +

◆ CS_SMCLK_FLLREF_RATIO

+ +
+
+ + + + +
#define CS_SMCLK_FLLREF_RATIO   30
+
+ +

Definition at line 97 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +
+
+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

This example shows how to configure the I2C module as a master for multi byte transmission in interrupt driven mode. The address of the slave module is set in this example.

+

Demo - EUSCI_B0 I2C Master TX multiple bytes to MSP430 Slave

+

Description: This demo connects two MSP430's via the I2C bus. The master transmits to the slave. This is the MASTER CODE. It cntinuously transmits an array of data and demonstrates how to implement an I2C master transmitter sending multiple bytes using the USCI_B0 TX interrupt. ACLK = n/a, MCLK = SMCLK = BRCLK = default DCO = ~1MHz

                          /|\  /|\
+    MSP430FR2xx_4xx Board 10k  10k MSP430FR2xx_4xx Board
+             slave         |    |         master
+       -----------------   |    |   -----------------
+      |          UCB0SDA|<-|----+->|UCB0SDA          |
+      |                 |  |       |                 |
+      |                 |  |       |                 |
+      |          UCB0SCL|<-+------>|UCB0SCL          |
+      |                 |          |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 83 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 217 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +

References __bic_SR_register_on_exit(), TXByteCtr, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ TXByteCtr

+ +
+
+ + + + +
uint8_t TXByteCtr
+
+ +

Definition at line 101 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 100 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.js new file mode 100644 index 0000000..8eb3698 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.js @@ -0,0 +1,10 @@ +var _m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c = +[ + [ "CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#abb16bfdd33b9d2ea4f8d121f54e3e6b8", null ], + [ "CS_SMCLK_FLLREF_RATIO", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#aadaa11d9acd1cd658f32638079eafed6", null ], + [ "SLAVE_ADDRESS", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "TXByteCtr", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#a442fc7a9731fc8e66469e62429b32219", null ], + [ "TXData", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c_source.html new file mode 100644 index 0000000..06b8903 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c_source.html @@ -0,0 +1,332 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex3_masterTxMultiple.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex3_masterTxMultiple.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 //
+
67 //
+
68 //******************************************************************************
+
69 #include "driverlib.h"
+
70 #include "Board.h"
+
71 
+
72 //*****************************************************************************
+
73 //
+
74 //Set the address for slave module. This is a 7-bit address sent in the
+
75 //following format:
+
76 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
77 //
+
78 //A zero in the "RS" position of the first byte means that the master
+
79 //transmits (sends) data to the selected slave, and a one in this position
+
80 //means that the master receives data from the slave.
+
81 //
+
82 //*****************************************************************************
+
83 #define SLAVE_ADDRESS 0x48
+
84 
+
85 //*****************************************************************************
+
86 //
+
87 //Target frequency for SMCLK in kHz
+
88 //
+
89 //*****************************************************************************
+
90 #define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ 1000
+
91 
+
92 //*****************************************************************************
+
93 //
+
94 //SMCLK/FLLRef Ratio
+
95 //
+
96 //*****************************************************************************
+
97 #define CS_SMCLK_FLLREF_RATIO 30
+
98 
+
99 // Pointer to TX data
+
100 uint8_t TXData = 0;
+
101 uint8_t TXByteCtr;
+
102 
+
103 void main(void)
+
104 {
+
105  WDT_A_hold(WDT_A_BASE);
+
106 
+
107  //Set DCO FLL reference = REFO
+
108  CS_initClockSignal(
+
109  CS_FLLREF,
+
110  CS_REFOCLK_SELECT,
+
111  CS_CLOCK_DIVIDER_1
+
112  );
+
113 
+
114  //Set Ratio and Desired MCLK Frequency and initialize DCO
+
115  CS_initFLLSettle(
+ + +
118  );
+
119 
+
120  //Set ACLK = VLO with frequency divider of 1
+
121  CS_initClockSignal(
+
122  CS_ACLK,
+
123  CS_VLOCLK_SELECT,
+
124  CS_CLOCK_DIVIDER_1
+
125  );
+
126 
+
127  //Set SMCLK = DCO with frequency divider of 1
+
128  CS_initClockSignal(
+
129  CS_SMCLK,
+
130  CS_DCOCLKDIV_SELECT,
+
131  CS_CLOCK_DIVIDER_1
+
132  );
+
133 
+
134  //Set MCLK = DCO with frequency divider of 1
+
135  CS_initClockSignal(
+
136  CS_MCLK,
+
137  CS_DCOCLKDIV_SELECT,
+
138  CS_CLOCK_DIVIDER_1
+
139  );
+
140 
+
141  // Configure Pins for I2C
+
142  GPIO_setAsPeripheralModuleFunctionInputPin(
+
143  GPIO_PORT_UCB0SCL,
+
144  GPIO_PIN_UCB0SCL,
+
145  GPIO_FUNCTION_UCB0SCL
+
146  );
+
147  GPIO_setAsPeripheralModuleFunctionInputPin(
+
148  GPIO_PORT_UCB0SDA,
+
149  GPIO_PIN_UCB0SDA,
+
150  GPIO_FUNCTION_UCB0SDA
+
151  );
+
152 
+
153  /*
+
154  * Disable the GPIO power-on default high-impedance mode to activate
+
155  * previously configured port settings
+
156  */
+
157  PMM_unlockLPM5();
+
158 
+
159  EUSCI_B_I2C_initMasterParam param = {0};
+
160  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
161  param.i2cClk = CS_getSMCLK();
+
162  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
163  param.byteCounterThreshold = 0;
+
164  param.autoSTOPGeneration = EUSCI_B_I2C_NO_AUTO_STOP;
+
165  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
166 
+
167  //Specify slave address
+
168  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
170  );
+
171 
+
172  //Set Master in receive mode
+
173  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
174  EUSCI_B_I2C_TRANSMIT_MODE
+
175  );
+
176 
+
177  //Enable I2C Module to start operations
+
178  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
179 
+
180  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
181  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
182  EUSCI_B_I2C_NAK_INTERRUPT
+
183  );
+
184  //Enable master Receive interrupt
+
185  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
186  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
187  EUSCI_B_I2C_NAK_INTERRUPT
+
188  );
+
189  while(1)
+
190  {
+
191  __delay_cycles(1000); // Delay between transmissions
+
192  TXByteCtr = 4; // Load TX byte counter
+
193  TXData = 0;
+
194 
+
195  while (EUSCI_B_I2C_SENDING_STOP == EUSCI_B_I2C_masterIsStopSent(EUSCI_B0_BASE));
+
196 
+
197  EUSCI_B_I2C_masterSendMultiByteStart(EUSCI_B0_BASE, TXData++);
+
198 
+
199  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
200  // Remain in LPM0 until all data
+
201  // is TX'd
+
202  // Increment data byte
+
203  }
+
204 }
+
205 
+
206 //------------------------------------------------------------------------------
+
207 // The USCIAB0TX_ISR is structured such that it can be used to transmit any
+
208 // number of bytes by pre-loading TXByteCtr with the byte count. Also, TXData
+
209 // points to the next byte to transmit.
+
210 //------------------------------------------------------------------------------
+
211 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
212 #pragma vector=USCI_B0_VECTOR
+
213 __interrupt
+
214 #elif defined(__GNUC__)
+
215 __attribute__((interrupt(USCI_B0_VECTOR)))
+
216 #endif
+
217 void USCIB0_ISR(void)
+
218 {
+
219  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
220  {
+
221  case USCI_NONE: // No interrupts break;
+
222  break;
+
223  case USCI_I2C_UCALIFG: // Arbitration lost
+
224  break;
+
225  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
226  //resend start if NACK
+
227  EUSCI_B_I2C_masterSendStart(EUSCI_B0_BASE);
+
228  break;
+
229  case USCI_I2C_UCTXIFG0: // TXIFG0
+
230  // Check TX byte counter
+
231  if (TXByteCtr)
+
232  {
+
233  EUSCI_B_I2C_masterSendMultiByteNext(EUSCI_B0_BASE, TXData++);
+
234  // Decrement TX byte counter
+
235  TXByteCtr--;
+
236  }
+
237  else
+
238  {
+
239  EUSCI_B_I2C_masterSendMultiByteStop(EUSCI_B0_BASE);
+
240  // Exit LPM0
+ +
242  }
+
243  break;
+
244  default:
+
245  break;
+
246  }
+
247 }
+
248 
+ + +
void USCIB0_ISR(void)
+ + +
#define CS_SMCLK_FLLREF_RATIO
+
#define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ
+ +
MPU_initThreeSegmentsParam param
+ +
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html new file mode 100644 index 0000000..d682274 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html @@ -0,0 +1,226 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex3_slaveRxMultiple.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex3_slaveRxMultiple.c File Reference
+
+
+
#include "driverlib.h"
+#include "Board.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t RXData
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

/|\ /|\ MSP430FR2xx_4xx Board 10k 10k MSP430FR2xx_4xx Board slave | | master --------------— | | --------------—

+ + + + +
UCB0SDA <- -—+-> UCB0SDA
+

| UCB0SCL|<-+---—>|UCB0SCL | | | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 78 of file eusci_b_i2c_ex3_slaveRxMultiple.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 82 of file eusci_b_i2c_ex3_slaveRxMultiple.c.

+ +

References __no_operation(), param, and SLAVE_ADDRESS.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 140 of file eusci_b_i2c_ex3_slaveRxMultiple.c.

+ +

References RXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData
+
+ +

Definition at line 80 of file eusci_b_i2c_ex3_slaveRxMultiple.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.js new file mode 100644 index 0000000..a33c279 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "RXData", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html#a597ef8ed788642728c57f66b3a21544f", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c_source.html new file mode 100644 index 0000000..39a48b3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c_source.html @@ -0,0 +1,273 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex3_slaveRxMultiple.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex3_slaveRxMultiple.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // EUSCI_B0 I2C Slave RX single bytes from MSP430 Master
+
34 //
+
35 // Description: This demo connects two MSP430's via the I2C bus. The master
+
36 // transmits to the slave. This is the slave code. The interrupt driven
+
37 // data receiption is demonstrated using the USCI_B0 RX interrupt.
+
38 //
+
39 // Tested on MSP430FR4133
+
40 //
+
62 //
+
63 //******************************************************************************
+
64 #include "driverlib.h"
+
65 #include "Board.h"
+
66 
+
67 //*****************************************************************************
+
68 //
+
69 //Set the address for slave module. This is a 7-bit address sent in the
+
70 //following format:
+
71 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
72 //
+
73 //A zero in the "RS" position of the first byte means that the master
+
74 //transmits (sends) data to the selected slave, and a one in this position
+
75 //means that the master receives data from the slave.
+
76 //
+
77 //*****************************************************************************
+
78 #define SLAVE_ADDRESS 0x48
+
79 
+
80 uint8_t RXData;
+
81 
+
82 void main(void)
+
83 {
+
84  WDT_A_hold(WDT_A_BASE);
+
85 
+
86  // Configure Pins for I2C
+
87  GPIO_setAsPeripheralModuleFunctionInputPin(
+
88  GPIO_PORT_UCB0SCL,
+
89  GPIO_PIN_UCB0SCL,
+
90  GPIO_FUNCTION_UCB0SCL
+
91  );
+
92  GPIO_setAsPeripheralModuleFunctionInputPin(
+
93  GPIO_PORT_UCB0SDA,
+
94  GPIO_PIN_UCB0SDA,
+
95  GPIO_FUNCTION_UCB0SDA
+
96  );
+
97 
+
98  /*
+
99  * Disable the GPIO power-on default high-impedance mode to activate
+
100  * previously configured port settings
+
101  */
+
102  PMM_unlockLPM5();
+
103 
+
104  // eUSCI configuration
+
105  EUSCI_B_I2C_initSlaveParam param = {0};
+
106  param.slaveAddress = SLAVE_ADDRESS;
+
107  param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
108  param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
109  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &param);
+
110 
+
111  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
112 
+
113  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
114  EUSCI_B_I2C_RECEIVE_INTERRUPT0
+
115  );
+
116 
+
117  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
118  EUSCI_B_I2C_RECEIVE_INTERRUPT0
+
119  );
+
120 
+
121  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
122  __no_operation();
+
123 }
+
124 
+
125 //------------------------------------------------------------------------------
+
126 // The USCI_B0 data ISR RX vector is used to move received data from the I2C
+
127 // master to the MSP430 memory.
+
128 //------------------------------------------------------------------------------
+
129 //------------------------------------------------------------------------------
+
130 // The USCI_B0 state ISR TX vector is used to wake up the CPU from LPM0 in order
+
131 // to process the received data in the main program. LPM0 is only exit in case
+
132 // of a (re-)start or stop condition when actual data was received.
+
133 //------------------------------------------------------------------------------
+
134 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
135 #pragma vector=USCI_B0_VECTOR
+
136 __interrupt
+
137 #elif defined(__GNUC__)
+
138 __attribute__((interrupt(USCI_B0_VECTOR)))
+
139 #endif
+
140 void USCIB0_ISR(void)
+
141 {
+
142  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
143  {
+
144  case USCI_NONE: // No interrupts break;
+
145  break;
+
146  case USCI_I2C_UCALIFG: // Arbitration lost
+
147  break;
+
148  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
149  break;
+
150  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
151  break;
+
152  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
153  break;
+
154  case USCI_I2C_UCRXIFG3: // RXIFG3
+
155  break;
+
156  case USCI_I2C_UCTXIFG3: // TXIFG3
+
157  break;
+
158  case USCI_I2C_UCRXIFG2: // RXIFG2
+
159  break;
+
160  case USCI_I2C_UCTXIFG2: // TXIFG2
+
161  break;
+
162  case USCI_I2C_UCRXIFG1: // RXIFG1
+
163  break;
+
164  case USCI_I2C_UCTXIFG1: // TXIFG1
+
165  break;
+
166  case USCI_I2C_UCRXIFG0: // RXIFG0
+
167  RXData = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
168  break;
+
169  case USCI_I2C_UCTXIFG0: // TXIFG0
+
170  break;
+
171  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
172  break;
+
173  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
174  break;
+
175  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
176  break;
+
177  default:
+
178  break;
+
179  }
+
180 }
+
181 
+ + +
void USCIB0_ISR(void)
+
void main(void)
+
#define SLAVE_ADDRESS
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html new file mode 100644 index 0000000..2df61fd --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html @@ -0,0 +1,242 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex4_masterTxSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex4_masterTxSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
#define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ   1000
 
#define CS_SMCLK_FLLREF_RATIO   30
 
+ + + +

+Functions

void main (void)
 
+ + + +

+Variables

uint8_t transmitData
 
+

Macro Definition Documentation

+ +

◆ CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ

+ +
+
+ + + + +
#define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ   1000
+
+ +

Definition at line 90 of file eusci_b_i2c_ex4_masterTxSingle.c.

+ +
+
+ +

◆ CS_SMCLK_FLLREF_RATIO

+ +
+
+ + + + +
#define CS_SMCLK_FLLREF_RATIO   30
+
+ +

Definition at line 97 of file eusci_b_i2c_ex4_masterTxSingle.c.

+ +
+
+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

This example shows how to configure the I2C module as a master for single byte transmission in interrupt mode. The address of the slave module that the master is communicating with also set in this example.

+

Demo - EUSCI_B0 I2C Master TX single bytes to MSP430 Slave

+

Description: This demo connects two MSP430's via the I2C bus. The master transmits to the slave. This is the master code. It continuously transmits 00h, 01h, ..., 0ffh and demonstrates how to implement an I2C master transmitter sending a single byte using the USCI_B0 TX interrupt. ACLK = n/a, MCLK = SMCLK = BRCLK = default DCO = ~1MHz

                          /|\  /|\
+         MSP430FR4133      10k  10k     MSP430FR4133
+             slave         |    |        master
+       -----------------   |    |   -----------------
+     -|XIN  P5.2/UCB0SDA|<-|----+->|P5.2/UCB0SDA  XIN|-
+      |                 |  |       |                 | 32kHz
+     -|XOUT             |  |       |             XOUT|-
+      |     P5.3/UCB0SCL|<-+------>|P5.3/UCB0SCL     |
+      |                 |          |             P1.0|--> LED
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
  • CS
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 83 of file eusci_b_i2c_ex4_masterTxSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+
+

Variable Documentation

+ +

◆ transmitData

+ +
+
+ + + + +
uint8_t transmitData
+
+ +

Definition at line 99 of file eusci_b_i2c_ex4_masterTxSingle.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.js new file mode 100644 index 0000000..e2727a9 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.js @@ -0,0 +1,8 @@ +var _m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c = +[ + [ "CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html#abb16bfdd33b9d2ea4f8d121f54e3e6b8", null ], + [ "CS_SMCLK_FLLREF_RATIO", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html#aadaa11d9acd1cd658f32638079eafed6", null ], + [ "SLAVE_ADDRESS", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "transmitData", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html#ac23b8f721ac5b7a4315ba2c3409b9e0a", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c_source.html new file mode 100644 index 0000000..04432e6 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c_source.html @@ -0,0 +1,261 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex4_masterTxSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex4_masterTxSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*****************************************************************************
+
68 //
+
69 //*****************************************************************************
+
70 #include "driverlib.h"
+
71 
+
72 //*****************************************************************************
+
73 //
+
74 //Set the address for slave module. This is a 7-bit address sent in the
+
75 //following format:
+
76 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
77 //
+
78 //A zero in the "RS" position of the first byte means that the master
+
79 //transmits (sends) data to the selected slave, and a one in this position
+
80 //means that the master receives data from the slave.
+
81 //
+
82 //*****************************************************************************
+
83 #define SLAVE_ADDRESS 0x48
+
84 
+
85 //*****************************************************************************
+
86 //
+
87 //Target frequency for SMCLK in kHz
+
88 //
+
89 //*****************************************************************************
+
90 #define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ 1000
+
91 
+
92 //*****************************************************************************
+
93 //
+
94 //SMCLK/FLLRef Ratio
+
95 //
+
96 //*****************************************************************************
+
97 #define CS_SMCLK_FLLREF_RATIO 30
+
98 
+
99 uint8_t transmitData;
+
100 
+
101 void main (void)
+
102 {
+
103  WDT_A_hold(WDT_A_BASE);
+
104 
+
105  //Set Ratio and Desired MCLK Frequency and initialize DCO
+
106  CS_initFLLSettle(
+ + +
109  );
+
110 
+
111  //Set SMCLK = DCO with frequency divider of 1
+
112  CS_initClockSignal(
+
113  CS_SMCLK,
+
114  CS_DCOCLKDIV_SELECT,
+
115  CS_CLOCK_DIVIDER_1
+
116  );
+
117 
+
118  //Set MCLK = DCO with frequency divider of 1
+
119  CS_initClockSignal(
+
120  CS_MCLK,
+
121  CS_DCOCLKDIV_SELECT,
+
122  CS_CLOCK_DIVIDER_1
+
123  );
+
124 
+
125  // Configure Pins for I2C
+
126  /*
+
127  * Select Port 5
+
128  * Set Pin 2, 3 to input with function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
129  */
+
130  GPIO_setAsPeripheralModuleFunctionInputPin(
+
131  GPIO_PORT_P5,
+
132  GPIO_PIN2 + GPIO_PIN3,
+
133  GPIO_PRIMARY_MODULE_FUNCTION
+
134  );
+
135 
+
136  /*
+
137  * Disable the GPIO power-on default high-impedance mode to activate
+
138  * previously configured port settings
+
139  */
+
140  PMM_unlockLPM5();
+
141 
+
142  //Initialize transmit data packet
+
143  transmitData = 0x01;
+
144 
+
145  //Initialize Master
+
146  EUSCI_B_I2C_initMasterParam param = {0};
+
147  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
148  param.i2cClk = CS_getSMCLK();
+
149  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
150  param.byteCounterThreshold = 1;
+
151  param.autoSTOPGeneration = EUSCI_B_I2C_NO_AUTO_STOP;
+
152  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
153 
+
154  //Specify slave address
+
155  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
157  );
+
158 
+
159  //Set in transmit mode
+
160  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
161  EUSCI_B_I2C_TRANSMIT_MODE
+
162  );
+
163 
+
164  //Enable I2C Module to start operations
+
165  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
166 
+
167  while (1)
+
168  {
+
169  //Send single byte data.
+
170  EUSCI_B_I2C_masterSendSingleByte(EUSCI_B0_BASE,
+ +
172  );
+
173 
+
174  //Delay until transmission completes
+
175  while (EUSCI_B_I2C_isBusBusy(EUSCI_B0_BASE)) ;
+
176 
+
177  //Delay between each transaction
+
178  __delay_cycles(50);
+
179 
+
180  //Increment transmit data counter
+
181  transmitData++;
+
182  }
+
183 }
+
void main(void)
+
uint8_t transmitData
+
#define CS_SMCLK_FLLREF_RATIO
+
#define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ
+
#define SLAVE_ADDRESS
+
MPU_initThreeSegmentsParam param
+ +
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html new file mode 100644 index 0000000..546bd15 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html @@ -0,0 +1,230 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex4_slaveRxSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex4_slaveRxSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t RXData
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

This example shows how to configure the I2C module as a slave for single byte reception in interrupt driven mode. The address of the slave module is set in this example. EUSCI_B0 I2C Slave RX single bytes from MSP430 Master

+

Description: This demo connects two MSP430's via the I2C bus. The master transmits to the slave. This is the slave code. The interrupt driven data receiption is demonstrated using the USCI_B0 RX interrupt.

+

Tested on MSP430FR4133

                          /|\  /|\
+         MSP430FR4133      10k  10k     MSP430FR4133
+             slave         |    |        master
+       -----------------   |    |   -----------------
+     -|XIN  P5.2/UCB0SDA|<-|----+->|P5.2/UCB0SDA  XIN|-
+      |                 |  |       |                 | 32kHz
+     -|XOUT             |  |       |             XOUT|-
+      |     P5.3/UCB0SCL|<-+------>|P5.3/UCB0SCL     |
+      |                 |          |             P1.0|--> LED
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL
  • +
  • SDA
  • +
  • CS
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 82 of file eusci_b_i2c_ex4_slaveRxSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 86 of file eusci_b_i2c_ex4_slaveRxSingle.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 134 of file eusci_b_i2c_ex4_slaveRxSingle.c.

+ +

References RXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData
+
+ +

Definition at line 84 of file eusci_b_i2c_ex4_slaveRxSingle.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.js new file mode 100644 index 0000000..487d491 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "RXData", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html#a597ef8ed788642728c57f66b3a21544f", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c_source.html new file mode 100644 index 0000000..42a447f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c_source.html @@ -0,0 +1,251 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex4_slaveRxSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex4_slaveRxSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*****************************************************************************
+
67 //
+
68 //*****************************************************************************
+
69 #include "driverlib.h"
+
70 
+
71 //*****************************************************************************
+
72 //
+
73 //Set the address for slave module. This is a 7-bit address sent in the
+
74 //following format:
+
75 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
76 //
+
77 //A zero in the "RS" position of the first byte means that the master
+
78 //transmits (sends) data to the selected slave, and a one in this position
+
79 //means that the master receives data from the slave.
+
80 //
+
81 //*****************************************************************************
+
82 #define SLAVE_ADDRESS 0x48
+
83 
+
84 uint8_t RXData;
+
85 
+
86 void main(void)
+
87 {
+
88  WDT_A_hold(WDT_A_BASE);
+
89 
+
90  // Configure Pins for I2C
+
91  /*
+
92  * Select Port 5
+
93  * Set Pin 2, 3 to input with function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
94  */
+
95  GPIO_setAsPeripheralModuleFunctionInputPin(
+
96  GPIO_PORT_P5,
+
97  GPIO_PIN2 + GPIO_PIN3,
+
98  GPIO_PRIMARY_MODULE_FUNCTION
+
99  );
+
100 
+
101  /*
+
102  * Disable the GPIO power-on default high-impedance mode to activate
+
103  * previously configured port settings
+
104  */
+
105  PMM_unlockLPM5();
+
106 
+
107  // eUSCI configuration
+
108  EUSCI_B_I2C_initSlaveParam param = {0};
+
109  param.slaveAddress = 0x48;
+
110  param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
111  param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
112  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &param);
+
113 
+
114  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
115 
+
116  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
117  EUSCI_B_I2C_RECEIVE_INTERRUPT0
+
118  );
+
119 
+
120  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
121  EUSCI_B_I2C_RECEIVE_INTERRUPT0
+
122  );
+
123 
+
124  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
125  __no_operation();
+
126 }
+
127 
+
128 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
129 #pragma vector=USCI_B0_VECTOR
+
130 __interrupt
+
131 #elif defined(__GNUC__)
+
132 __attribute__((interrupt(USCI_B0_VECTOR)))
+
133 #endif
+
134 void USCIB0_ISR(void)
+
135 {
+
136  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
137  {
+
138  case USCI_NONE: // No interrupts break;
+
139  break;
+
140  case USCI_I2C_UCALIFG: // Arbitration lost
+
141  break;
+
142  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
143  break;
+
144  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
145  break;
+
146  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
147  break;
+
148  case USCI_I2C_UCRXIFG3: // RXIFG3
+
149  break;
+
150  case USCI_I2C_UCTXIFG3: // TXIFG3
+
151  break;
+
152  case USCI_I2C_UCRXIFG2: // RXIFG2
+
153  break;
+
154  case USCI_I2C_UCTXIFG2: // TXIFG2
+
155  break;
+
156  case USCI_I2C_UCRXIFG1: // RXIFG1
+
157  break;
+
158  case USCI_I2C_UCTXIFG1: // TXIFG1
+
159  break;
+
160  case USCI_I2C_UCRXIFG0: // RXIFG0
+
161  RXData = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
162  break;
+
163  case USCI_I2C_UCTXIFG0: // TXIFG0
+
164  break;
+
165  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
166  break;
+
167  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
168  break;
+
169  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
170  break;
+
171  default:
+
172  break;
+
173  }
+
174 }
+ +
void USCIB0_ISR(void)
+
void main(void)
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html new file mode 100644 index 0000000..faf4dcc --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html @@ -0,0 +1,282 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex5_masterMultipleSlave.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex5_masterMultipleSlave.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ   1000
 
#define CS_SMCLK_FLLREF_RATIO   30
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + + + + + + + +

+Variables

uint8_t TXData [] = {0xA1,0xB1,0xC1,0xD1}
 
uint8_t SlaveAddress [] = {0x0A,0x0B,0x0C,0x0D}
 
uint8_t TXByteCtr
 
uint8_t SlaveFlag = 0
 
+

Macro Definition Documentation

+ +

◆ CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ

+ +
+
+ + + + +
#define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ   1000
+
+

/|\ /|\ MSP430FR4133 10k 10k MSP430FR4133 slave | | master --------------— | | --------------— -|XIN P5.2/UCB0SDA|<-|-—+->|P5.2/UCB0SDA XIN|- | | | | | 32kHz -|XOUT | | | XOUT|- | P5.3/UCB0SCL|<-+---—>|P5.3/UCB0SCL | | | | P1.0|--> LED

+ +

Definition at line 60 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +
+
+ +

◆ CS_SMCLK_FLLREF_RATIO

+ +
+
+ + + + +
#define CS_SMCLK_FLLREF_RATIO   30
+
+ +

Definition at line 67 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 179 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +

References __bic_SR_register_on_exit(), SlaveFlag, TXByteCtr, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ SlaveAddress

+ +
+
+ + + + +
uint8_t SlaveAddress[] = {0x0A,0x0B,0x0C,0x0D}
+
+ +

Definition at line 70 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +
+
+ +

◆ SlaveFlag

+ +
+
+ + + + +
uint8_t SlaveFlag = 0
+
+ +

Definition at line 72 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +
+
+ +

◆ TXByteCtr

+ +
+
+ + + + +
uint8_t TXByteCtr
+
+ +

Definition at line 71 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData[] = {0xA1,0xB1,0xC1,0xD1}
+
+ +

Definition at line 69 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.js new file mode 100644 index 0000000..184ef9a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.js @@ -0,0 +1,11 @@ +var _m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c = +[ + [ "CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#abb16bfdd33b9d2ea4f8d121f54e3e6b8", null ], + [ "CS_SMCLK_FLLREF_RATIO", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#aadaa11d9acd1cd658f32638079eafed6", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "SlaveAddress", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#acab914ed25efe33c5ff39bffa442b25f", null ], + [ "SlaveFlag", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#a8400431f2b4b75fc33a2b9d755be8796", null ], + [ "TXByteCtr", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#a442fc7a9731fc8e66469e62429b32219", null ], + [ "TXData", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#adb697e8622bce2ab592d2ee2395bd672", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c_source.html new file mode 100644 index 0000000..809b72d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c_source.html @@ -0,0 +1,343 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex5_masterMultipleSlave.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex5_masterMultipleSlave.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Demo - EUSCI_B0 I2C Master TX bytes to Multiple Slaves
+
34 //
+
35 // Description: This demo connects two MSP430's via the I2C bus.
+
36 // The master transmits to 4 different I2C slave addresses 0x0A,0x0B,0x0C&0x0D.
+
37 // Each slave address has a specific related data in the array TXData[].
+
38 // At the end of four I2C transactions the slave address rolls over and begins
+
39 // again at 0x0A.
+
40 // ACLK = n/a, MCLK = SMCLK = BRCLK = default DCO = ~1MHz
+
41 //
+
51 //
+
52 //******************************************************************************
+
53 #include "driverlib.h"
+
54 
+
55 //*****************************************************************************
+
56 //
+
57 //Target frequency for SMCLK in kHz
+
58 //
+
59 //*****************************************************************************
+
60 #define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ 1000
+
61 
+
62 //*****************************************************************************
+
63 //
+
64 //SMCLK/FLLRef Ratio
+
65 //
+
66 //*****************************************************************************
+
67 #define CS_SMCLK_FLLREF_RATIO 30
+
68 
+
69 uint8_t TXData[]= {0xA1,0xB1,0xC1,0xD1};// Pointer to TX data
+
70 uint8_t SlaveAddress[]= {0x0A,0x0B,0x0C,0x0D};
+
71 uint8_t TXByteCtr;
+
72 uint8_t SlaveFlag = 0;
+
73 
+
74 void main(void)
+
75 {
+
76  WDT_A_hold(WDT_A_BASE);
+
77 
+
78  //Set Ratio and Desired MCLK Frequency and initialize DCO
+
79  CS_initFLLSettle(
+ + +
82  );
+
83 
+
84  //Set SMCLK = DCO with frequency divider of 1
+
85  CS_initClockSignal(
+
86  CS_SMCLK,
+
87  CS_DCOCLKDIV_SELECT,
+
88  CS_CLOCK_DIVIDER_1
+
89  );
+
90 
+
91  //Set MCLK = DCO with frequency divider of 1
+
92  CS_initClockSignal(
+
93  CS_MCLK,
+
94  CS_DCOCLKDIV_SELECT,
+
95  CS_CLOCK_DIVIDER_1
+
96  );
+
97 
+
98  // Configure Pins for I2C
+
99  /*
+
100  * Select Port 5
+
101  * Set Pin 2, 3 to input with function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
102  */
+
103  GPIO_setAsPeripheralModuleFunctionInputPin(
+
104  GPIO_PORT_P5,
+
105  GPIO_PIN2 + GPIO_PIN3,
+
106  GPIO_PRIMARY_MODULE_FUNCTION
+
107  );
+
108 
+
109  /*
+
110  * Disable the GPIO power-on default high-impedance mode to activate
+
111  * previously configured port settings
+
112  */
+
113  PMM_unlockLPM5();
+
114 
+
115  EUSCI_B_I2C_initMasterParam param = {0};
+
116  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
117  param.i2cClk = CS_getSMCLK();
+
118  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
119  param.byteCounterThreshold = 0;
+
120  param.autoSTOPGeneration = EUSCI_B_I2C_NO_AUTO_STOP;
+
121  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
122 
+
123  //Set Master in receive mode
+
124  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
125  EUSCI_B_I2C_TRANSMIT_MODE
+
126  );
+
127  //Enable I2C Module to start operations
+
128  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
129 
+
130  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
131  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
132  EUSCI_B_I2C_NAK_INTERRUPT
+
133  );
+
134 
+
135  //Enable master Receive interrupt
+
136  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
137  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
138  EUSCI_B_I2C_NAK_INTERRUPT
+
139  );
+
140 
+
141  SlaveFlag = 0;
+
142  while(1)
+
143  {
+
144  //Specify slave address
+
145  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
147  );
+
148 
+
149 
+
150  TXByteCtr = 1; // Load TX byte counter
+
151 
+
152  while (EUSCI_B_I2C_SENDING_STOP == EUSCI_B_I2C_masterIsStopSent
+
153  (EUSCI_B0_BASE));
+
154 
+
155 
+
156  EUSCI_B_I2C_masterSendStart(EUSCI_B0_BASE);
+
157 
+
158  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
159  // Remain in LPM0 until all data is TX'd
+
160 
+
161  // Change Slave address
+
162  SlaveFlag++;
+
163  if(SlaveFlag > 3) // Roll over slave address
+
164  {
+
165  SlaveFlag = 0;
+
166  __delay_cycles(1000); // Delay between transmissions
+
167  }
+
168 
+
169  }
+
170 
+
171 }
+
172 
+
173 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
174 #pragma vector=USCI_B0_VECTOR
+
175 __interrupt
+
176 #elif defined(__GNUC__)
+
177 __attribute__((interrupt(USCI_B0_VECTOR)))
+
178 #endif
+
179 void USCIB0_ISR(void)
+
180 {
+
181  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
182  {
+
183  case USCI_NONE: // No interrupts break;
+
184  break;
+
185  case USCI_I2C_UCALIFG: // Arbitration lost
+
186  break;
+
187  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
188  // Resend START if NAK'd
+
189  EUSCI_B_I2C_masterSendStart(EUSCI_B0_BASE);
+
190  break;
+
191  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
192  break;
+
193  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
194  break;
+
195  case USCI_I2C_UCRXIFG3: // RXIFG3
+
196  break;
+
197  case USCI_I2C_UCTXIFG3: // TXIFG3
+
198  break;
+
199  case USCI_I2C_UCRXIFG2: // RXIFG2
+
200  break;
+
201  case USCI_I2C_UCTXIFG2: // TXIFG2
+
202  break;
+
203  case USCI_I2C_UCRXIFG1: // RXIFG1
+
204  break;
+
205  case USCI_I2C_UCTXIFG1: // TXIFG1
+
206  break;
+
207  case USCI_I2C_UCRXIFG0: // RXIFG0
+
208  break;
+
209  case USCI_I2C_UCTXIFG0: // TXIFG0
+
210  // Check TX byte counter
+
211  if (TXByteCtr)
+
212  {
+
213  EUSCI_B_I2C_masterSendMultiByteNext(EUSCI_B0_BASE,
+
214  TXData[SlaveFlag]);
+
215  // Decrement TX byte counter
+
216  TXByteCtr--;
+
217  }
+
218  else
+
219  {
+
220  EUSCI_B_I2C_masterSendMultiByteStop(EUSCI_B0_BASE);
+
221  // Exit LPM0
+ +
223  }
+
224  break;
+
225  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
226  break;
+
227  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
228  break;
+
229  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
230  break;
+
231  default:
+
232  break;
+
233  }
+
234 }
+
235 
+ + + + + + +
#define CS_SMCLK_FLLREF_RATIO
+
#define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ
+
MPU_initThreeSegmentsParam param
+ +
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html new file mode 100644 index 0000000..8e8ec06 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html @@ -0,0 +1,241 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex5_slaveMultipleSlave.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex5_slaveMultipleSlave.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + + + + + + + +

+Variables

uint8_t RXData0 = 0
 
uint8_t RXData1 = 0
 
uint8_t RXData2 = 0
 
uint8_t RXData3 = 0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 59 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +

References __no_operation().

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 137 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +

References RXData0, RXData1, RXData2, and RXData3.

+ +
+
+

Variable Documentation

+ +

◆ RXData0

+ +
+
+ + + + +
uint8_t RXData0 = 0
+
+

/|\ /|\ MSP430FR4133 10k 10k MSP430FR4133 slave | | master --------------— | | --------------— -|XIN P5.2/UCB0SDA|<-|-—+->|P5.2/UCB0SDA XIN|- | | | | | 32kHz -|XOUT | | | XOUT|- | P5.3/UCB0SCL|<-+---—>|P5.3/UCB0SCL | | | | P1.0|--> LED

+ +

Definition at line 54 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +
+
+ +

◆ RXData1

+ +
+
+ + + + +
uint8_t RXData1 = 0
+
+ +

Definition at line 55 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +
+
+ +

◆ RXData2

+ +
+
+ + + + +
uint8_t RXData2 = 0
+
+ +

Definition at line 56 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +
+
+ +

◆ RXData3

+ +
+
+ + + + +
uint8_t RXData3 = 0
+
+ +

Definition at line 57 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.js new file mode 100644 index 0000000..db48675 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.js @@ -0,0 +1,9 @@ +var _m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "RXData0", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#ad8363a0fe210b31eb7174491f478dd02", null ], + [ "RXData1", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#afd0f3a79374491b2736c8448c3b85e3a", null ], + [ "RXData2", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#ad490477b6b68af21a68dcde8035a0f61", null ], + [ "RXData3", "_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#af6a6cccb6c28ae3621d22627201ff981", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c_source.html new file mode 100644 index 0000000..572a5cd --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c_source.html @@ -0,0 +1,285 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_i2c/eusci_b_i2c_ex5_slaveMultipleSlave.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex5_slaveMultipleSlave.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR57xx Demo - USCI_B0 I2C 4 Hardware I2C slaves
+
34 //
+
35 // Description: This demo connects two MSP430's via the I2C bus.
+
36 // This code configures the MSP430 USCI to be addressed as 4 independent I2C
+
37 // slaves. Each slave has its owm interrupt flag and data variable to store
+
38 // incoming data.
+
39 //
+
40 // Tested on MSP430FR4133
+
50 //
+
51 //******************************************************************************
+
52 #include "driverlib.h"
+
53 
+
54 uint8_t RXData0 = 0;
+
55 uint8_t RXData1 = 0;
+
56 uint8_t RXData2 = 0;
+
57 uint8_t RXData3 = 0;
+
58 
+
59 void main(void)
+
60 {
+
61 
+
62  WDT_A_hold(WDT_A_BASE);
+
63 
+
64  // Configure Pins for I2C
+
65  /*
+
66  * Select Port 5
+
67  * Set Pin 2, 3 to input with function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
68  */
+
69  GPIO_setAsPeripheralModuleFunctionInputPin(
+
70  GPIO_PORT_P5,
+
71  GPIO_PIN2 + GPIO_PIN3,
+
72  GPIO_PRIMARY_MODULE_FUNCTION
+
73  );
+
74 
+
75  /*
+
76  * Disable the GPIO power-on default high-impedance mode to activate
+
77  * previously configured port settings
+
78  */
+
79  PMM_unlockLPM5();
+
80 
+
81  // eUSCI configuration
+
82  //SLAVE0 own address is 0x0A+ enable
+
83  EUSCI_B_I2C_initSlaveParam initSlave0Param = {0};
+
84  initSlave0Param.slaveAddress = 0x0A;
+
85  initSlave0Param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
86  initSlave0Param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
87  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &initSlave0Param);
+
88 
+
89  //SLAVE1 own address is 0x0B+ enable
+
90  EUSCI_B_I2C_initSlaveParam initSlave1Param = {0};
+
91  initSlave1Param.slaveAddress = 0x0B;
+
92  initSlave1Param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET1;
+
93  initSlave1Param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
94  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &initSlave1Param);
+
95 
+
96  //SLAVE2 own address is 0x0C+ enable
+
97  EUSCI_B_I2C_initSlaveParam initSlave2Param = {0};
+
98  initSlave2Param.slaveAddress = 0x0C;
+
99  initSlave2Param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET2;
+
100  initSlave2Param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
101  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &initSlave2Param);
+
102 
+
103  //SLAVE3 own address is 0x0D+ enable
+
104  EUSCI_B_I2C_initSlaveParam initSlave3Param = {0};
+
105  initSlave3Param.slaveAddress = 0x0D;
+
106  initSlave3Param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET3;
+
107  initSlave3Param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
108  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &initSlave3Param);
+
109 
+
110  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
111 
+
112  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
113  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
114  EUSCI_B_I2C_RECEIVE_INTERRUPT1 +
+
115  EUSCI_B_I2C_RECEIVE_INTERRUPT2 +
+
116  EUSCI_B_I2C_RECEIVE_INTERRUPT3
+
117  );
+
118 
+
119  //receive interrupt enable
+
120  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
121  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
122  EUSCI_B_I2C_RECEIVE_INTERRUPT1 +
+
123  EUSCI_B_I2C_RECEIVE_INTERRUPT2 +
+
124  EUSCI_B_I2C_RECEIVE_INTERRUPT3
+
125  );
+
126 
+
127  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
128  __no_operation();
+
129 }
+
130 
+
131 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
132 #pragma vector=USCI_B0_VECTOR
+
133 __interrupt
+
134 #elif defined(__GNUC__)
+
135 __attribute__((interrupt(USCI_B0_VECTOR)))
+
136 #endif
+
137 void USCIB0_ISR(void)
+
138 {
+
139  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
140  {
+
141  case USCI_NONE: // No interrupts break;
+
142  break;
+
143  case USCI_I2C_UCALIFG: // Arbitration lost
+
144  break;
+
145  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
146  break;
+
147  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
148  break;
+
149  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
150  break;
+
151  case USCI_I2C_UCRXIFG3: // RXIFG3
+
152  RXData3 = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
153  break;
+
154  case USCI_I2C_UCTXIFG3: // TXIFG3
+
155  break;
+
156  case USCI_I2C_UCRXIFG2: // RXIFG2
+
157  RXData2 = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
158  break;
+
159  case USCI_I2C_UCTXIFG2: // TXIFG2
+
160  break;
+
161  case USCI_I2C_UCRXIFG1: // RXIFG1
+
162  RXData1 = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
163  break;
+
164  case USCI_I2C_UCTXIFG1: // TXIFG1
+
165  break;
+
166  case USCI_I2C_UCRXIFG0: // RXIFG0
+
167  RXData0 = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
168  break;
+
169  case USCI_I2C_UCTXIFG0: // TXIFG0
+
170  break;
+
171  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
172  break;
+
173  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
174  break;
+
175  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
176  break;
+
177  default:
+
178  break;
+
179  }
+
180 }
+
181 
+ + + + + + + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html new file mode 100644 index 0000000..7a6b2c3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html @@ -0,0 +1,220 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_spi/eusci_b_spi_ex1_master.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_spi_ex1_master.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCI_B0_ISR (void)
 
+ + + + + +

+Variables

uint8_t RXData = 0
 
uint8_t TXData = 0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 80 of file eusci_b_spi_ex1_master.c.

+ +

References __delay_cycles(), __no_operation(), GPIO_setOutputLowOnPin(), i, param, and TXData.

+ +
+
+ +

◆ USCI_B0_ISR()

+ +
+
+ + + + + + + + +
void USCI_B0_ISR (void )
+
+ +

Definition at line 194 of file eusci_b_spi_ex1_master.c.

+ +

References __delay_cycles(), RXData, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData = 0
+
+

USCI_B0, SPI 3-Wire Master Incremented Data This example shows how SPI master talks to SPI slave using 3-wire mode. Incrementing data is sent by the master starting at 0x01. Received data is expected to be same as the previous transmission. eUSCI RX ISR is used to handle communication with the CPU, normally in LPM0. If high, P1.0 indicates valid data reception. Because all execution after LPM0 is in ISRs, initialization waits for DCO to stabilize against SMCLK. MCLK = SMCLK = ACLK = ~32.768kHz

+

Use with SPI Slave Data Echo code example. If slave is in debug mode, P1.1 slave reset signal conflicts with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.

        Tested on MSP430FR4133
+            -----------------
+       /|\ |                 |
+        |  |                 |
+

Master—+->|RST | | | | P5.2|-> Data Out (UCB0SIMO) | | | P5.3|<- Data In (UCB0SOMI) | | | P5.1|-> Serial Clock Out (UCB0CLK)

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • SPI peripheral
  • +
  • GPIO Port peripheral (for SPI pins)
  • +
  • UCB0SIMO
  • +
  • UCB0SOMI
  • +
  • UCB0CLK
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR
  • +
+ +

Definition at line 77 of file eusci_b_spi_ex1_master.c.

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 78 of file eusci_b_spi_ex1_master.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.js new file mode 100644 index 0000000..5e45df5 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCI_B0_ISR", "_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html#abb8ec2e0335e1b8389161437129cc39a", null ], + [ "RXData", "_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html#a597ef8ed788642728c57f66b3a21544f", null ], + [ "TXData", "_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c_source.html new file mode 100644 index 0000000..c853067 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c_source.html @@ -0,0 +1,294 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_spi/eusci_b_spi_ex1_master.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_spi_ex1_master.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*****************************************************************************
+
74 //*****************************************************************************
+
75 #include "driverlib.h"
+
76 
+
77 uint8_t RXData = 0;
+
78 uint8_t TXData = 0;
+
79 
+
80 void main(void)
+
81 {
+
82  volatile uint16_t i;
+
83 
+
84  //Stop watchdog timer
+
85  WDT_A_hold(WDT_A_BASE);
+
86 
+
87  //Set P1.0 as an output pin.
+
88  /*
+
89 
+
90  * Select Port 1
+
91  * Set Pin 0 as output
+
92  */
+
93  GPIO_setAsOutputPin(
+
94  GPIO_PORT_P1,
+
95  GPIO_PIN0
+
96  );
+
97 
+
98  //Set P1.0 as Output Low.
+
99  /*
+
100 
+
101  * Select Port 1
+
102  * Set Pin 0 to output Low.
+
103  */
+ +
105  GPIO_PORT_P1,
+
106  GPIO_PIN0
+
107  );
+
108 
+
109  // XT1 Setup
+
110  //Set P4.1 and P4.2 as Function Input.
+
111  /*
+
112 
+
113  * Select Port 4
+
114  * Set Pin 1, 2 to input Module Function, XT1.
+
115  */
+
116  GPIO_setAsPeripheralModuleFunctionInputPin(
+
117  GPIO_PORT_P4,
+
118  GPIO_PIN1 + GPIO_PIN2,
+
119  GPIO_PRIMARY_MODULE_FUNCTION
+
120  );
+
121 
+
122  //Set external frequency for XT1
+
123  CS_setExternalClockSource(32768);
+
124 
+
125  //Select XT1 as the clock source for SMCLK with no frequency divider
+
126  CS_initClockSignal(CS_SMCLK, CS_XT1CLK_SELECT, CS_CLOCK_DIVIDER_1);
+
127 
+
128  //Start XT1 with no time out
+
129  CS_turnOnXT1(CS_XT1_DRIVE_0);
+
130 
+
131  // Configure SPI pins
+
132  // Configure Pins for UCB0CLK, UCB0TXD/UCB0SIMO and UCB0RXD/UCB0SOMI
+
133  /*
+
134 
+
135  * Select Port 5
+
136  * Set Pin 1, Pin 2 and Pin 3 to input with function.
+
137  */
+
138  GPIO_setAsPeripheralModuleFunctionInputPin(
+
139  GPIO_PORT_P5,
+
140  GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3,
+
141  GPIO_PRIMARY_MODULE_FUNCTION
+
142  );
+
143 
+
144  /*
+
145  * Disable the GPIO power-on default high-impedance mode to activate
+
146  * previously configured port settings
+
147  */
+
148  PMM_unlockLPM5();
+
149 
+
150  //Initialize Master
+
151  EUSCI_B_SPI_initMasterParam param = {0};
+
152  param.selectClockSource = EUSCI_B_SPI_CLOCKSOURCE_SMCLK;
+
153  param.clockSourceFrequency = CS_getSMCLK();
+
154  param.desiredSpiClock = 500000;
+
155  param.msbFirst = EUSCI_B_SPI_MSB_FIRST;
+
156  param.clockPhase = EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
+
157  param.clockPolarity = EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_HIGH;
+
158  param.spiMode = EUSCI_B_SPI_3PIN;
+
159  EUSCI_B_SPI_initMaster(EUSCI_B0_BASE, &param);
+
160 
+
161  //Enable SPI module
+
162  EUSCI_B_SPI_enable(EUSCI_B0_BASE);
+
163 
+
164  EUSCI_B_SPI_clearInterrupt(EUSCI_B0_BASE,
+
165  EUSCI_B_SPI_RECEIVE_INTERRUPT
+
166  );
+
167 
+
168  // Enable USCI_B0 RX interrupt
+
169  EUSCI_B_SPI_enableInterrupt(EUSCI_B0_BASE,
+
170  EUSCI_B_SPI_RECEIVE_INTERRUPT);
+
171 
+
172  //Wait for slave to initialize
+
173  __delay_cycles(100);
+
174 
+
175  TXData = 0x1; // Holds TX data
+
176 
+
177  //USCI_B0 TX buffer ready?
+
178  while (!EUSCI_B_SPI_getInterruptStatus(EUSCI_B0_BASE,
+
179  EUSCI_B_SPI_TRANSMIT_INTERRUPT)) ;
+
180 
+
181  //Transmit Data to slave
+
182  EUSCI_B_SPI_transmitData(EUSCI_B0_BASE, TXData);
+
183 
+
184  __bis_SR_register(LPM0_bits + GIE); // CPU off, enable interrupts
+
185  __no_operation(); // Remain in LPM0
+
186 }
+
187 
+
188 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
189 #pragma vector=USCI_B0_VECTOR
+
190 __interrupt
+
191 #elif defined(__GNUC__)
+
192 __attribute__((interrupt(USCI_B0_VECTOR)))
+
193 #endif
+
194 void USCI_B0_ISR (void)
+
195 {
+
196  switch (__even_in_range(UCB0IV, USCI_SPI_UCTXIFG))
+
197  {
+
198  case USCI_SPI_UCRXIFG: // UCRXIFG
+
199  //USCI_B0 TX buffer ready?
+
200  while (!EUSCI_B_SPI_getInterruptStatus(EUSCI_B0_BASE,
+
201  EUSCI_B_SPI_TRANSMIT_INTERRUPT));
+
202 
+
203  RXData = EUSCI_B_SPI_receiveData(EUSCI_B0_BASE);
+
204 
+
205  //Increment data
+
206  TXData++;
+
207 
+
208  //Send next value
+
209  EUSCI_B_SPI_transmitData(EUSCI_B0_BASE,
+
210  TXData
+
211  );
+
212 
+
213  //Delay between transmissions for slave to process information
+
214  __delay_cycles(40);
+
215  break;
+
216  default:
+
217  break;
+
218  }
+
219 }
+
220 
+
uint8_t RXData
+
void main(void)
+
void USCI_B0_ISR(void)
+
uint8_t TXData
+
MPU_initThreeSegmentsParam param
+ + +
__no_operation()
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html new file mode 100644 index 0000000..7294acd --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html @@ -0,0 +1,220 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_spi/eusci_b_spi_ex1_slave.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_spi_ex1_slave.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCI_B0_ISR (void)
 
+ + + + + +

+Variables

uint8_t transmitData = 0x01
 
uint8_t receiveData = 0x00
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 76 of file eusci_b_spi_ex1_slave.c.

+ +

References param.

+ +
+
+ +

◆ USCI_B0_ISR()

+ +
+
+ + + + + + + + +
void USCI_B0_ISR (void )
+
+ +

Definition at line 133 of file eusci_b_spi_ex1_slave.c.

+ +

References receiveData, and transmitData.

+ +
+
+

Variable Documentation

+ +

◆ receiveData

+ +
+
+ + + + +
uint8_t receiveData = 0x00
+
+ +

Definition at line 74 of file eusci_b_spi_ex1_slave.c.

+ +
+
+ +

◆ transmitData

+ +
+
+ + + + +
uint8_t transmitData = 0x01
+
+

SPI slave talks to SPI master using 3-wire mode. Data is received from master and data from slave is then transmitted back to master. USCI RX ISR is used to handle communication, CPU normally in LPM4. Prior to initial data exchange, master pulses slaves RST for complete reset.

+

Use with eusci_spi_ex1_master code example. If the slave is in debug mode, the reset signal from the master will conflict with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.

      Tested on MSP430FR4133
+          -----------------
+     /|\ |                 |
+      |  |                 |
+

Master—+->|RST | | | | P5.2|-> Data Out (UCB0SIMO) | | | P5.3|<- Data In (UCB0SOMI) | | | P5.1|-> Serial Clock Out (UCB0CLK)

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • SPI peripheral
  • +
  • GPIO Port peripheral (for SPI pins)
  • +
  • UCB0SIMO
  • +
  • UCB0SOMI
  • +
  • UCB0CLK
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR
  • +
+ +

Definition at line 74 of file eusci_b_spi_ex1_slave.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.js new file mode 100644 index 0000000..86a1b42 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCI_B0_ISR", "_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html#abb8ec2e0335e1b8389161437129cc39a", null ], + [ "receiveData", "_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html#a216001f02f93a2c0b512c1b8724bdc60", null ], + [ "transmitData", "_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html#ac23b8f721ac5b7a4315ba2c3409b9e0a", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c_source.html new file mode 100644 index 0000000..397b024 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c_source.html @@ -0,0 +1,232 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/eusci_b_spi/eusci_b_spi_ex1_slave.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_spi_ex1_slave.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*****************************************************************************
+
70 //
+
71 //*****************************************************************************
+
72 #include "driverlib.h"
+
73 
+
74 uint8_t transmitData = 0x01, receiveData = 0x00;
+
75 
+
76 void main(void)
+
77 {
+
78  //Stop watchdog timer
+
79  WDT_A_hold(WDT_A_BASE);
+
80 
+
81  // Configure SPI pins
+
82  // Configure Pins for UCB0CLK, UCB0TXD/UCB0SIMO and UCB0RXD/UCB0SOMI
+
83  /*
+
84 
+
85  * Select Port 5
+
86  * Set Pin 1, Pin 2 and Pin 3 to input with function.
+
87  */
+
88  GPIO_setAsPeripheralModuleFunctionInputPin(
+
89  GPIO_PORT_P5,
+
90  GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3,
+
91  GPIO_PRIMARY_MODULE_FUNCTION
+
92  );
+
93 
+
94  /*
+
95  * Disable the GPIO power-on default high-impedance mode to activate
+
96  * previously configured port settings
+
97  */
+
98  PMM_unlockLPM5();
+
99 
+
100  //Initialize slave to MSB first, inactive high clock polarity and 3 wire SPI
+
101  EUSCI_B_SPI_initSlaveParam param = {0};
+
102  param.msbFirst = EUSCI_B_SPI_MSB_FIRST;
+
103  param.clockPhase = EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
+
104  param.clockPolarity = EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_HIGH;
+
105  param.spiMode = EUSCI_B_SPI_3PIN;
+
106  EUSCI_B_SPI_initSlave(EUSCI_B0_BASE, &param);
+
107 
+
108  //Enable SPI Module
+
109  EUSCI_B_SPI_enable(EUSCI_B0_BASE);
+
110 
+
111  EUSCI_B_SPI_clearInterrupt(EUSCI_B0_BASE,
+
112  EUSCI_B_SPI_RECEIVE_INTERRUPT
+
113  );
+
114  //Enable Receive interrupt
+
115  EUSCI_B_SPI_enableInterrupt(EUSCI_B0_BASE,
+
116  EUSCI_B_SPI_RECEIVE_INTERRUPT
+
117  );
+
118 
+
119  __bis_SR_register(LPM0_bits + GIE); // Enter LPM0, enable interrupts
+
120 }
+
121 
+
122 //******************************************************************************
+
123 //
+
124 //This is the USCI_B0 interrupt vector service routine.
+
125 //
+
126 //******************************************************************************
+
127 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
128 #pragma vector=USCI_B0_VECTOR
+
129 __interrupt
+
130 #elif defined(__GNUC__)
+
131 __attribute__((interrupt(USCI_B0_VECTOR)))
+
132 #endif
+
133 void USCI_B0_ISR (void)
+
134 {
+
135  switch(__even_in_range(UCB0IV, USCI_SPI_UCTXIFG))
+
136  {
+
137  case USCI_SPI_UCRXIFG: // UCRXIFG
+
138  //USCI_B0 TX buffer ready?
+
139  while (!EUSCI_B_SPI_getInterruptStatus(EUSCI_B0_BASE,
+
140  EUSCI_B_SPI_TRANSMIT_INTERRUPT
+
141  ));
+
142 
+
143  //Transmit data to master
+
144  EUSCI_B_SPI_transmitData(EUSCI_B0_BASE,
+ +
146  );
+
147 
+
148  //Receive data from master
+
149  receiveData = EUSCI_B_SPI_receiveData(EUSCI_B0_BASE);
+
150 
+
151  //Increment data to be transmitted
+
152  transmitData++;
+
153  break;
+
154  default:
+
155  break;
+
156  }
+
157 }
+
158 
+
uint8_t receiveData
+
void main(void)
+
void USCI_B0_ISR(void)
+
uint8_t transmitData
+
MPU_initThreeSegmentsParam param
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2framctl_2framctl__ex1__write_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2framctl_2framctl__ex1__write_8c.html new file mode 100644 index 0000000..219d7e5 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2framctl_2framctl__ex1__write_8c.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/framctl/framctl_ex1_write.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
framctl_ex1_write.c File Reference
+
+
+
#include "driverlib.h"
+#include "Board.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define FRAM_TEST_START   0xCABA
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ FRAM_TEST_START

+ +
+
+ + + + +
#define FRAM_TEST_START   0xCABA
+
+

Long word writes to FRAM

+

Description: Use long word write to write to 512 byte blocks of FRAM. Toggle LEDs after every 100 writes. NOTE: Running this example for extended periods will impact the FRAM endurance. ACLK = VLO, MCLK = SMCLK = ~1.048MHz

    MSP430FR2xx_4xx Board
+       ---------------
+   /|\|               |
+    | |               |
+    --|RST            |
+      |               |
+      |               |
+      |               |-->LED1
+      |               |-->LED2
+
+

Definition at line 55 of file framctl_ex1_write.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 57 of file framctl_ex1_write.c.

+ +

References FRAM_TEST_START.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2framctl_2framctl__ex1__write_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2framctl_2framctl__ex1__write_8c.js new file mode 100644 index 0000000..b455a9b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2framctl_2framctl__ex1__write_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r2xx__4xx_2framctl_2framctl__ex1__write_8c = +[ + [ "FRAM_TEST_START", "_m_s_p430_f_r2xx__4xx_2framctl_2framctl__ex1__write_8c.html#a4776f26339da4e54480825286f6a55c2", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2framctl_2framctl__ex1__write_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2framctl_2framctl__ex1__write_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2framctl_2framctl__ex1__write_8c_source.html new file mode 100644 index 0000000..013dab7 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2framctl_2framctl__ex1__write_8c_source.html @@ -0,0 +1,191 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/framctl/framctl_ex1_write.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
framctl_ex1_write.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
51 //******************************************************************************
+
52 #include "driverlib.h"
+
53 #include "Board.h"
+
54 
+
55 #define FRAM_TEST_START 0xCABA
+
56 
+
57 void main(void) {
+
58  uint8_t count = 0;
+
59  uint32_t data = 0;
+
60 
+
61  // Stop WDT
+
62  WDT_A_hold(WDT_A_BASE);
+
63 
+
64  //Set LED1 as an output pin.
+
65  GPIO_setAsOutputPin(
+
66  GPIO_PORT_LED1,
+
67  GPIO_PIN_LED1);
+
68 
+
69  //Set LED2 as an output pin.
+
70  GPIO_setAsOutputPin(
+
71  GPIO_PORT_LED2,
+
72  GPIO_PIN_LED2);
+
73 
+
74  /*
+
75  * Disable the GPIO power-on default high-impedance mode to activate
+
76  * previously configured port settings
+
77  */
+
78  PMM_unlockLPM5();
+
79 
+
80  // Initialize dummy data
+
81  data = 0x11111111;
+
82 
+
83  while (1) {
+
84  data += 0x00010001;
+
85 
+
86  FRAMCtl_fillMemory32(data, (uint32_t *) FRAM_TEST_START,
+
87  128);
+
88  count++;
+
89  if (count > 100) {
+
90  //Toggle LED1 output pin.
+
91  GPIO_toggleOutputOnPin(GPIO_PORT_LED1, GPIO_PIN_LED1);
+
92  //Toggle LED2 output pin.
+
93  GPIO_toggleOutputOnPin(GPIO_PORT_LED2, GPIO_PIN_LED2);
+
94 
+
95  //Reset counter
+
96  count = 0;
+
97  data = 0x11111111;
+
98  }
+
99  }
+
100 }
+ +
#define FRAM_TEST_START
+
void main(void)
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex1__output_hi_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex1__output_hi_8c.html new file mode 100644 index 0000000..2b86714 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex1__output_hi_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/gpio/gpio_ex1_outputHi.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
gpio_ex1_outputHi.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 58 of file gpio_ex1_outputHi.c.

+ +

References __no_operation(), and GPIO_setOutputHighOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex1__output_hi_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex1__output_hi_8c.js new file mode 100644 index 0000000..c067a32 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex1__output_hi_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex1__output_hi_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex1__output_hi_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex1__output_hi_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex1__output_hi_8c_source.html new file mode 100644 index 0000000..a0dca34 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex1__output_hi_8c_source.html @@ -0,0 +1,199 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/gpio/gpio_ex1_outputHi.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
gpio_ex1_outputHi.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Write a Word to Port A (Port1+Port2)
+
34 //
+
35 // Writes a Word(FFFFh) to Port A and stays in LPM4
+
36 // ACLK = 32.768kHz, MCLK = SMCLK = default DCO
+
37 //
+
38 // Tested On: MSP430FR4133
+
39 // -----------------
+
40 // /|\| |
+
41 // | | |
+
42 // --|RST PA.x|-->HI
+
43 // | |
+
44 // | |
+
45 //
+
46 //
+
47 // This example uses the following peripherals and I/O signals. You must
+
48 // review these and change as needed for your own board:
+
49 // - GPIO Port peripheral
+
50 //
+
51 // This example uses the following interrupt handlers. To use this example
+
52 // in your own application you must add these interrupt handlers to your
+
53 // vector table.
+
54 // - None.
+
55 //******************************************************************************
+
56 #include "driverlib.h"
+
57 
+
58 void main (void)
+
59 {
+
60  //Stop WDT
+
61  WDT_A_hold(WDT_A_BASE);
+
62 
+
63  //PA.x output
+
64  GPIO_setAsOutputPin(
+
65  GPIO_PORT_PA,
+
66  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3 +
+
67  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7 +
+
68  GPIO_PIN8 + GPIO_PIN9 + GPIO_PIN10 + GPIO_PIN11 +
+
69  GPIO_PIN12 + GPIO_PIN13 + GPIO_PIN14 + GPIO_PIN15
+
70  );
+
71 
+
72 
+
73  //Set all PA pins HI
+ +
75 
+
76  GPIO_PORT_PA,
+
77  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3 +
+
78  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7 +
+
79  GPIO_PIN8 + GPIO_PIN9 + GPIO_PIN10 + GPIO_PIN11 +
+
80  GPIO_PIN12 + GPIO_PIN13 + GPIO_PIN14 + GPIO_PIN15
+
81  );
+
82 
+
83  PMM_unlockLPM5();
+
84 
+
85  //Enter LPM4 w/interrupts enabled
+
86  __bis_SR_register(LPM4_bits + GIE);
+
87 
+
88  //For debugger
+ +
90 }
+
void main(void)
+ +
__no_operation()
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex2__input_capture_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex2__input_capture_8c.html new file mode 100644 index 0000000..4eb5775 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex2__input_capture_8c.html @@ -0,0 +1,165 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/gpio/gpio_ex2_inputCapture.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
gpio_ex2_inputCapture.c File Reference
+
+
+
#include "driverlib.h"
+#include "Board.h"
+
+

Go to the source code of this file.

+ + + + + + + +

+Functions

void main (void)
 MSP430FR2xx_4xx Board. More...
 
void P1_ISR (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

MSP430FR2xx_4xx Board.

+ +

Definition at line 63 of file gpio_ex2_inputCapture.c.

+ +

References __no_operation().

+ +
+
+ +

◆ P1_ISR()

+ +
+
+ + + + + + + + +
void P1_ISR (void )
+
+ +

Definition at line 121 of file gpio_ex2_inputCapture.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex2__input_capture_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex2__input_capture_8c.js new file mode 100644 index 0000000..0680483 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex2__input_capture_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex2__input_capture_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex2__input_capture_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "P1_ISR", "_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex2__input_capture_8c.html#a1c48a061477784865d41fd1fbcd76419", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex2__input_capture_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex2__input_capture_8c_source.html new file mode 100644 index 0000000..cac2441 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex2__input_capture_8c_source.html @@ -0,0 +1,257 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/gpio/gpio_ex2_inputCapture.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
gpio_ex2_inputCapture.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Software Port Interrupt Service on S1 from LPM3 with
+
34 // Internal Pull-up Resistance Enabled
+
35 //
+
36 // A hi "TO" low transition on S1 will trigger P1_ISR/P2_ISR which,
+
37 // toggles LED1. S1 is internally enabled to pull-up. LPM3 current
+
38 // can be measured with the LED removed, all
+
39 // unused Px.x configured as output or inputs pulled high or low.
+
40 // ACLK = n/a, MCLK = SMCLK = default DCO
+
41 //
+
43 // -----------------
+
44 // /|\| |
+
45 // | | |
+
46 // --|RST |
+
47 // | |
+
48 // S1-->| |-->LED1
+
49 //
+
50 //
+
51 // This example uses the following peripherals and I/O signals. You must
+
52 // review these and change as needed for your own board:
+
53 // - GPIO Port peripheral
+
54 //
+
55 // This example uses the following interrupt handlers. To use this example
+
56 // in your own application you must add these interrupt handlers to your
+
57 // vector table.
+
58 // - PORT1_VECTOR/PORT2_VECTOR
+
59 //******************************************************************************
+
60 #include "driverlib.h"
+
61 #include "Board.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop watchdog timer
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set LED1 to output direction
+
69  GPIO_setAsOutputPin(
+
70  GPIO_PORT_LED1,
+
71  GPIO_PIN_LED1
+
72  );
+
73 
+
74  //Enable S1 internal resistance as pull-Up resistance
+
75  GPIO_setAsInputPinWithPullUpResistor(
+
76  GPIO_PORT_S1,
+
77  GPIO_PIN_S1
+
78  );
+
79 
+
80  //S1 interrupt enabled
+
81  GPIO_enableInterrupt(
+
82  GPIO_PORT_S1,
+
83  GPIO_PIN_S1
+
84  );
+
85 
+
86  //S1 Hi/Lo edge
+
87  GPIO_selectInterruptEdge(
+
88  GPIO_PORT_S1,
+
89  GPIO_PIN_S1,
+
90  GPIO_HIGH_TO_LOW_TRANSITION
+
91  );
+
92 
+
93 
+
94  //S1 IFG cleared
+
95  GPIO_clearInterrupt(
+
96  GPIO_PORT_S1,
+
97  GPIO_PIN_S1
+
98  );
+
99 
+
100  PMM_unlockLPM5();
+
101 
+
102  //Enter LPM3 w/interrupt
+
103  __bis_SR_register(LPM3_bits + GIE);
+
104 
+
105  //For debugger
+
106  __no_operation();
+
107 }
+
108 
+
109 #if GPIO_PORT_S1 == GPIO_PORT_P1
+
110 //******************************************************************************
+
111 //
+
112 //This is the PORT1_VECTOR interrupt vector service routine
+
113 //
+
114 //******************************************************************************
+
115 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
116 #pragma vector=PORT1_VECTOR
+
117 __interrupt
+
118 #elif defined(__GNUC__)
+
119 __attribute__((interrupt(PORT1_VECTOR)))
+
120 #endif
+
121 void P1_ISR (void)
+
122 #elif GPIO_PORT_S1 == GPIO_PORT_P2
+
123 //******************************************************************************
+
124 //
+
125 //This is the PORT2_VECTOR interrupt vector service routine
+
126 //
+
127 //******************************************************************************
+
128 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
129 #pragma vector=PORT2_VECTOR
+
130 __interrupt
+
131 #elif defined(__GNUC__)
+
132 __attribute__((interrupt(PORT2_VECTOR)))
+
133 #endif
+
134 void P2_ISR (void)
+
135 #endif // #if GPIO_PORT_S1
+
136 {
+
137  //LED1 = toggle
+
138  GPIO_toggleOutputOnPin(
+
139  GPIO_PORT_LED1,
+
140  GPIO_PIN_LED1
+
141  );
+
142 
+
143  //S1 IFG cleared
+
144  GPIO_clearInterrupt(
+
145  GPIO_PORT_S1,
+
146  GPIO_PIN_S1
+
147  );
+
148 }
+ +
void main(void)
+
void P1_ISR(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex3__software_poll_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex3__software_poll_8c.html new file mode 100644 index 0000000..267b347 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex3__software_poll_8c.html @@ -0,0 +1,154 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/gpio/gpio_ex3_softwarePoll.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
gpio_ex3_softwarePoll.c File Reference
+
+
+
#include "driverlib.h"
+#include "Board.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

Software Poll S1, Set LED1 if S1 =1

+

Poll S1 in a loop, if hi LED1 is set, if low, LED1 reset. ACLK = n/a, MCLK = SMCLK = default DCO

     MSP430FR2xx_4xx Board
+      -----------------
+  /|\|                 |
+   | |                 |
+   --|RST              |
+     |                 |
+S1-->|                 |-->LED1
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None
  • +
+ +

Definition at line 60 of file gpio_ex3_softwarePoll.c.

+ +

References GPIO_setOutputHighOnPin(), and GPIO_setOutputLowOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex3__software_poll_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex3__software_poll_8c.js new file mode 100644 index 0000000..ebf6926 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex3__software_poll_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex3__software_poll_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex3__software_poll_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex3__software_poll_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex3__software_poll_8c_source.html new file mode 100644 index 0000000..8bad0fa --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex3__software_poll_8c_source.html @@ -0,0 +1,190 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/gpio/gpio_ex3_softwarePoll.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
gpio_ex3_softwarePoll.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
56 //******************************************************************************
+
57 #include "driverlib.h"
+
58 #include "Board.h"
+
59 
+
60 void main (void)
+
61 {
+
62  //Stop watchdog timer
+
63  WDT_A_hold(WDT_A_BASE);
+
64 
+
65  //Set LED1 to output direction
+
66  GPIO_setAsOutputPin(
+
67  GPIO_PORT_LED1,
+
68  GPIO_PIN_LED1
+
69  );
+
70 
+
71  //Set S1 to input direction with internal pull-up resistance
+
72  GPIO_setAsInputPinWithPullUpResistor(
+
73  GPIO_PORT_S1,
+
74  GPIO_PIN_S1
+
75  );
+
76 
+
77  PMM_unlockLPM5();
+
78 
+
79  while (1)
+
80  {
+
81  //Test S1
+
82  if (GPIO_INPUT_PIN_HIGH == GPIO_getInputPinValue(
+
83  GPIO_PORT_S1,
+
84  GPIO_PIN_S1
+
85  ))
+
86  {
+
87  //if S1 set, set LED1
+ +
89  GPIO_PORT_LED1,
+
90  GPIO_PIN_LED1
+
91  );
+
92  }
+
93  else
+
94  {
+
95  //else reset
+ +
97  GPIO_PORT_LED1,
+
98  GPIO_PIN_LED1
+
99  );
+
100  }
+
101  }
+
102 }
+
103 
+ +
void main(void)
+ +
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex4__write_to_port1_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex4__write_to_port1_8c.html new file mode 100644 index 0000000..1c78fe0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex4__write_to_port1_8c.html @@ -0,0 +1,154 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/gpio/gpio_ex4_writeToPort1.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
gpio_ex4_writeToPort1.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

Write a byte to Port 1

+

Description: Writes a byte(0xFF) to Port 1 and stays in LPM4 mode ACLK = n/a, MCLK = SMCLK = default DCO

         MSP430FR4133
+      -----------------
+  /|\|                 |
+   | |                 |
+   --|RST              |
+     |             P1.x|-->HI
+     |                 |
+     |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 59 of file gpio_ex4_writeToPort1.c.

+ +

References __no_operation(), and GPIO_setOutputHighOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex4__write_to_port1_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex4__write_to_port1_8c.js new file mode 100644 index 0000000..38ba43e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex4__write_to_port1_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex4__write_to_port1_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex4__write_to_port1_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex4__write_to_port1_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex4__write_to_port1_8c_source.html new file mode 100644 index 0000000..8dbab10 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2gpio_2gpio__ex4__write_to_port1_8c_source.html @@ -0,0 +1,172 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/gpio/gpio_ex4_writeToPort1.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
gpio_ex4_writeToPort1.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
56 //******************************************************************************
+
57 #include "driverlib.h"
+
58 
+
59 void main (void)
+
60 {
+
61  //Stop watchdog timer
+
62  WDT_A_hold(WDT_A_BASE);
+
63 
+
64  //Set P1.x to output direction
+
65  GPIO_setAsOutputPin(
+
66  GPIO_PORT_P1,
+
67  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3 +
+
68  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7
+
69  );
+
70 
+
71  //Set all P1 pins HI
+ +
73  GPIO_PORT_P1,
+
74  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3 +
+
75  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7
+
76  );
+
77 
+
78  PMM_unlockLPM5();
+
79 
+
80  //Enter LPM4 w/interrupt
+
81  __bis_SR_register(LPM4_bits + GIE);
+
82 
+
83  //For debugger
+ +
85 }
+
86 
+
void main(void)
+ +
__no_operation()
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html new file mode 100644 index 0000000..2cb2faa --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex10_32bitSignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex10_32bitSignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 32x32 Signed Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RES0, RES1, RES2 and RES3.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex10_32bitSignedMultiply.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.js new file mode 100644 index 0000000..fae82ba --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c_source.html new file mode 100644 index 0000000..675c965 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c_source.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex10_32bitSignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex10_32bitSignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop Watchdog Timer
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
69  //signed multiplication
+
70  MPY32_setOperandOne32Bit(
+
71  MPY32_MULTIPLY_SIGNED,
+
72  0x12341234);
+
73 
+
74  //Set 32-bit Operand 2 to begin the multiplication operation
+
75  MPY32_setOperandTwo32Bit(
+
76  0x56785678);
+
77 
+
78  //Wait for the result to become ready
+ + + + + +
84 
+
85  //Enter LPM4
+
86  __bis_SR_register(LPM4_bits);
+
87 
+
88  //BREAKPOINT HERE to verify the correct Result in Registers:
+
89  //Verify if values are RES0=0x0060, RES1=0x06E6, RES2=0x0CAC, RES3=0x0626
+ +
91 }
+
92 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html new file mode 100644 index 0000000..6e8198a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex11_32bitSignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex11_32bitSignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 32x32 Signed Multiply Accumalate

+

Hardware multiplier is used to multiply-accumalate a set of numbers. The first calculation is automatically initiated after the second operand is loaded. A second multiply-accumulate operation is performed next. Results are stored in RES0, RES1, RES2 and RES3. SUMEXT contains the extended sign of the result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 66 of file mpy32_ex11_32bitSignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.js new file mode 100644 index 0000000..5e22b6e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c_source.html new file mode 100644 index 0000000..b34f93a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c_source.html @@ -0,0 +1,181 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex11_32bitSignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex11_32bitSignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
62 //******************************************************************************
+
63 
+
64 #include "driverlib.h"
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop Watchdog Timer
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
72  //unsigned multiplication
+
73  MPY32_setOperandOne32Bit(
+
74  MPY32_MULTIPLY_UNSIGNED,
+
75  0x12341234);
+
76  //Set 32-bit Operand 2 to begin the multiplication operation
+
77  MPY32_setOperandTwo32Bit(
+
78  0x56785678);
+
79 
+
80  //Wait for the result to become ready
+ + + + + +
86 
+
87  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
88  //signed multiplication added to the current result
+
89  MPY32_setOperandOne32Bit(
+
90  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
91  0x12341234);
+
92  //Set 32-bit Operand 2 to begin the multiplication operation
+
93  MPY32_setOperandTwo32Bit(
+
94  0x56785678);
+
95 
+
96  //Enter LPM4
+
97  __bis_SR_register(LPM4_bits);
+
98 
+
99  //BREAKPOINT HERE to verify the correct Result in Registers.
+
100  __no_operation();
+
101 }
+
102 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html new file mode 100644 index 0000000..0bec344 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex12_32bitUnsignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex12_32bitUnsignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 32x32 Unsigned Multiply Accumalate

+

Hardware multiplier is used to multiply-accumalate a set of numbers. The first calculation is automatically initiated after the second operand is loaded. A second multiply-accumulate operation is performed next. Results are stored in RES0, RES1, RES2 and RES3. SUMEXT contains the extended sign of the result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 65 of file mpy32_ex12_32bitUnsignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.js new file mode 100644 index 0000000..9fce462 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c_source.html new file mode 100644 index 0000000..d2a1091 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c_source.html @@ -0,0 +1,180 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex12_32bitUnsignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex12_32bitUnsignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
62 //******************************************************************************
+
63 #include "driverlib.h"
+
64 
+
65 void main (void)
+
66 {
+
67  //Stop Watchdog Timer
+
68  WDT_A_hold(WDT_A_BASE);
+
69 
+
70  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
71  //unsigned multiplication
+
72  MPY32_setOperandOne32Bit(
+
73  MPY32_MULTIPLY_UNSIGNED,
+
74  0x12341234);
+
75  //Set 32-bit Operand 2 to begin the multiplication operation
+
76  MPY32_setOperandTwo32Bit(
+
77  0x56785678);
+
78 
+
79  //Wait for the result to become ready
+ + + + + +
85 
+
86  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
87  //unsigned multiplication added to the current result
+
88  MPY32_setOperandOne32Bit(
+
89  MPY32_MULTIPLYACCUMULATE_UNSIGNED,
+
90  0x12341234);
+
91  //Set 32-bit Operand 2 to begin the multiplication operation
+
92  MPY32_setOperandTwo32Bit(
+
93  0x56785678);
+
94 
+
95  //Enter LPM4
+
96  __bis_SR_register(LPM4_bits);
+
97  //BREAKPOINT HERE to verify the correct Result in Registers.
+
98  //0xC4C19580DCC00C0
+ +
100 }
+
101 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html new file mode 100644 index 0000000..5101f82 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html @@ -0,0 +1,216 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex13_saturationUnderflow.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex13_saturationUnderflow.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + + + +

+Variables

uint32_t Result
 
uint16_t Result_lower16
 
uint16_t Result_upper16
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 69 of file mpy32_ex13_saturationUnderflow.c.

+ +

References __no_operation(), Result, Result_lower16, and Result_upper16.

+ +
+
+

Variable Documentation

+ +

◆ Result

+ +
+
+ + + + +
uint32_t Result
+
+

MPY - Saturation Mpode Underflow Test

+

Description: The example illustrates a special case showing underflow. Underflow occurs when adding 2 negative numbers yields a positive result. By having the saturation mode enabled, the result if rounded off to the highest negative number (0x8000.0000 for 16 bit). Results can be viewed in the debugger window.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 65 of file mpy32_ex13_saturationUnderflow.c.

+ +
+
+ +

◆ Result_lower16

+ +
+
+ + + + +
uint16_t Result_lower16
+
+ +

Definition at line 66 of file mpy32_ex13_saturationUnderflow.c.

+ +
+
+ +

◆ Result_upper16

+ +
+
+ + + + +
uint16_t Result_upper16
+
+ +

Definition at line 67 of file mpy32_ex13_saturationUnderflow.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.js new file mode 100644 index 0000000..cf143a3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Result", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html#a393f0b6791aa78cf29746a1877494247", null ], + [ "Result_lower16", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html#a9763beb1d3667cef32e0da3789b01e13", null ], + [ "Result_upper16", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html#afbdc37ba5018f94d28647a31a235b701", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c_source.html new file mode 100644 index 0000000..932eb5c --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex13__saturation_underflow_8c_source.html @@ -0,0 +1,204 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex13_saturationUnderflow.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex13_saturationUnderflow.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
62 //******************************************************************************
+
63 #include "driverlib.h"
+
64 
+
65 uint32_t Result;
+
66 uint16_t Result_lower16;
+
67 uint16_t Result_upper16;
+
68 
+
69 void main (void)
+
70 {
+
71  //Stop Watchdog Timer
+
72  WDT_A_hold(WDT_A_BASE);
+
73 
+
74 //------Pre-Multiply to setup RES0 and RES1 ------------------------
+
75 
+
76  MPY32_setOperandOne16Bit(
+
77  MPY32_MULTIPLY_UNSIGNED,
+
78  0x8000);
+
79  MPY32_setOperandTwo8Bit(
+
80  0x1);
+
81 
+
82 //------32-bit Result of a multiply operation in RES0 and RES1------
+
83 //RES1 == 0x0000
+
84 //RES0 == 0x8000
+
85 
+
86  MPY32CTL0 = MPYC; //Explicity Set MPY Carry Bit.
+
87  //Enable Saturation Mode.
+
88  MPY32_enableSaturationMode();
+
89 
+
90  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
91  //signed multiplication added to the current result
+
92  MPY32_setOperandOne16Bit(
+
93  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
94  0x8000);
+
95  //Set 16-bit Operand 2 to begin the multiplication operation
+
96  MPY32_setOperandTwo16Bit(
+
97  0x0005);
+
98 
+
99  //Wait for the result to become ready
+
100  __no_operation();
+
101  __no_operation();
+
102  __no_operation();
+
103  __no_operation();
+
104  __no_operation();
+
105 
+
106  //Read out Result
+
107  Result = MPY32_getResult();
+
108 
+
109  //Result_upper16 == 0x8000
+
110  //Result_lower16 == 0x0000
+
111 
+ +
113  Result_lower16 = (Result >> 16);
+
114 
+
115  //Disable Saturation Mode
+
116  MPY32_disableSaturationMode();
+
117 
+
118  //Enter LPM4
+
119  __bis_SR_register(LPM4_bits);
+
120  __no_operation();
+
121 }
+
122 
+ +
void main(void)
+
uint16_t Result_lower16
+
uint16_t Result_upper16
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html new file mode 100644 index 0000000..645fd31 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html @@ -0,0 +1,216 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex14_saturationOverflow.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex14_saturationOverflow.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + + + +

+Variables

uint32_t Result
 
uint16_t Result_lower16
 
uint16_t Result_upper16
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 70 of file mpy32_ex14_saturationOverflow.c.

+ +

References __no_operation(), Result, Result_lower16, and Result_upper16.

+ +
+
+

Variable Documentation

+ +

◆ Result

+ +
+
+ + + + +
uint32_t Result
+
+

MPY - Saturation Mode Overflow Test

+

The example illustrates a special case showing overflow. The addition result of 2 positive numbers may exceed the highest positive number (0x7FFF FFFF for 32 bit result) due to overflow indicating a negative result. By having the saturation mode enabled, this result can be truncated off to this highest positive number. Results with and without saturation mode are shown.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 66 of file mpy32_ex14_saturationOverflow.c.

+ +
+
+ +

◆ Result_lower16

+ +
+
+ + + + +
uint16_t Result_lower16
+
+ +

Definition at line 67 of file mpy32_ex14_saturationOverflow.c.

+ +
+
+ +

◆ Result_upper16

+ +
+
+ + + + +
uint16_t Result_upper16
+
+ +

Definition at line 68 of file mpy32_ex14_saturationOverflow.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.js new file mode 100644 index 0000000..fe20534 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Result", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html#a393f0b6791aa78cf29746a1877494247", null ], + [ "Result_lower16", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html#a9763beb1d3667cef32e0da3789b01e13", null ], + [ "Result_upper16", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html#afbdc37ba5018f94d28647a31a235b701", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c_source.html new file mode 100644 index 0000000..9d110ae --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex14__saturation_overflow_8c_source.html @@ -0,0 +1,210 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex14_saturationOverflow.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex14_saturationOverflow.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
63 //******************************************************************************
+
64 #include "driverlib.h"
+
65 
+
66 uint32_t Result;
+
67 uint16_t Result_lower16;
+
68 uint16_t Result_upper16;
+
69 
+
70 void main (void)
+
71 {
+
72  //Stop Watchdog Timer
+
73  WDT_A_hold(WDT_A_BASE);
+
74 
+
75 //------Pre-Multiply to setup RES0 and RES1 ------------------------
+
76 
+
77  MPY32_setOperandOne16Bit(
+
78  MPY32_MULTIPLY_UNSIGNED,
+
79  0xFFFF);
+
80  MPY32_setOperandTwo16Bit(
+
81  0x8000);
+
82  MPY32_setOperandOne16Bit(
+
83  MPY32_MULTIPLYACCUMULATE_UNSIGNED,
+
84  0x7FFD);
+
85  MPY32_setOperandTwo16Bit(
+
86  0x1);
+
87 
+
88 //------32-bit Result of a multiply operation in RES0 and RES1------
+
89 //RES1 == 0x7FFF
+
90 //RES0 == 0xFFFD
+
91 
+
92  //Enable Saturation Mode
+
93  MPY32_enableSaturationMode();
+
94 
+
95  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
96  //signed multiplication added to the current result
+
97  MPY32_setOperandOne16Bit(
+
98  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
99  0x05);
+
100 
+
101  //Set 16-bit Operand 2 to begin the multiplication operation
+
102  MPY32_setOperandTwo16Bit(
+
103  0x01);
+
104 
+
105  //Wait for the result to become ready
+
106  __no_operation();
+
107  __no_operation();
+
108  __no_operation();
+
109  __no_operation();
+
110  __no_operation();
+
111 
+
112  //Read out Result
+
113  Result = MPY32_getResult();
+
114 
+ +
116  Result_lower16 = (Result >> 16);
+
117 
+
118  //Disable Saturation Mode
+
119  MPY32_disableSaturationMode();
+
120 
+
121  //Enter LPM4
+
122  __bis_SR_register(LPM4_bits);
+
123 
+
124  //BREAKPOINT HERE to verify the correct Results:
+
125  //Result_upper16 == 0x7FFF
+
126  //Result_lower16 == 0xFFFF
+
127  __no_operation();
+
128 }
+
129 
+
uint32_t Result
+
void main(void)
+
uint16_t Result_lower16
+
uint16_t Result_upper16
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html new file mode 100644 index 0000000..8acd793 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html @@ -0,0 +1,198 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex15_fractionMode.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex15_fractionMode.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + +

+Variables

uint32_t Result
 
uint16_t Result_Q15
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file mpy32_ex15_fractionMode.c.

+ +

References __no_operation(), Result, and Result_Q15.

+ +
+
+

Variable Documentation

+ +

◆ Result

+ +
+
+ + + + +
uint32_t Result
+
+

MPY - Fractional mode, Q15 multiplication

+

The example illustrates multiplication of 2 Q15 numbers in fractional mode. The result is a Q15 (15 bit) number stored in the RES1 register. It can be viewed in the debugger window.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex15_fractionMode.c.

+ +
+
+ +

◆ Result_Q15

+ +
+
+ + + + +
uint16_t Result_Q15
+
+ +

Definition at line 64 of file mpy32_ex15_fractionMode.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex15__fraction_mode_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex15__fraction_mode_8c.js new file mode 100644 index 0000000..cc7ce4e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex15__fraction_mode_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex15__fraction_mode_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Result", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html#a393f0b6791aa78cf29746a1877494247", null ], + [ "Result_Q15", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html#a92e9913f091bda690c6dbc95a2319102", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex15__fraction_mode_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex15__fraction_mode_8c_source.html new file mode 100644 index 0000000..6f6d5c7 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex15__fraction_mode_8c_source.html @@ -0,0 +1,181 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex15_fractionMode.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex15_fractionMode.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 uint32_t Result;
+
64 uint16_t Result_Q15;
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop Watchdog Timer
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Enable Fraction Mode
+
72  MPY32_enableFractionalMode();
+
73 
+
74  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
75  //signed multiplication
+
76  MPY32_setOperandOne16Bit(
+
77  MPY32_MULTIPLY_SIGNED,
+
78  0x7D70);
+
79  //Set 16-bit Operand 2 to begin the multiplication operation
+
80  MPY32_setOperandTwo16Bit(
+
81  0x1000);
+
82 
+
83  //Read out Result
+
84  Result = MPY32_getResult();
+
85 
+
86  Result_Q15 = (Result >> 16);
+
87  //Q15 result == 0x0FAE
+
88 
+
89  //Disable Fraction Mode
+
90  MPY32_disableFractionalMode();
+
91 
+
92  //Enter LPM4
+
93  __bis_SR_register(LPM4_bits);
+
94 
+
95  //BREAKPOINT HERE to verify the correct Result_Q15
+ +
97 }
+
98 
+
uint32_t Result
+
void main(void)
+
uint16_t Result_Q15
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html new file mode 100644 index 0000000..964ed1b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex1_16bitUnsignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex1_16bitUnsignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 16x16 Unsigned Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RESLO and RESHI.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex1_16bitUnsignedMultiply.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.js new file mode 100644 index 0000000..0142229 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c_source.html new file mode 100644 index 0000000..468b006 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c_source.html @@ -0,0 +1,164 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex1_16bitUnsignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex1_16bitUnsignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop Watchdog Timer
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
69  //unsigned multiplication
+
70  MPY32_setOperandOne16Bit(MPY32_MULTIPLY_UNSIGNED,
+
71  0x1234);
+
72 
+
73  //Set Operand 2 to begin the multiplication operation
+
74  MPY32_setOperandTwo16Bit(0x5678);
+
75 
+
76  //Enter LPM4
+
77  __bis_SR_register(LPM4_bits);
+
78 
+
79  //BREAKPOINT HERE to verify the correct Result in Registers:
+
80  //Verify if RESLO == 0x0060 and RESHI == 0x0626
+ +
82 }
+
83 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html new file mode 100644 index 0000000..9f409e5 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex2_8bitUnsignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex2_8bitUnsignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 8x8 Unsigned Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RESLO and RESHI.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex2_8bitUnsignedMultiply.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.js new file mode 100644 index 0000000..839af7a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c_source.html new file mode 100644 index 0000000..90ae5ac --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c_source.html @@ -0,0 +1,164 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex2_8bitUnsignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex2_8bitUnsignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop Watchdog Timer
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
69  //unsigned multiplication
+
70  MPY32_setOperandOne8Bit(
+
71  MPY32_MULTIPLY_UNSIGNED,
+
72  0x12);
+
73  //Set 8- bit Operand 2 to begin the multiplication operation
+
74  MPY32_setOperandTwo8Bit(
+
75  0x56);
+
76 
+
77  //Enter LPM4
+
78  __bis_SR_register(LPM4_bits);
+
79  //BREAKPOINT HERE to verify the correct Result in Registers,
+
80  //RES0=0x060c RES1=0x0000
+ +
82 }
+
83 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html new file mode 100644 index 0000000..e78e159 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html @@ -0,0 +1,216 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex3_16bitSignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex3_16bitSignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + + + +

+Variables

int16_t multiplier = 0x1234
 
int16_t operand = -6578
 
int64_t Result
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 68 of file mpy32_ex3_16bitSignedMultiply.c.

+ +

References __no_operation(), multiplier, operand, and Result.

+ +
+
+

Variable Documentation

+ +

◆ multiplier

+ +
+
+ + + + +
int16_t multiplier = 0x1234
+
+

MPY - 16x16 Signed Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RESLO, RESHI and SUMEXT = FFFF if result is negative, SUMEXT = 0 otherwise. Result is also stored as Result variable.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex3_16bitSignedMultiply.c.

+ +
+
+ +

◆ operand

+ +
+
+ + + + +
int16_t operand = -6578
+
+ +

Definition at line 65 of file mpy32_ex3_16bitSignedMultiply.c.

+ +
+
+ +

◆ Result

+ +
+
+ + + + +
int64_t Result
+
+ +

Definition at line 66 of file mpy32_ex3_16bitSignedMultiply.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.js new file mode 100644 index 0000000..8450be1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "multiplier", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html#a3b6affddfe426e29d8e6f98049e8a9f2", null ], + [ "operand", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html#a917f1d27bc92d7287c57835107470d07", null ], + [ "Result", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html#af5df517f0190d126def9ba83a94ef595", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c_source.html new file mode 100644 index 0000000..b990fcd --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c_source.html @@ -0,0 +1,174 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex3_16bitSignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex3_16bitSignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 int16_t multiplier = 0x1234;
+
65 int16_t operand = -6578;
+
66 int64_t Result;
+
67 
+
68 void main (void)
+
69 {
+
70  //Stop Watchdog Timer
+
71  WDT_A_hold(WDT_A_BASE);
+
72 
+
73  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
74  //signed multiplication
+
75  MPY32_setOperandOne16Bit(
+
76  MPY32_MULTIPLY_SIGNED,
+
77  multiplier);
+
78  //Set 16-bit Operand 2 to begin the multiplication operation
+
79  MPY32_setOperandTwo16Bit(
+
80  operand);
+
81 
+
82  //Read out the result
+
83  Result = MPY32_getResult();
+
84 
+
85  //Enter LPM4
+
86  __bis_SR_register(LPM4_bits);
+
87 
+
88  //BREAKPOINT HERE to verify the correct Result
+ +
90 }
+
91 
+
int16_t multiplier
+
void main(void)
+ + + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html new file mode 100644 index 0000000..1458590 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex4_8bitSignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex4_8bitSignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 8x8 Signed Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RESLO, RESHI and SUMEXT = FFFF if result is negative, SUMEXT = 0 otherwise.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex4_8bitSignedMultiply.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.js new file mode 100644 index 0000000..9b876e3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c_source.html new file mode 100644 index 0000000..16ef5d1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c_source.html @@ -0,0 +1,170 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex4_8bitSignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex4_8bitSignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  uint8_t value1,value2;
+
67 
+
68  //Stop Watchdog Timer
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Assign operands for signed multiplication
+
72  value1 = 0x04; //value1 == 4
+
73  value2 = 0x84; //value2 == -124
+
74 
+
75  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
76  //signed multiplication
+
77  MPY32_setOperandOne8Bit(
+
78  MPY32_MULTIPLY_SIGNED,
+
79  value1);
+
80 
+
81  //Set 8- bit Operand 2 to begin the multiplication operation
+
82  MPY32_setOperandTwo8Bit(
+
83  value2);
+
84 
+
85  //Enter LPM4
+
86  __bis_SR_register(LPM4_bits);
+
87  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
89 }
+
90 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html new file mode 100644 index 0000000..f8458b9 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex5_16bitUnsignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex5_16bitUnsignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 16x16 Unsigned Multiply Accumulate

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. A second multiply accumulate operation is performed after that. Results are stored in RESLO and RESHI. SUMEXT contains the carry of the result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex5_16bitUnsignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.js new file mode 100644 index 0000000..e5e0d14 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c_source.html new file mode 100644 index 0000000..ebc92e3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c_source.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex5_16bitUnsignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex5_16bitUnsignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  //Stop Watchdog Timer
+
67  WDT_A_hold(WDT_A_BASE);
+
68 
+
69  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
70  //unsigned multiplication
+
71  MPY32_setOperandOne16Bit(
+
72  MPY32_MULTIPLY_UNSIGNED,
+
73  0x1234);
+
74  //Set 16-bit Operand 2 to begin the multiplication operation
+
75  MPY32_setOperandTwo16Bit(
+
76  0x5678);
+
77 
+
78  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
79  //unsigned multiplication added to the current result
+
80  MPY32_setOperandOne16Bit(
+
81  MPY32_MULTIPLYACCUMULATE_UNSIGNED,
+
82  0x1234);
+
83  //Set 16-bit Operand 2 to begin the multiplication operation
+
84  MPY32_setOperandTwo16Bit(
+
85  0x5678);
+
86 
+
87  //Enter LPM4
+
88  __bis_SR_register(LPM4_bits);
+
89 
+
90  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
92 }
+
93 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html new file mode 100644 index 0000000..5b273cb --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html @@ -0,0 +1,156 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex6_8bitUnsignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex6_8bitUnsignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 8x8 Unsigned Multiply Accumulate

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. A second multiply accumulate operation is performed after that. Results are stored in RESLO and RESHI. SUMEXT contains the carry of the result.

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 62 of file mpy32_ex6_8bitUnsignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.js new file mode 100644 index 0000000..6a20738 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c_source.html new file mode 100644 index 0000000..7103d7d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c_source.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex6_8bitUnsignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex6_8bitUnsignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
59 //******************************************************************************
+
60 #include "driverlib.h"
+
61 
+
62 void main (void)
+
63 {
+
64  //Stop Watchdog Timer
+
65  WDT_A_hold(WDT_A_BASE);
+
66 
+
67  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
68  //unsigned multiplication
+
69  MPY32_setOperandOne8Bit(
+
70  MPY32_MULTIPLY_UNSIGNED,
+
71  0x12);
+
72  //Set 8- bit Operand 2 to begin the multiplication operation
+
73  MPY32_setOperandTwo8Bit(
+
74  0x56);
+
75 
+
76  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
77  //unsigned multiplication added to the current result
+
78  MPY32_setOperandOne8Bit(
+
79  MPY32_MULTIPLYACCUMULATE_UNSIGNED,
+
80  0x12);
+
81  //Set 8- bit Operand 2 to begin the multiplication operation
+
82  MPY32_setOperandTwo8Bit(
+
83  0x56);
+
84 
+
85  //Enter LPM4
+
86  __bis_SR_register(LPM4_bits);
+
87 
+
88  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
90 }
+
91 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html new file mode 100644 index 0000000..e572c72 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex7_16bitSignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex7_16bitSignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 16x16 Signed Multiply Accumulate

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. A second multiply-accumulate operation is performed after that. Results are stored in RESLO and RESHI. SUMEXT contains the extended sign of the result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex7_16bitSignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.js new file mode 100644 index 0000000..75be04b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c_source.html new file mode 100644 index 0000000..192bdfa --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c_source.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex7_16bitSignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex7_16bitSignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  //Stop Watchdog Timer
+
67  WDT_A_hold(WDT_A_BASE);
+
68 
+
69  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
70  //unsigned multiplication
+
71  MPY32_setOperandOne16Bit(
+
72  MPY32_MULTIPLY_UNSIGNED,
+
73  0x1234);
+
74  //Set 16-bit Operand 2 to begin the multiplication operation
+
75  MPY32_setOperandTwo16Bit(
+
76  0x5678);
+
77 
+
78  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
79  //signed multiplication added to the current result
+
80  MPY32_setOperandOne16Bit(
+
81  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
82  0x1234);
+
83  //Set 16-bit Operand 2 to begin the multiplication operation
+
84  MPY32_setOperandTwo16Bit(
+
85  0x5678);
+
86 
+
87  //Enter LPM4
+
88  __bis_SR_register(LPM4_bits);
+
89 
+
90  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
92 }
+
93 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html new file mode 100644 index 0000000..963ab19 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex8_8bitSignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex8_8bitSignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 8x8 Signed Multiply Accumulate

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. A second multiply accumulate operation is performed after that. Results are stored in RESLO and RESHI. SUMEXT contains the extended sign of result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex8_8bitSignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.js new file mode 100644 index 0000000..bf45406 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c_source.html new file mode 100644 index 0000000..c729b21 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c_source.html @@ -0,0 +1,180 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex8_8bitSignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex8_8bitSignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  uint8_t value1,value2;
+
67 
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
72  //unsigned multiplication
+
73  MPY32_setOperandOne16Bit(
+
74  MPY32_MULTIPLY_UNSIGNED,
+
75  0x1234);
+
76  //Set 8- bit Operand 2 to begin the multiplication operation
+
77  MPY32_setOperandTwo16Bit(
+
78  0x5678);
+
79 
+
80  //Load Operand Values for Signed MAC
+
81  value1 = 0x12;
+
82  value2 = 0x16;
+
83 
+
84  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
85  //unsigned multiplication added to the current result
+
86  MPY32_setOperandOne8Bit(
+
87  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
88  value1);
+
89 
+
90  //Set 8- bit Operand 2 to begin the multiplication operation
+
91  MPY32_setOperandTwo8Bit(
+
92  value2);
+
93 
+
94  //Enter LPM4
+
95  __bis_SR_register(LPM4_bits);
+
96 
+
97  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
99 }
+
100 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html new file mode 100644 index 0000000..fe09e22 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html @@ -0,0 +1,180 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex9_32bitUnsignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex9_32bitUnsignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + +

+Variables

uint64_t Result
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 65 of file mpy32_ex9_32bitUnsignedMultiply.c.

+ +

References __no_operation(), and Result.

+ +
+
+

Variable Documentation

+ +

◆ Result

+ +
+
+ + + + +
uint64_t Result
+
+

MPY - 32x32 Unsigned Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RES0, RES1, RES2 and RES3.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex9_32bitUnsignedMultiply.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.js new file mode 100644 index 0000000..c4d6cd7 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Result", "_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html#a84a5e5c775453416939a34ab72557bc5", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c_source.html new file mode 100644 index 0000000..ac62c96 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c_source.html @@ -0,0 +1,177 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/mpy32/mpy32_ex9_32bitUnsignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex9_32bitUnsignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 uint64_t Result;
+
64 
+
65 void main (void)
+
66 {
+
67  //Stop Watchdog Timer
+
68  WDT_A_hold(WDT_A_BASE);
+
69 
+
70  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
71  //unsigned multiplication
+
72  MPY32_setOperandOne32Bit(
+
73  MPY32_MULTIPLY_UNSIGNED,
+
74  0x12341234);
+
75  //Set 32-bit Operand 2 to begin the multiplication operation
+
76  MPY32_setOperandTwo32Bit(
+
77  0x56785678);
+
78 
+
79  //Wait for the result to become ready
+ + + + + +
85 
+
86  //Read out Result
+
87  Result = MPY32_getResult();
+
88 
+
89  //Enter LPM4
+
90  __bis_SR_register(LPM4_bits);
+
91 
+
92  //BREAKPOINT HERE to verify the correct Result
+ +
94 }
+
95 
+
void main(void)
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2pmm_2pmm___reset___l_p_mx__5_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2pmm_2pmm___reset___l_p_mx__5_8c.html new file mode 100644 index 0000000..1a2fdea --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2pmm_2pmm___reset___l_p_mx__5_8c.html @@ -0,0 +1,152 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/pmm/pmm_Reset_LPMx_5.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
pmm_Reset_LPMx_5.c File Reference
+
+
+
#include "driverlib.h"
+#include "Board.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

+MSP430FR2xx_4xx Board

+ + + + + + + + + +
/ |
RST
-->LED1
+ +

Definition at line 60 of file pmm_Reset_LPMx_5.c.

+ +

References __delay_cycles(), __no_operation(), and GPIO_setOutputHighOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2pmm_2pmm___reset___l_p_mx__5_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2pmm_2pmm___reset___l_p_mx__5_8c.js new file mode 100644 index 0000000..27bd29a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2pmm_2pmm___reset___l_p_mx__5_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2pmm_2pmm___reset___l_p_mx__5_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2pmm_2pmm___reset___l_p_mx__5_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2pmm_2pmm___reset___l_p_mx__5_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2pmm_2pmm___reset___l_p_mx__5_8c_source.html new file mode 100644 index 0000000..9442795 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2pmm_2pmm___reset___l_p_mx__5_8c_source.html @@ -0,0 +1,240 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/pmm/pmm_Reset_LPMx_5.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
pmm_Reset_LPMx_5.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // This example shows transitions between a user Reset via the reset button, a
+
34 // software triggered BOR, and entrance into LPM3.5.
+
35 // Reading the reset interrupt flag from PMMIFG register is equivalent
+
36 // to reading from reset vector register.
+
37 //*******************************************************************************
+
38 //
+
39 // 1) Power on device:
+
40 // LED1 and LED2 off: device is running and was not in LPM3.5 mode previously.
+
41 //
+
42 // 2) Press User Reset button:
+
43 //
+
44 // LED1 turns on, device is running and has reset due to RST pin
+
45 // LED2 toggles on/off: device has reset due to a software BOR
+
46 // LED1 and LED2 on: device is now in LPM3.5
+
47 //
+
55 //
+
56 //********************************************************************************
+
57 #include "driverlib.h"
+
58 #include "Board.h"
+
59 
+
60 void main(void)
+
61 {
+
62  //Stop watchdog timer
+
63  WDT_A_hold(WDT_A_BASE);
+
64 
+
65  /*
+
66  * By default, the pins are unlocked unless waking
+
67  * up from an LPMx.5 state in which case all GPIO
+
68  * are previously locked.
+
69  *
+
70  */
+
71  PMM_unlockLPM5();
+
72  //Set LED1 as output pins.
+
73  GPIO_setAsOutputPin(
+
74  GPIO_PORT_LED1,
+
75  GPIO_PIN_LED1
+
76  );
+
77  //Set LED2 as output pins.
+
78  GPIO_setAsOutputPin(
+
79  GPIO_PORT_LED2,
+
80  GPIO_PIN_LED2
+
81  );
+
82 
+
83  //Was this reset triggered by the Reset flag?
+
84  if (PMM_getInterruptStatus(PMM_RST_INTERRUPT))
+
85  {
+
86  //Clear reset flag
+
87  PMM_clearInterrupt(PMM_RST_INTERRUPT);
+ +
89  GPIO_PORT_LED1,
+
90  GPIO_PIN_LED1
+
91  );
+
92  //Create a visual delay
+
93  __delay_cycles(1000000);
+
94 
+
95  //Trigger a software Brown Out Reset (BOR)
+
96  /*
+
97  * Base Address of PMM,
+
98  * Forces the devices to perform a BOR.
+
99  */
+
100  //Software trigger a BOR.
+
101  PMM_trigBOR();
+
102  }
+
103 
+
104  //Was this reset triggered by the BOR flag?
+
105  if (PMM_getInterruptStatus(PMM_BOR_INTERRUPT))
+
106  {
+
107  //Clear BOR flag
+
108  PMM_clearInterrupt(PMM_BOR_INTERRUPT);
+
109  GPIO_toggleOutputOnPin(
+
110  GPIO_PORT_LED2,
+
111  GPIO_PIN_LED2
+
112  );
+
113  //Create a visual delay
+
114  __delay_cycles(1000000);
+
115  GPIO_toggleOutputOnPin(
+
116  GPIO_PORT_LED2,
+
117  GPIO_PIN_LED2
+
118  );
+
119 
+
120  //Disable Regulator
+
121  /*
+
122  * Base Address of PMM,
+
123  * Regulator is turned off when going to LPM3/4.
+
124  * System enters LPM3.5 or LPM4.5, respectively.
+
125  */
+
126  PMM_turnOffRegulator();
+
127  // Enter LPM3.5
+
128  __bis_SR_register(LPM3_bits);
+
129  }
+
130 
+
131  while (1)
+
132  {
+
133  // Don't sleep
+
134  __no_operation();
+
135  }
+
136 }
+ +
void main(void)
+ +
__no_operation()
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex1__pwm_single_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex1__pwm_single_8c.html new file mode 100644 index 0000000..7d4110f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex1__pwm_single_8c.html @@ -0,0 +1,198 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_a/timer_a_ex1_pwmSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex1_pwmSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define TIMER_A_PERIOD   524
 
#define DUTY_CYCLE   393
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE

+ +
+
+ + + + +
#define DUTY_CYCLE   393
+
+ +

Definition at line 63 of file timer_a_ex1_pwmSingle.c.

+ +
+
+ +

◆ TIMER_A_PERIOD

+ +
+
+ + + + +
#define TIMER_A_PERIOD   524
+
+

Timer_A3, PWM TA1.2, Up Mode, DCO SMCLK

+

Description: This program generates PWM outputs on P2.2 using Timer1_A configured for up mode. The value , TIMER_PERIOD, defines the PWM period and the value DUTY_CYCLE the PWM duty cycle. Using ~1.048MHz SMCLK as TACLK, the timer period is ~480us with a 75% duty cycle on P4.0 ACLK = n/a, SMCLK = MCLK = TACLK = default DCO ~1.048MHz.

+

+Tested On: MSP430FR4133

+ + + + + +
/ |
RST
+

| | | P4.0/TA1.1|--> CCR1 - 75% PWM | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 62 of file timer_a_ex1_pwmSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file timer_a_ex1_pwmSingle.c.

+ +

References __no_operation(), DUTY_CYCLE, param, and TIMER_A_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex1__pwm_single_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex1__pwm_single_8c.js new file mode 100644 index 0000000..2eddfdf --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex1__pwm_single_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex1__pwm_single_8c = +[ + [ "DUTY_CYCLE", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex1__pwm_single_8c.html#a940d0fcbbee0921e43201c554231947c", null ], + [ "TIMER_A_PERIOD", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex1__pwm_single_8c.html#ae899bfdc491d37c006b4c301d9f8e147", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex1__pwm_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex1__pwm_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex1__pwm_single_8c_source.html new file mode 100644 index 0000000..dc83030 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex1__pwm_single_8c_source.html @@ -0,0 +1,184 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_a/timer_a_ex1_pwmSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex1_pwmSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*******************************************************************************
+
59 //******************************************************************************
+
60 #include "driverlib.h"
+
61 
+
62 #define TIMER_A_PERIOD 524
+
63 #define DUTY_CYCLE 393
+
64 
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //P4.0 as PWM output
+
72  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
73  GPIO_PORT_P4,
+
74  GPIO_PIN0,
+
75  GPIO_PRIMARY_MODULE_FUNCTION
+
76  );
+
77 
+
78  /*
+
79  * Disable the GPIO power-on default high-impedance mode to activate
+
80  * previously configured port settings
+
81  */
+
82  PMM_unlockLPM5();
+
83 
+
84  //Generate PWM - Timer runs in Up-Down mode
+
85  Timer_A_outputPWMParam param = {0};
+
86  param.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
87  param.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
88  param.timerPeriod = TIMER_A_PERIOD;
+
89  param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
+
90  param.compareOutputMode = TIMER_A_OUTPUTMODE_RESET_SET;
+
91  param.dutyCycle = DUTY_CYCLE;
+
92  Timer_A_outputPWM(TIMER_A1_BASE, &param);
+
93 
+
94  //Enter LPM0
+
95  __bis_SR_register(LPM0_bits);
+
96 
+
97  //For debugger
+ +
99 }
+
void main(void)
+
#define DUTY_CYCLE
+
#define TIMER_A_PERIOD
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html new file mode 100644 index 0000000..ee28479 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html @@ -0,0 +1,202 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_a/timer_a_ex2_continousModeOperationWithCCR0Interrupt.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex2_continousModeOperationWithCCR0Interrupt.c File Reference
+
+
+
#include "driverlib.h"
+#include "Board.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define COMPARE_VALUE   50000
 
+ + + + + +

+Functions

void main (void)
 
void TIMER1_A0_ISR (void)
 
+

Macro Definition Documentation

+ +

◆ COMPARE_VALUE

+ +
+
+ + + + +
#define COMPARE_VALUE   50000
+
+

TIMER_A, Toggle LED1, CCR0 Cont. Mode ISR, DCO SMCLK

+

Toggle LED1 using software and TA_0 ISR. Toggles every 50000 SMCLK cycles. SMCLK provides clock source for TACLK. During the TA_0 ISR, LED1 is toggled and 50000 clock cycles are added to CCR0. TA_0 ISR is triggered every 50000 cycles. CPU is normally off and used only during TA_ISR. ACLK = n/a, MCLK = SMCLK = TACLK = default DCO ~1.048MHz

     MSP430FR2xx_4xx Board
+        ---------------
+    /|\|               |
+     | |               |
+     --|RST            |
+       |               |
+       |               |-->LED1
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • TimerA peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • Timer A0
  • +
+ +

Definition at line 64 of file timer_a_ex2_continousModeOperationWithCCR0Interrupt.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file timer_a_ex2_continousModeOperationWithCCR0Interrupt.c.

+ +

References __no_operation(), and COMPARE_VALUE.

+ +
+
+ +

◆ TIMER1_A0_ISR()

+ +
+
+ + + + + + + + +
void TIMER1_A0_ISR (void )
+
+ +

Definition at line 127 of file timer_a_ex2_continousModeOperationWithCCR0Interrupt.c.

+ +

References COMPARE_VALUE.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.js new file mode 100644 index 0000000..17ad7de --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c = +[ + [ "COMPARE_VALUE", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html#a655c866eb3f7ee47831709b091612e63", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMER1_A0_ISR", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html#a7041a18d2acb50837a4cbfb1bd386bd7", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c_source.html new file mode 100644 index 0000000..87110ba --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c_source.html @@ -0,0 +1,228 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_a/timer_a_ex2_continousModeOperationWithCCR0Interrupt.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex2_continousModeOperationWithCCR0Interrupt.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //*****************************************************************************
+
61 #include "driverlib.h"
+
62 #include "Board.h"
+
63 
+
64 #define COMPARE_VALUE 50000
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop Watchdog Timer
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Set LED1 as an output pin.
+
72  GPIO_setAsOutputPin(
+
73  GPIO_PORT_LED1,
+
74  GPIO_PIN_LED1
+
75  );
+
76 
+
77  /*
+
78  * Disable the GPIO power-on default high-impedance mode to activate
+
79  * previously configured port settings
+
80  */
+
81  PMM_unlockLPM5();
+
82 
+
83  //Start timer in continuous mode sourced by SMCLK
+
84  Timer_A_initContinuousModeParam initContParam = {0};
+
85  initContParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
86  initContParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
87  initContParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
88  initContParam.timerClear = TIMER_A_DO_CLEAR;
+
89  initContParam.startTimer = false;
+
90  Timer_A_initContinuousMode(TIMER_A1_BASE, &initContParam);
+
91 
+
92  //Initiaze compare mode
+
93  Timer_A_clearCaptureCompareInterrupt(TIMER_A1_BASE,
+
94  TIMER_A_CAPTURECOMPARE_REGISTER_0
+
95  );
+
96 
+
97  Timer_A_initCompareModeParam initCompParam = {0};
+
98  initCompParam.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_0;
+
99  initCompParam.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_ENABLE;
+
100  initCompParam.compareOutputMode = TIMER_A_OUTPUTMODE_OUTBITVALUE;
+
101  initCompParam.compareValue = COMPARE_VALUE;
+
102  Timer_A_initCompareMode(TIMER_A1_BASE, &initCompParam);
+
103 
+
104 
+
105  Timer_A_startCounter( TIMER_A1_BASE,
+
106  TIMER_A_CONTINUOUS_MODE
+
107  );
+
108 
+
109  //Enter LPM0, enable interrupts
+
110  __bis_SR_register(LPM0_bits + GIE);
+
111 
+
112  //For debugger
+
113  __no_operation();
+
114 }
+
115 
+
116 //******************************************************************************
+
117 //
+
118 //This is the TIMER1_A0 interrupt vector service routine.
+
119 //
+
120 //******************************************************************************
+
121 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
122 #pragma vector=TIMER1_A0_VECTOR
+
123 __interrupt
+
124 #elif defined(__GNUC__)
+
125 __attribute__((interrupt(TIMER1_A0_VECTOR)))
+
126 #endif
+
127 void TIMER1_A0_ISR (void)
+
128 {
+
129  uint16_t compVal = Timer_A_getCaptureCompareCount(TIMER_A1_BASE,
+
130  TIMER_A_CAPTURECOMPARE_REGISTER_0)
+
131  + COMPARE_VALUE;
+
132 
+
133  //Toggle LED1
+
134  GPIO_toggleOutputOnPin(
+
135  GPIO_PORT_LED1,
+
136  GPIO_PIN_LED1
+
137  );
+
138 
+
139  //Add Offset to CCR0
+
140  Timer_A_setCompareValue(TIMER_A1_BASE,
+
141  TIMER_A_CAPTURECOMPARE_REGISTER_0,
+
142  compVal
+
143  );
+
144 }
+ + + + + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html new file mode 100644 index 0000000..42e23bf --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html @@ -0,0 +1,179 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_a/timer_a_ex3_continousModeOperationWithTAIEInterrupt.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex3_continousModeOperationWithTAIEInterrupt.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void TIMER1_A1_ISR (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

TIMER_A, Toggle P1.0, Overflow ISR, 32kHz ACLK

+

Description: Toggle P1.0 using software and the TIMER_A overflow ISR. In this example an ISR triggers when TB overflows. Inside the ISR P1.0 is toggled. Toggle rate is exactly 0.25Hz = [32kHz/FFFFh]/2. Proper use of the TAIV interrupt vector generator is demonstrated. ACLK = TBCLK = 32kHz, MCLK = SMCLK = default DCO ~ 1.048MHz

+

+Tested On: MSP430FR4133

+ + + + + +
/ |
RST
+

| | | P1.0|-->LED

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • TIMER_A7
  • +
+ +

Definition at line 63 of file timer_a_ex3_continousModeOperationWithTAIEInterrupt.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ TIMER1_A1_ISR()

+ +
+
+ + + + + + + + +
void TIMER1_A1_ISR (void )
+
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.js new file mode 100644 index 0000000..8409cd8 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMER1_A1_ISR", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html#a75b17bc1a2d3b4b8e3b7fff08b7651a8", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c_source.html new file mode 100644 index 0000000..34a1b2c --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c_source.html @@ -0,0 +1,215 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_a/timer_a_ex3_continousModeOperationWithTAIEInterrupt.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex3_continousModeOperationWithTAIEInterrupt.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
59 //
+
60 //*****************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop WDT
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set P1.0 to output direction
+
69  GPIO_setAsOutputPin(
+
70  GPIO_PORT_P1,
+
71  GPIO_PIN0
+
72  );
+
73 
+
74  /*
+
75  * Disable the GPIO power-on default high-impedance mode to activate
+
76  * previously configured port settings
+
77  */
+
78  PMM_unlockLPM5();
+
79 
+
80  //Start timer in continuous mode sourced by ACLK
+
81  Timer_A_clearTimerInterrupt(TIMER_A1_BASE);
+
82 
+
83  Timer_A_initContinuousModeParam param = {0};
+
84  param.clockSource = TIMER_A_CLOCKSOURCE_ACLK;
+
85  param.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
86  param.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_ENABLE;
+
87  param.timerClear = TIMER_A_DO_CLEAR;
+
88  param.startTimer = true;
+
89  Timer_A_initContinuousMode(TIMER_A1_BASE, &param);
+
90 
+
91  //Enter LPM0, enable interrupts
+
92  __bis_SR_register(LPM0_bits + GIE);
+
93 
+
94  //For debugger
+ +
96 }
+
97 
+
98 //******************************************************************************
+
99 //
+
100 //This is the TIMER1_A3 interrupt vector service routine.
+
101 //
+
102 //******************************************************************************
+
103 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
104 #pragma vector=TIMER1_A1_VECTOR
+
105 __interrupt
+
106 #elif defined(__GNUC__)
+
107 __attribute__((interrupt(TIMER1_A1_VECTOR)))
+
108 #endif
+
109 void TIMER1_A1_ISR (void)
+
110 {
+
111  //Any access, read or write, of the TAIV register automatically resets the
+
112  //highest "pending" interrupt flag
+
113  switch ( __even_in_range(TA1IV,14) ){
+
114  case 0: break; //No interrupt
+
115  case 2: break; //CCR1 not used
+
116  case 4: break; //CCR2 not used
+
117  case 6: break; //CCR3 not used
+
118  case 8: break; //CCR4 not used
+
119  case 10: break; //CCR5 not used
+
120  case 12: break; //CCR6 not used
+
121  case 14:
+
122  //Toggle P1.0 // overflow
+
123  GPIO_toggleOutputOnPin(
+
124  GPIO_PORT_P1,
+
125  GPIO_PIN0
+
126  );
+
127  break;
+
128  default: break;
+
129  }
+
130 }
+
131 
+ + +
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html new file mode 100644 index 0000000..9a03aac --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html @@ -0,0 +1,216 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_a/timer_a_ex4_pwmMultipleUpDown.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex4_pwmMultipleUpDown.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Macros

#define TIMER_PERIOD   127
 
#define DUTY_CYCLE1   32
 
#define DUTY_CYCLE2   96
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE1

+ +
+
+ + + + +
#define DUTY_CYCLE1   32
+
+ +

Definition at line 66 of file timer_a_ex4_pwmMultipleUpDown.c.

+ +
+
+ +

◆ DUTY_CYCLE2

+ +
+
+ + + + +
#define DUTY_CYCLE2   96
+
+ +

Definition at line 67 of file timer_a_ex4_pwmMultipleUpDown.c.

+ +
+
+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   127
+
+

Timer_A3, PWM TA1.1-2, Up/Down Mode, DCO SMCLK

+

Description: This program generates two PWM outputs on P4.0/8.3 using Timer1_A configured for up/down mode. The value in CCR0, 128, defines the PWM period/2 and the values in CCR1 and CCR2 the PWM duty cycles. Using ~1.045MHz SMCLK as TACLK, the timer period is ~233us with a 75% duty cycle on P4.0 and 25% on P8.3. SMCLK = MCLK = TACLK = default DCO ~1.048MHz.

+

+Tested On: MSP430FR4133

+ + + + + +
/ |
RST
+

| | | P4.0/TA1.1|--> CCR1 - 75% PWM | P8.3/TA1.2|--> CCR2 - 25% PWM

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 65 of file timer_a_ex4_pwmMultipleUpDown.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 69 of file timer_a_ex4_pwmMultipleUpDown.c.

+ +

References __no_operation(), DUTY_CYCLE1, DUTY_CYCLE2, and TIMER_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.js new file mode 100644 index 0000000..dce78f9 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c = +[ + [ "DUTY_CYCLE1", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html#abb796f001390b47f0f733ea9a08481db", null ], + [ "DUTY_CYCLE2", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html#a497fa7efc7cefe7b023b4215f48cfe2a", null ], + [ "TIMER_PERIOD", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c_source.html new file mode 100644 index 0000000..c6a8d94 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c_source.html @@ -0,0 +1,215 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_a/timer_a_ex4_pwmMultipleUpDown.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex4_pwmMultipleUpDown.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*******************************************************************************
+
61 //
+
62 //*****************************************************************************
+
63 #include "driverlib.h"
+
64 
+
65 #define TIMER_PERIOD 127
+
66 #define DUTY_CYCLE1 32
+
67 #define DUTY_CYCLE2 96
+
68 
+
69 void main (void)
+
70 {
+
71  //Stop WDT
+
72  WDT_A_hold(WDT_A_BASE);
+
73 
+
74  //P4.0 as output with module function
+
75  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
76  GPIO_PORT_P4,
+
77  GPIO_PIN0,
+
78  GPIO_PRIMARY_MODULE_FUNCTION
+
79  );
+
80 
+
81  //P8.3 as output with module function
+
82  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
83  GPIO_PORT_P8,
+
84  GPIO_PIN3,
+
85  GPIO_PRIMARY_MODULE_FUNCTION
+
86  );
+
87 
+
88  /*
+
89  * Disable the GPIO power-on default high-impedance mode to activate
+
90  * previously configured port settings
+
91  */
+
92  PMM_unlockLPM5();
+
93 
+
94  //Start Timer
+
95  Timer_A_initUpDownModeParam initUpDownParam = {0};
+
96  initUpDownParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
97  initUpDownParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
98  initUpDownParam.timerPeriod = TIMER_PERIOD;
+
99  initUpDownParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
100  initUpDownParam.captureCompareInterruptEnable_CCR0_CCIE =
+
101  TIMER_A_CCIE_CCR0_INTERRUPT_DISABLE;
+
102  initUpDownParam.timerClear = TIMER_A_DO_CLEAR;
+
103  initUpDownParam.startTimer = false;
+
104  Timer_A_initUpDownMode(TIMER_A1_BASE, &initUpDownParam);
+
105 
+
106  Timer_A_startCounter( TIMER_A1_BASE,
+
107  TIMER_A_UPDOWN_MODE
+
108  );
+
109 
+
110  //Initialze compare registers to generate PWM1
+
111  Timer_A_initCompareModeParam initComp1Param = {0};
+
112  initComp1Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
+
113  initComp1Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
114  initComp1Param.compareOutputMode = TIMER_A_OUTPUTMODE_TOGGLE_SET;
+
115  initComp1Param.compareValue = DUTY_CYCLE1;
+
116  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp1Param);
+
117 
+
118  //Initialze compare registers to generate PWM2
+
119  Timer_A_initCompareModeParam initComp2Param = {0};
+
120  initComp2Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_2;
+
121  initComp2Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
122  initComp2Param.compareOutputMode = TIMER_A_OUTPUTMODE_TOGGLE_SET;
+
123  initComp2Param.compareValue = DUTY_CYCLE2;
+
124  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp2Param);
+
125 
+
126  //Enter LPM0
+
127  __bis_SR_register(LPM0_bits);
+
128 
+
129  //For debugger
+
130  __no_operation();
+
131 }
+
132 
+
void main(void)
+
#define DUTY_CYCLE2
+
#define DUTY_CYCLE1
+
#define TIMER_PERIOD
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html new file mode 100644 index 0000000..800f33b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html @@ -0,0 +1,215 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_a/timer_a_ex5_pwmMultipleUp.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex5_pwmMultipleUp.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Macros

#define TIMER_PERIOD   511
 
#define DUTY_CYCLE1   384
 
#define DUTY_CYCLE2   128
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE1

+ +
+
+ + + + +
#define DUTY_CYCLE1   384
+
+ +

Definition at line 63 of file timer_a_ex5_pwmMultipleUp.c.

+ +
+
+ +

◆ DUTY_CYCLE2

+ +
+
+ + + + +
#define DUTY_CYCLE2   128
+
+ +

Definition at line 64 of file timer_a_ex5_pwmMultipleUp.c.

+ +
+
+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   511
+
+

This program generates two PWM outputs on P4.0, P8.3 using Timer1_A configured for up mode. The value in CCR0, 512-1, defines the PWM period and the values in CCR1 and CCR2 the PWM duty cycles. Using ~1.092MHz SMCLK as TACLK, the timer period is ~500us with a 75% duty cycle on P4.0 and 25% on P8.3. ACLK = n/a, SMCLK = MCLK = TACLK = default DCO ~1.048MHz.

+

+Tested On: MSP430FR4133

+ + + + + +
/ |
RST
+

| | | P4.0/TA1.1|--> CCR1 - 75% PWM | P8.3/TA1.2|--> CCR2 - 25% PWM

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 62 of file timer_a_ex5_pwmMultipleUp.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file timer_a_ex5_pwmMultipleUp.c.

+ +

References __no_operation(), DUTY_CYCLE1, DUTY_CYCLE2, param, and TIMER_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.js new file mode 100644 index 0000000..eed605a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c = +[ + [ "DUTY_CYCLE1", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html#abb796f001390b47f0f733ea9a08481db", null ], + [ "DUTY_CYCLE2", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html#a497fa7efc7cefe7b023b4215f48cfe2a", null ], + [ "TIMER_PERIOD", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c_source.html new file mode 100644 index 0000000..be00c19 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c_source.html @@ -0,0 +1,210 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_a/timer_a_ex5_pwmMultipleUp.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex5_pwmMultipleUp.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*******************************************************************************
+
59 //*****************************************************************************
+
60 #include "driverlib.h"
+
61 
+
62 #define TIMER_PERIOD 511
+
63 #define DUTY_CYCLE1 384
+
64 #define DUTY_CYCLE2 128
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //P4.0 as output with module function
+
72  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
73  GPIO_PORT_P4,
+
74  GPIO_PIN0,
+
75  GPIO_PRIMARY_MODULE_FUNCTION
+
76  );
+
77 
+
78  //P8.3 as output with module function
+
79  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
80  GPIO_PORT_P8,
+
81  GPIO_PIN3,
+
82  GPIO_PRIMARY_MODULE_FUNCTION
+
83  );
+
84 
+
85  /*
+
86  * Disable the GPIO power-on default high-impedance mode to activate
+
87  * previously configured port settings
+
88  */
+
89  PMM_unlockLPM5();
+
90 
+
91  //Start timer
+
92  Timer_A_initUpModeParam param = {0};
+
93  param.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
94  param.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
95  param.timerPeriod = TIMER_PERIOD;
+
96  param.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
97  param.captureCompareInterruptEnable_CCR0_CCIE =
+
98  TIMER_A_CCIE_CCR0_INTERRUPT_DISABLE;
+
99  param.timerClear = TIMER_A_DO_CLEAR;
+
100  param.startTimer = true;
+
101  Timer_A_initUpMode(TIMER_A1_BASE, &param);
+
102 
+
103  //Initialize compare mode to generate PWM1
+
104  Timer_A_initCompareModeParam initComp1Param = {0};
+
105  initComp1Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
+
106  initComp1Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
107  initComp1Param.compareOutputMode = TIMER_A_OUTPUTMODE_RESET_SET;
+
108  initComp1Param.compareValue = DUTY_CYCLE1;
+
109  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp1Param);
+
110 
+
111  //Initialize compare mode to generate PWM2
+
112  Timer_A_initCompareModeParam initComp2Param = {0};
+
113  initComp2Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_2;
+
114  initComp2Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
115  initComp2Param.compareOutputMode = TIMER_A_OUTPUTMODE_RESET_SET;
+
116  initComp2Param.compareValue = DUTY_CYCLE2;
+
117  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp2Param);
+
118 
+
119  //Enter LPM0
+
120  __bis_SR_register(LPM0_bits);
+
121 
+
122  //For debugger
+
123  __no_operation();
+
124 }
+
void main(void)
+
#define DUTY_CYCLE2
+
#define DUTY_CYCLE1
+
#define TIMER_PERIOD
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html new file mode 100644 index 0000000..d2d0e99 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html @@ -0,0 +1,197 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_a/timer_a_ex6_upDownModeOperation.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex6_upDownModeOperation.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define TIMER_A_PERIOD   250
 
#define DUTY_CYCLE   250
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE

+ +
+
+ + + + +
#define DUTY_CYCLE   250
+
+ +

Definition at line 64 of file timer_a_ex6_upDownModeOperation.c.

+ +
+
+ +

◆ TIMER_A_PERIOD

+ +
+
+ + + + +
#define TIMER_A_PERIOD   250
+
+

Toggle P2.4 using hardware TA1.0 output. Timer1_A is configured for up/down mode with CCR0 defining period, TA1.1 also output on P4.0. In this example, CCR0 is loaded with 250 and TA1.0 will toggle P4.0 at TACLK/2*250. Thus the output frequency on P4.0 will be the TACLK/500. No CPU or software resources required. As coded with TACLK = SMCLK, P4.0 output frequency is ~1.048M/500. SMCLK = MCLK = TACLK = default DCO ~1.048MHz

+

+Tested On: MSP430FR4133

+ + + + + +
/ |
RST
+

| | | P4.0/TA1.1|--> SMCLK/500

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file timer_a_ex6_upDownModeOperation.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file timer_a_ex6_upDownModeOperation.c.

+ +

References __no_operation(), DUTY_CYCLE, and TIMER_A_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.js new file mode 100644 index 0000000..560921e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c = +[ + [ "DUTY_CYCLE", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html#a940d0fcbbee0921e43201c554231947c", null ], + [ "TIMER_A_PERIOD", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html#ae899bfdc491d37c006b4c301d9f8e147", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c_source.html new file mode 100644 index 0000000..2bc3df5 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c_source.html @@ -0,0 +1,199 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_a/timer_a_ex6_upDownModeOperation.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex6_upDownModeOperation.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
59 //
+
60 //*****************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 #define TIMER_A_PERIOD 250
+
64 #define DUTY_CYCLE 250
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //P4.0 as output with module function
+
72  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
73  GPIO_PORT_P4,
+
74  GPIO_PIN0,
+
75  GPIO_PRIMARY_MODULE_FUNCTION
+
76  );
+
77 
+
78  /*
+
79  * Disable the GPIO power-on default high-impedance mode to activate
+
80  * previously configured port settings
+
81  */
+
82  PMM_unlockLPM5();
+
83 
+
84  //Start timer in up down mode
+
85  Timer_A_initUpDownModeParam initUpDownParam = {0};
+
86  initUpDownParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
87  initUpDownParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
88  initUpDownParam.timerPeriod = TIMER_A_PERIOD;
+
89  initUpDownParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
90  initUpDownParam.captureCompareInterruptEnable_CCR0_CCIE =
+
91  TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
92  initUpDownParam.timerClear = TIMER_A_DO_CLEAR;
+
93  initUpDownParam.startTimer = false;
+
94  Timer_A_initUpDownMode(TIMER_A1_BASE, &initUpDownParam);
+
95 
+
96  //Init compare mode
+
97  Timer_A_initCompareModeParam initComp1Param = {0};
+
98  initComp1Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
+
99  initComp1Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
100  initComp1Param.compareOutputMode = TIMER_A_OUTPUTMODE_TOGGLE;
+
101  initComp1Param.compareValue = DUTY_CYCLE;
+
102  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp1Param);
+
103 
+
104  Timer_A_startCounter(
+
105  TIMER_A1_BASE,
+
106  TIMER_A_UPDOWN_MODE
+
107  );
+
108 
+
109  //Enter LPM0
+
110  __bis_SR_register(LPM0_bits);
+
111 
+
112  //For debugger
+
113  __no_operation();
+
114 }
+
115 
+
void main(void)
+ +
#define TIMER_A_PERIOD
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html new file mode 100644 index 0000000..caa386a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html @@ -0,0 +1,186 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_b/timer_b_ex1_continuousModeCCR0.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex1_continuousModeCCR0.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define COMPARE_VALUE   50000
 
+ + + + + +

+Functions

void main (void)
 
void TIMERB0_ISR (void)
 
+

Macro Definition Documentation

+ +

◆ COMPARE_VALUE

+ +
+
+ + + + +
#define COMPARE_VALUE   50000
+
+ +

Definition at line 53 of file timer_b_ex1_continuousModeCCR0.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 55 of file timer_b_ex1_continuousModeCCR0.c.

+ +

References __no_operation(), and COMPARE_VALUE.

+ +
+
+ +

◆ TIMERB0_ISR()

+ +
+
+ + + + + + + + +
void TIMERB0_ISR (void )
+
+ +

Definition at line 105 of file timer_b_ex1_continuousModeCCR0.c.

+ +

References COMPARE_VALUE.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.js new file mode 100644 index 0000000..08312bb --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c = +[ + [ "COMPARE_VALUE", "_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html#a655c866eb3f7ee47831709b091612e63", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMERB0_ISR", "_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html#a17ea7521d47a1d5aa678bc645f70737b", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c_source.html new file mode 100644 index 0000000..a077500 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c_source.html @@ -0,0 +1,232 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_b/timer_b_ex1_continuousModeCCR0.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex1_continuousModeCCR0.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Timer_B, Toggle P1.0, CCR0 Cont. Mode ISR, DCO SMCLK
+
34 //
+
35 // Description: Toggle P1.0 using software and TB_0 ISR. Toggles every
+
36 // 50000 SMCLK cycles. SMCLK provides clock source for TBCLK.
+
37 // During the TB_0 ISR, P1.0 is toggled and 50000 clock cycles are added to
+
38 // CCR0. TB_0 ISR is triggered every 50000 cycles. CPU is normally off and
+
39 // used only during TB_ISR.
+
40 // ACLK = n/a, MCLK = SMCLK = TBCLK = default DCO ~1.045MHz
+
41 //
+
42 // Tested On: MSP430FR2311
+
43 // ---------------
+
44 // /|\| |
+
45 // | | |
+
46 // --|RST |
+
47 // | |
+
48 // | P1.0|-->LED
+
49 //
+
50 //******************************************************************************
+
51 #include "driverlib.h"
+
52 
+
53 #define COMPARE_VALUE 50000
+
54 
+
55 void main(void)
+
56 {
+
57  //Stop WDT
+
58  WDT_A_hold(WDT_A_BASE);
+
59 
+
60  //Set P1.0 to output direction
+
61  GPIO_setAsOutputPin(
+
62  GPIO_PORT_P1,
+
63  GPIO_PIN0
+
64  );
+
65 
+
66  //Disable the GPIO power-on default high-impedance mode to activate
+
67  //previously configured port settings
+
68  PMM_unlockLPM5();
+
69 
+
70  //Start timer in continuous mode sourced by SMCLK
+
71  Timer_B_initContinuousModeParam initContParam = {0};
+
72  initContParam.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
73  initContParam.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
74  initContParam.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_DISABLE;
+
75  initContParam.timerClear = TIMER_B_DO_CLEAR;
+
76  initContParam.startTimer = false;
+
77  Timer_B_initContinuousMode(TIMER_B0_BASE, &initContParam);
+
78 
+
79  //Initiaze compare mode
+
80  Timer_B_clearCaptureCompareInterrupt(TIMER_B0_BASE,
+
81  TIMER_B_CAPTURECOMPARE_REGISTER_0);
+
82 
+
83  Timer_B_initCompareModeParam initCompParam = {0};
+
84  initCompParam.compareRegister = TIMER_B_CAPTURECOMPARE_REGISTER_0;
+
85  initCompParam.compareInterruptEnable = TIMER_B_CAPTURECOMPARE_INTERRUPT_ENABLE;
+
86  initCompParam.compareOutputMode = TIMER_B_OUTPUTMODE_OUTBITVALUE;
+
87  initCompParam.compareValue = COMPARE_VALUE;
+
88  Timer_B_initCompareMode(TIMER_B0_BASE, &initCompParam);
+
89 
+
90  Timer_B_startCounter( TIMER_B0_BASE,
+
91  TIMER_B_CONTINUOUS_MODE
+
92  );
+
93 
+
94  __bis_SR_register(LPM0_bits + GIE); // Enter LPM0, enable interrupts
+
95  __no_operation(); // For debugger
+
96 }
+
97 
+
98 // Timer B0 interrupt service routine
+
99 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
100 #pragma vector=TIMERB0_VECTOR
+
101 __interrupt
+
102 #elif defined(__GNUC__)
+
103 __attribute__((interrupt(TIMERB0_VECTOR)))
+
104 #endif
+
105 void TIMERB0_ISR (void)
+
106 {
+
107  uint16_t compVal = Timer_B_getCaptureCompareCount(TIMER_B0_BASE,
+
108  TIMER_B_CAPTURECOMPARE_REGISTER_0)
+
109  + COMPARE_VALUE;
+
110 
+
111  GPIO_toggleOutputOnPin(
+
112  GPIO_PORT_P1,
+
113  GPIO_PIN0
+
114  );
+
115 
+
116  // Add Offset to CCR0 [Cont mode]
+
117  Timer_B_setCompareValue(TIMER_B0_BASE,
+
118  TIMER_B_CAPTURECOMPARE_REGISTER_0,
+
119  compVal
+
120  );
+
121 }
+
122 
+
void TIMERB0_ISR(void)
+
void main(void)
+
#define COMPARE_VALUE
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html new file mode 100644 index 0000000..bf0895c --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html @@ -0,0 +1,161 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_b/timer_b_ex2_overflowISR.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex2_overflowISR.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void TIMER0_B1_ISR (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 51 of file timer_b_ex2_overflowISR.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ TIMER0_B1_ISR()

+ +
+
+ + + + + + + + +
void TIMER0_B1_ISR (void )
+
+ +

Definition at line 91 of file timer_b_ex2_overflowISR.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.js new file mode 100644 index 0000000..1c7cbfd --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMER0_B1_ISR", "_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html#a219ebacd33ecd03efa9c7733c512e3d2", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c_source.html new file mode 100644 index 0000000..f2a42be --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c_source.html @@ -0,0 +1,224 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_b/timer_b_ex2_overflowISR.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex2_overflowISR.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Timer_B, Toggle P1.0, Overflow ISR, 32kHz ACLK
+
34 //
+
35 // Description: Toggle P1.0 using software and the Timer_B overflow ISR.
+
36 // In this example an ISR triggers when TB overflows. Inside the ISR P1.0
+
37 // is toggled. Toggle rate is exactly 0.25Hz = [32kHz/FFFFh]/2. Proper use of the
+
38 // TBxIV interrupt vector generator is demonstrated.
+
39 // ACLK = TBCLK = 32kHz, MCLK = SMCLK = default DCO ~ 1.045MHz
+
40 //
+
41 // Tested On: MSP430FR2311
+
42 // ---------------
+
43 // /|\| |
+
44 // | | |
+
45 // --|RST |
+
46 // | |
+
47 // | P1.0|-->LED
+
48 //******************************************************************************
+
49 #include "driverlib.h"
+
50 
+
51 void main(void)
+
52 {
+
53  //Stop WDT
+
54  WDT_A_hold(WDT_A_BASE);
+
55 
+
56  //Set P1.0 to output direction
+
57  GPIO_setAsOutputPin(
+
58  GPIO_PORT_P1,
+
59  GPIO_PIN0
+
60  );
+
61 
+
62  //Disable the GPIO power-on default high-impedance mode to activate
+
63  //previously configured port settings
+
64  PMM_unlockLPM5();
+
65 
+
66  Timer_B_clearTimerInterrupt(TIMER_B0_BASE);
+
67 
+
68  Timer_B_initContinuousModeParam param = {0};
+
69  param.clockSource = TIMER_B_CLOCKSOURCE_ACLK;
+
70  param.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
71  param.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_ENABLE;
+
72  param.timerClear = TIMER_B_DO_CLEAR;
+
73  param.startTimer = false;
+
74  Timer_B_initContinuousMode(TIMER_B0_BASE, &param);
+
75 
+
76  Timer_B_startCounter(TIMER_B0_BASE,
+
77  TIMER_B_CONTINUOUS_MODE
+
78  );
+
79 
+
80  __bis_SR_register(LPM3_bits + GIE); // Enter LPM3, enable interrupts
+
81  __no_operation(); // For debugger
+
82 }
+
83 
+
84 // Timer0_B7 Interrupt Vector (TBxIV) handler
+
85 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
86 #pragma vector=TIMER0_B1_VECTOR
+
87 __interrupt
+
88 #elif defined(__GNUC__)
+
89 __attribute__((interrupt(TIMER0_B1_VECTOR)))
+
90 #endif
+
91 void TIMER0_B1_ISR(void)
+
92 {
+
93  /* Any access, read or write, of the TBxIV register automatically resets the
+
94  highest "pending" interrupt flag. */
+
95  switch( __even_in_range(TB0IV,14) )
+
96  {
+
97  case TBIV__NONE: break; // No interrupt
+
98  case TBIV__TBCCR1: break; // CCR1 not used
+
99  case TBIV__TBCCR2: break; // CCR2 not used
+
100  case TBIV__TBCCR3: break; // CCR3 not used
+
101  case TBIV__TBCCR4: break; // CCR4 not used
+
102  case TBIV__TBCCR5: break; // CCR5 not used
+
103  case TBIV__TBCCR6: break; // CCR6 not used
+
104  case TBIV__TBIFG: // Overflow
+
105  //Toggle P1.0
+
106  GPIO_toggleOutputOnPin(
+
107  GPIO_PORT_P1,
+
108  GPIO_PIN0
+
109  );
+
110  break;
+
111  default: break;
+
112  }
+
113 }
+
114 
+
void main(void)
+
void TIMER0_B1_ISR(void)
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex3__pwm_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex3__pwm_8c.html new file mode 100644 index 0000000..4787eee --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex3__pwm_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_b/timer_b_ex3_pwm.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex3_pwm.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 57 of file timer_b_ex3_pwm.c.

+ +

References param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex3__pwm_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex3__pwm_8c.js new file mode 100644 index 0000000..3a156dc --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex3__pwm_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex3__pwm_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex3__pwm_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex3__pwm_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex3__pwm_8c_source.html new file mode 100644 index 0000000..f95b705 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex3__pwm_8c_source.html @@ -0,0 +1,209 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_b/timer_b_ex3_pwm.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex3_pwm.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Timer_B, PWM TB1-6, Up Mode, DCO SMCLK
+
34 //
+
35 // Description: This program generates two PWM outputs on P2.6/P2.2 using
+
36 // Timer_B configured for up mode. The value in CCR0, 512-1, defines the PWM
+
37 // period and the values in CCR1-2 the PWM duty cycles. Using ~1048kHz SMCLK
+
38 // as TBCLK, the timer period is ~488us.
+
39 // ACLK = 32kHz, SMCLK = MCLK = TBCLK = default DCO ~1048kHz.
+
40 //
+
41 // Tested On: MSP430FR2311
+
42 // -----------------
+
43 // /|\| XIN|-
+
44 // | | | 32kHz
+
45 // --|RST XOUT|-
+
46 // | |
+
47 // | P1.6/TB0.1|--> CCR1 - 75% PWM
+
48 // | P1.7/TB0.2|--> CCR2 - 25% PWM
+
49 // | |
+
50 // | |
+
51 // | |
+
52 // | |
+
53 //
+
54 //******************************************************************************
+
55 #include "driverlib.h"
+
56 
+
57 void main(void)
+
58 {
+
59  //Stop WDT
+
60  WDT_A_hold(WDT_A_BASE);
+
61 
+
62  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
63  GPIO_PORT_P1,
+
64  GPIO_PIN6 | GPIO_PIN2,
+
65  GPIO_SECONDARY_MODULE_FUNCTION
+
66  );
+
67 
+
68  //Disable the GPIO power-on default high-impedance mode to activate
+
69  //previously configured port settings
+
70  PMM_unlockLPM5();
+
71 
+
72  //Start timer
+
73  Timer_B_initUpModeParam param = {0};
+
74  param.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
75  param.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
76  param.timerPeriod = 511;
+
77  param.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_DISABLE;
+
78  param.captureCompareInterruptEnable_CCR0_CCIE =
+
79  TIMER_B_CCIE_CCR0_INTERRUPT_DISABLE;
+
80  param.timerClear = TIMER_B_DO_CLEAR;
+
81  param.startTimer = true;
+
82  Timer_B_initUpMode(TIMER_B0_BASE, &param);
+
83 
+
84  //Initialize compare mode to generate PWM1
+
85  Timer_B_initCompareModeParam param1 = {0};
+
86  param1.compareRegister = TIMER_B_CAPTURECOMPARE_REGISTER_1;
+
87  param1.compareInterruptEnable = TIMER_B_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
88  param1.compareOutputMode = TIMER_B_OUTPUTMODE_RESET_SET;
+
89  param1.compareValue = 383;
+
90  Timer_B_initCompareMode(TIMER_B0_BASE, &param1);
+
91 
+
92  //Initialize compare mode to generate PWM2
+
93  Timer_B_initCompareModeParam param2 = {0};
+
94  param2.compareRegister = TIMER_B_CAPTURECOMPARE_REGISTER_2;
+
95  param2.compareInterruptEnable = TIMER_B_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
96  param2.compareOutputMode = TIMER_B_OUTPUTMODE_RESET_SET;
+
97  param2.compareValue = 128;
+
98  Timer_B_initCompareMode(TIMER_B0_BASE, &param2);
+
99 
+
100  _BIS_SR(LPM0_bits + GIE); // CPU off
+
101 }
+
void main(void)
+
MPU_initThreeSegmentsParam param
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html new file mode 100644 index 0000000..dcfc145 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html @@ -0,0 +1,202 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_b/timer_b_ex4_upModeOperation.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex4_upModeOperation.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define TIMER_PERIOD   50000
 
+ + + + + +

+Functions

void main (void)
 
void TIMERB0_ISR (void)
 
+

Macro Definition Documentation

+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   50000
+
+

Timer_B, Toggle P1.0, CCR0 Up Mode ISR, DCO SMCLK

+

Description: Toggle P1.0 using software and TB_0 ISR. Timer_B is configured for up mode, thus the timer overflows when TBR counts to CCR0. In this example, CCR0 is loaded with 50000. ACLK = n/a, MCLK = SMCLK = TBCLK = default DCO ~1.045MHz

+

+Tested On: MSP430FR2311

+ + + + + +
/ |
RST
+

| | | P1.0|-->LED

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • Timer B0
  • +
+ +

Definition at line 61 of file timer_b_ex4_upModeOperation.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 63 of file timer_b_ex4_upModeOperation.c.

+ +

References __no_operation(), param, and TIMER_PERIOD.

+ +
+
+ +

◆ TIMERB0_ISR()

+ +
+
+ + + + + + + + +
void TIMERB0_ISR (void )
+
+ +

Definition at line 110 of file timer_b_ex4_upModeOperation.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.js new file mode 100644 index 0000000..a5ffd32 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex4__up_mode_operation_8c = +[ + [ "TIMER_PERIOD", "_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMERB0_ISR", "_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html#a17ea7521d47a1d5aa678bc645f70737b", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex4__up_mode_operation_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex4__up_mode_operation_8c_source.html new file mode 100644 index 0000000..4c360d1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex4__up_mode_operation_8c_source.html @@ -0,0 +1,204 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_b/timer_b_ex4_upModeOperation.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex4_upModeOperation.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
58 //*****************************************************************************
+
59 #include "driverlib.h"
+
60 
+
61 #define TIMER_PERIOD 50000
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop WDT
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set P1.0 to output direction
+
69  GPIO_setAsOutputPin(
+
70  GPIO_PORT_P1,
+
71  GPIO_PIN0
+
72  );
+
73 
+
74  //Disable the GPIO power-on default high-impedance mode to activate
+
75  //previously configured port settings
+
76  PMM_unlockLPM5();
+
77 
+
78  //Start timer
+
79  Timer_B_clearTimerInterrupt(TIMER_B0_BASE);
+
80 
+
81  Timer_B_initUpModeParam param = {0};
+
82  param.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
83  param.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
84  param.timerPeriod = TIMER_PERIOD;
+
85  param.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_DISABLE;
+
86  param.captureCompareInterruptEnable_CCR0_CCIE =
+
87  TIMER_B_CAPTURECOMPARE_INTERRUPT_ENABLE;
+
88  param.timerClear = TIMER_B_DO_CLEAR;
+
89  param.startTimer = true;
+
90  Timer_B_initUpMode(TIMER_B0_BASE, &param);
+
91 
+
92  //Enter LPM0, enable interrupts
+
93  __bis_SR_register(LPM0_bits + GIE);
+
94 
+
95  //For debugger
+ +
97 }
+
98 
+
99 //******************************************************************************
+
100 //
+
101 //This is the Timer B0 interrupt vector service routine.
+
102 //
+
103 //******************************************************************************
+
104 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
105 #pragma vector=TIMERB0_VECTOR
+
106 __interrupt
+
107 #elif defined(__GNUC__)
+
108 __attribute__((interrupt(TIMERB0_VECTOR)))
+
109 #endif
+
110 void TIMERB0_ISR (void)
+
111 {
+
112  //Toggle P1.0 using exclusive-OR
+
113  GPIO_toggleOutputOnPin(
+
114  GPIO_PORT_P1,
+
115  GPIO_PIN0
+
116  );
+
117 }
+
118 
+
void TIMERB0_ISR(void)
+
void main(void)
+
#define TIMER_PERIOD
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html new file mode 100644 index 0000000..46b09ef --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html @@ -0,0 +1,198 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_b/timer_b_ex5_singlePWM.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex5_singlePWM.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define TIMER_PERIOD   511
 
#define DUTY_CYCLE   383
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE

+ +
+
+ + + + +
#define DUTY_CYCLE   383
+
+ +

Definition at line 64 of file timer_b_ex5_singlePWM.c.

+ +
+
+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   511
+
+

Timer_B, PWM TB0.1, Up Mode, DCO SMCLK

+

Description: This program generates PWM outputs on P2.6 using Timer_B configured for up mode. The value , TIMER_PERIOD, defines the PWM period and the value DUTY_CYCLE the PWM duty cycle. Using ~1.045MHz SMCLK as TBCLK, the timer period is ~488us with a 75% duty cycle on P2.6 ACLK = n/a, SMCLK = MCLK = TBCLK = default DCO ~1.045MHz.

+

+Tested On: MSP430FR2311

+ + + + + +
/ |
RST
+

| | | P1.6/TB0.1|--> CCR1 - 75% PWM | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file timer_b_ex5_singlePWM.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file timer_b_ex5_singlePWM.c.

+ +

References __no_operation(), DUTY_CYCLE, param, and TIMER_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.js new file mode 100644 index 0000000..12b88a7 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex5__single_p_w_m_8c = +[ + [ "DUTY_CYCLE", "_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html#a940d0fcbbee0921e43201c554231947c", null ], + [ "TIMER_PERIOD", "_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "main", "_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex5__single_p_w_m_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex5__single_p_w_m_8c_source.html new file mode 100644 index 0000000..ee9e8b0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2timer__b_2timer__b__ex5__single_p_w_m_8c_source.html @@ -0,0 +1,182 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/timer_b/timer_b_ex5_singlePWM.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex5_singlePWM.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*******************************************************************************
+
59 //******************************************************************************
+
60 
+
61 #include "driverlib.h"
+
62 
+
63 #define TIMER_PERIOD 511
+
64 #define DUTY_CYCLE 383
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //P1.6 as PWM output
+
72  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
73  GPIO_PORT_P1,
+
74  GPIO_PIN6,
+
75  GPIO_SECONDARY_MODULE_FUNCTION
+
76  );
+
77 
+
78  //Disable the GPIO power-on default high-impedance mode to activate
+
79  //previously configured port settings
+
80  PMM_unlockLPM5();
+
81 
+
82  //Generate PWM - Timer runs in Up mode
+
83  Timer_B_outputPWMParam param = {0};
+
84  param.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
85  param.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
86  param.timerPeriod = TIMER_PERIOD;
+
87  param.compareRegister = TIMER_B_CAPTURECOMPARE_REGISTER_1;
+
88  param.compareOutputMode = TIMER_B_OUTPUTMODE_RESET_SET;
+
89  param.dutyCycle = DUTY_CYCLE;
+
90  Timer_B_outputPWM(TIMER_B0_BASE, &param);
+
91 
+
92  //Enter LPM0
+
93  __bis_SR_register(LPM0_bits);
+
94 
+
95  //For debugger
+ +
97 }
+
void main(void)
+
#define DUTY_CYCLE
+
#define TIMER_PERIOD
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2tlv_2tlv__ex1__get_device_type_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2tlv_2tlv__ex1__get_device_type_8c.html new file mode 100644 index 0000000..b6388ad --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2tlv_2tlv__ex1__get_device_type_8c.html @@ -0,0 +1,149 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/tlv/tlv_ex1_getDeviceType.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tlv_ex1_getDeviceType.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main ()
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

tlv - getDeviceType

+

+Tested on MSP430F5438A, MSP430FR5739

+

/|| | | | | –| | Device Type | | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT_A
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 58 of file tlv_ex1_getDeviceType.c.

+ +

References status.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2tlv_2tlv__ex1__get_device_type_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2tlv_2tlv__ex1__get_device_type_8c.js new file mode 100644 index 0000000..fe8b9a1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2tlv_2tlv__ex1__get_device_type_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2tlv_2tlv__ex1__get_device_type_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2tlv_2tlv__ex1__get_device_type_8c.html#acdef7a1fd863a6d3770c1268cb06add3", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2tlv_2tlv__ex1__get_device_type_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2tlv_2tlv__ex1__get_device_type_8c_source.html new file mode 100644 index 0000000..25aca49 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2tlv_2tlv__ex1__get_device_type_8c_source.html @@ -0,0 +1,152 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/tlv/tlv_ex1_getDeviceType.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tlv_ex1_getDeviceType.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
54 //******************************************************************************
+
55 
+
56 #include "driverlib.h"
+
57 
+
58 void main()
+
59 {
+
60  //Stop WDT
+
61  WDT_A_hold(WDT_A_BASE);
+
62 
+
63  uint16_t status = TLV_getDeviceType();
+
64 
+
65 }
+
void main()
+ +
uint16_t status
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html new file mode 100644 index 0000000..78b3527 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html @@ -0,0 +1,177 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/wdt_a/wdt_a_ex1_intervalSMCLK.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
wdt_a_ex1_intervalSMCLK.c File Reference
+
+
+
#include "driverlib.h"
+#include "Board.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void WDT_A_ISR (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

WDT - Toggle LED1, Interval Overflow ISR, DCO SMCLK

+

Toggle LED1 using software timed by the WDT ISR. Toggle rate is approx. 30ms = {(default DCO 1.045MHz) / 32768} based on default DCO = SMCLK clock source used in this example for the WDT. ACLK = n/a, MCLK = SMCLK = default DCO ~1.048MHz

     MSP430FR2xx_4xx Board
+       -----------------
+   /|\|                 |
+    | |                 |
+    --|RST              |
+      |                 |-->LED1
+      |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • WDT_A_VECTOR
  • +
+ +

Definition at line 63 of file wdt_a_ex1_intervalSMCLK.c.

+ +

References __no_operation().

+ +
+
+ +

◆ WDT_A_ISR()

+ +
+
+ + + + + + + + +
void WDT_A_ISR (void )
+
+ +

Definition at line 98 of file wdt_a_ex1_intervalSMCLK.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js new file mode 100644 index 0000000..9a17ca7 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "WDT_A_ISR", "_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html#afa209a204489cffc3a47f48db05b9713", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c_source.html new file mode 100644 index 0000000..78472c6 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c_source.html @@ -0,0 +1,190 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/wdt_a/wdt_a_ex1_intervalSMCLK.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
wdt_a_ex1_intervalSMCLK.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
59 //******************************************************************************
+
60 #include "driverlib.h"
+
61 #include "Board.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Initialize WDT module in timer interval mode,
+
66  //with SMCLK as source at an interval of 32 ms.
+
67  WDT_A_initIntervalTimer(WDT_A_BASE,
+
68  WDT_A_CLOCKSOURCE_SMCLK,
+
69  WDT_A_CLOCKDIVIDER_32K);
+
70 
+
71  WDT_A_start(WDT_A_BASE);
+
72 
+
73  //Enable Watchdog Interupt
+
74  SFR_clearInterrupt(SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT);
+
75  SFR_enableInterrupt(SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT);
+
76 
+
77  //Set LED1 to output direction
+
78  GPIO_setAsOutputPin(
+
79  GPIO_PORT_LED1,
+
80  GPIO_PIN_LED1
+
81  );
+
82 
+
83  PMM_unlockLPM5();
+
84 
+
85  //Enter LPM0, enable interrupts
+
86  __bis_SR_register(LPM0_bits + GIE);
+
87  //For debugger
+ +
89 }
+
90 
+
91 //Watchdog Timer interrupt service routine
+
92 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
93 #pragma vector=WDT_VECTOR
+
94 __interrupt
+
95 #elif defined(__GNUC__)
+
96 __attribute__((interrupt(WDT_VECTOR)))
+
97 #endif
+
98 void WDT_A_ISR (void)
+
99 {
+
100  //Toggle LED1
+
101  GPIO_toggleOutputOnPin(
+
102  GPIO_PORT_LED1,
+
103  GPIO_PIN_LED1
+
104  );
+
105 }
+
106 
+ +
void main(void)
+
void WDT_A_ISR(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html new file mode 100644 index 0000000..2323e60 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html @@ -0,0 +1,177 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/wdt_a/wdt_a_ex2_intervalACLK.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
wdt_a_ex2_intervalACLK.c File Reference
+
+
+
#include "driverlib.h"
+#include "Board.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void WDT_A_ISR (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

WDT - Toggle LED1, Interval Overflow ISR, 32kHz ACLK

+

Toggle LED1 using software timed by WDT ISR. Toggle rate is exactly 250ms based on 32kHz ACLK WDT clock source. In this example the WDT is configured to divide 32768 watch-crystal(2^15) by 2^13 with an ISR triggered @ 4Hz = [WDT CLK source/32768]. ACLK = REFO , MCLK = SMCLK = default DCO ~1.048MHz

     MSP430FR2xx_4xx Board
+       -----------------
+   /|\|                 |
+    | |                 |
+    --|RST              |
+      |                 |-->LED1
+      |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • WDT_A_VECTOR
  • +
+ +

Definition at line 64 of file wdt_a_ex2_intervalACLK.c.

+ +

References __no_operation().

+ +
+
+ +

◆ WDT_A_ISR()

+ +
+
+ + + + + + + + +
void WDT_A_ISR (void )
+
+ +

Definition at line 99 of file wdt_a_ex2_intervalACLK.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js new file mode 100644 index 0000000..03a3160 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "WDT_A_ISR", "_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html#afa209a204489cffc3a47f48db05b9713", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c_source.html new file mode 100644 index 0000000..e1f703e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c_source.html @@ -0,0 +1,190 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/wdt_a/wdt_a_ex2_intervalACLK.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
wdt_a_ex2_intervalACLK.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 #include "Board.h"
+
63 
+
64 void main (void)
+
65 {
+
66  //Initialize WDT module in timer interval mode,
+
67  //with ACLK as source at an interval of 250 ms.
+
68  WDT_A_initIntervalTimer(WDT_A_BASE,
+
69  WDT_A_CLOCKSOURCE_ACLK,
+
70  WDT_A_CLOCKDIVIDER_8192);
+
71 
+
72  WDT_A_start(WDT_A_BASE);
+
73 
+
74  //Enable Watchdog Interupt
+
75  SFR_clearInterrupt(SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT);
+
76  SFR_enableInterrupt(SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT);
+
77 
+
78  //Set LED1 to output direction
+
79  GPIO_setAsOutputPin(
+
80  GPIO_PORT_LED1,
+
81  GPIO_PIN_LED1
+
82  );
+
83 
+
84  PMM_unlockLPM5();
+
85 
+
86  //Enter LPM3, enable interrupts
+
87  __bis_SR_register(LPM3_bits + GIE);
+
88  //For debugger
+ +
90 }
+
91 
+
92 //Watchdog Timer interrupt service routine
+
93 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
94 #pragma vector=WDT_VECTOR
+
95 __interrupt
+
96 #elif defined(__GNUC__)
+
97 __attribute__((interrupt(WDT_VECTOR)))
+
98 #endif
+
99 void WDT_A_ISR (void)
+
100 {
+
101  //Toggle LED1
+
102  GPIO_toggleOutputOnPin(
+
103  GPIO_PORT_LED1,
+
104  GPIO_PIN_LED1
+
105  );
+
106 }
+
107 
+ +
void main(void)
+
void WDT_A_ISR(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html new file mode 100644 index 0000000..00c1173 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html @@ -0,0 +1,155 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/wdt_a/wdt_a_ex3_watchdogACLK.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
wdt_a_ex3_watchdogACLK.c File Reference
+
+
+
#include "driverlib.h"
+#include "Board.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

WDT - Failsafe Clock, 10KHz VLOCLK

+

Configure WDT in watchdog to timeout sourced by ACLK. LPM3 is entered. This example will demonstrate WDT fail-safe feature by automatically selecting VLOCLK as WDT clock source if ACLK fails. Watchdog timeout will toggle on LED1 every 3 seconds in main function. VLOCLK = 10KHZ, ACLK = 32768, MCLK = SMCLK = default DCO ~1.048MHz

     MSP430FR2xx_4xx Board
+       -----------------
+   /|\|                 |
+    | |                 |
+    --|RST              |
+      |                 |-->LED1
+      |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 64 of file wdt_a_ex3_watchdogACLK.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js new file mode 100644 index 0000000..73814fb --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c = +[ + [ "main", "_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c_source.html new file mode 100644 index 0000000..2b626b1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r2xx__4xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c_source.html @@ -0,0 +1,175 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/wdt_a/wdt_a_ex3_watchdogACLK.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
wdt_a_ex3_watchdogACLK.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 #include "Board.h"
+
63 
+
64 void main (void)
+
65 {
+
66  //Watchdog mode -> reset after expired time
+
67  //WDT is clocked by VLOCLK since ALCK is failed without initialization
+
68  //Set Watchdog Timer timeout 3s - SET BREAKPOINT HERE
+
69  WDT_A_initWatchdogTimer(WDT_A_BASE,
+
70  WDT_A_CLOCKSOURCE_ACLK,
+
71  WDT_A_CLOCKDIVIDER_32K);
+
72 
+
73  WDT_A_start(WDT_A_BASE);
+
74 
+
75  //Set LED1 to output direction
+
76  GPIO_setAsOutputPin(
+
77  GPIO_PORT_LED1,
+
78  GPIO_PIN_LED1
+
79  );
+
80 
+
81  PMM_unlockLPM5();
+
82 
+
83  //Toggle LED1
+
84  GPIO_toggleOutputOnPin(
+
85  GPIO_PORT_LED1,
+
86  GPIO_PIN_LED1
+
87  );
+
88 
+
89  //Enter LPM3
+
90  __bis_SR_register(LPM3_bits + GIE);
+
91  //For debugger
+ +
93 }
+ +
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2crc_2crc__ex1__build_signature_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2crc_2crc__ex1__build_signature_8c.html new file mode 100644 index 0000000..9fea114 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2crc_2crc__ex1__build_signature_8c.html @@ -0,0 +1,159 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/crc/crc_ex1_buildSignature.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
crc_ex1_buildSignature.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

CRC - Build Signature and Rebuild to test.

+

The CRC is first used to build a signature using a seed and multiple data values. This signature is considered as the checksum and can be sent by a UART connection along with the data to verify the correct data has been sent. The second half of this program is used to test the CRC checksum of the data that has been created, by recreating the same checksum and comparing it to the first checksum. If the two checksum are equal, then P1.0 is set and the LED is turned on. Breakpoints can be set before the CRC_setData() function to observe the CRC register values and see the subsequent signatures before/after each data set.

+

+Tested On: MSP430F5529,MSP430FR5739

+ + + + + + + +
/ |
RST
P1.0 --> LED
+

| |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • CRC peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 69 of file crc_ex1_buildSignature.c.

+ +

References __no_operation(), GPIO_setOutputHighOnPin(), and i.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2crc_2crc__ex1__build_signature_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2crc_2crc__ex1__build_signature_8c.js new file mode 100644 index 0000000..d25d986 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2crc_2crc__ex1__build_signature_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2crc_2crc__ex1__build_signature_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2crc_2crc__ex1__build_signature_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2crc_2crc__ex1__build_signature_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2crc_2crc__ex1__build_signature_8c_source.html new file mode 100644 index 0000000..3303b99 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2crc_2crc__ex1__build_signature_8c_source.html @@ -0,0 +1,206 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/crc/crc_ex1_buildSignature.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
crc_ex1_buildSignature.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
65 //******************************************************************************
+
66 
+
67 #include "driverlib.h"
+
68 
+
69 void main (void)
+
70 {
+
71  uint16_t crcSeed = 0xBEEF;
+
72  uint16_t data[] = {0x0123,
+
73  0x4567,
+
74  0x8910,
+
75  0x1112,
+
76  0x1314};
+
77  uint16_t crcResult;
+
78  uint8_t i;
+
79 
+
80  //Stop WDT
+
81  WDT_A_hold(WDT_A_BASE);
+
82 
+
83  //Set P1.0 as an output
+
84  GPIO_setAsOutputPin(
+
85  GPIO_PORT_P1,
+
86  GPIO_PIN0);
+
87 
+
88  //Set the CRC seed
+
89  CRC_setSeed(CRC_BASE,
+
90  crcSeed);
+
91 
+
92  for (i = 0; i < 5; i++)
+
93  {
+
94  //Add all of the values into the CRC signature
+
95  CRC_set16BitData(CRC_BASE,
+
96  data[i]);
+
97  }
+
98 
+
99  //Save the current CRC signature checksum to be compared for later
+
100  crcResult = CRC_getResult(CRC_BASE);
+
101 
+
102 
+
103  //*** Test the CRC ***//
+
104 
+
105  //Reset the CRC Signature and set the same seed
+
106  CRC_setSeed(CRC_BASE,
+
107  crcSeed);
+
108 
+
109  for (i = 0; i < 5; i++)
+
110  {
+
111  //Add all of the values into the CRC signature
+
112  CRC_set16BitData(CRC_BASE,
+
113  data[i]);
+
114  }
+
115 
+
116  //Compare the 2 CRC Resulting Signature Checksums
+
117  if (crcResult == CRC_getResult(CRC_BASE)){
+
118  //set P1.0
+ +
120  GPIO_PORT_P1,
+
121  GPIO_PIN0);
+
122  }
+
123 
+
124  //Enter LPM4, interrupts enabled
+
125  __bis_SR_register(LPM4_bits);
+
126  __no_operation();
+
127 }
+
128 
+
void main(void)
+ + +
__no_operation()
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c.html new file mode 100644 index 0000000..26b71e1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c.html @@ -0,0 +1,149 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/cs/cs_ex1_DCOSetup.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cs_ex1_DCOSetup.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MSP430FR57xx Demo - Configure MCLK for 8MHz operation

+

Description: Configure ACLK = SMCLK = MCLK = 8MHz

    MSP430FR57x
+  ---------------
+
+ + + + +
/ |
RST
+

| | | | | P2.0 |—> ACLK = MCLk = 8MHz

+ +

Definition at line 51 of file cs_ex1_DCOSetup.c.

+ +

References GPIO_setOutputLowOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c.js new file mode 100644 index 0000000..b9d72d0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c_source.html new file mode 100644 index 0000000..a9b8c6f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2cs_2cs__ex1___d_c_o_setup_8c_source.html @@ -0,0 +1,183 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/cs/cs_ex1_DCOSetup.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
cs_ex1_DCOSetup.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
49 //******************************************************************************
+
50 
+
51 void main(void)
+
52 {
+
53  //Stop WDT
+
54  WDT_A_hold(WDT_A_BASE);
+
55 
+
56  //Set DCO Frequency to 8MHz
+
57  CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_3);
+
58 
+
59  //configure MCLK, SMCLK and ACLK to be source by DCOCLK
+
60  CS_initClockSignal(CS_ACLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
61  CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
62  CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
63 
+
64  //Set P2.0 as Output Low (for setup as ACLK).
+
65  /*
+
66 
+
67  * Select Port 2
+
68  * Set Pin 0 to output Low.
+
69  */
+ +
71  GPIO_PORT_P2,
+
72  GPIO_PIN0
+
73  );
+
74 
+
75  //Set P2.0 as Ternary Module Function Output.
+
76  /*
+
77 
+
78  * Select Port 2
+
79  * Set Pin 0 to output Ternary Module Function, (ACLK).
+
80  */
+
81  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
82  GPIO_PORT_P2,
+
83  GPIO_PIN0,
+
84  GPIO_TERNARY_MODULE_FUNCTION
+
85  );
+
86 
+
87  while(1);
+
88 }
+
89 
+
void main(void)
+ +
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2dma_2dma__ex1__repeated_block_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2dma_2dma__ex1__repeated_block_8c.html new file mode 100644 index 0000000..bd23dea --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2dma_2dma__ex1__repeated_block_8c.html @@ -0,0 +1,151 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/dma/dma_ex1_repeatedBlock.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
dma_ex1_repeatedBlock.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

DMA - Repeated Block Transfer to-and-from RAM, Software Trigger.

+

A 16 word block from 1C00-1C1Fh is transfered to 1C20h-1C3fh using DMA0 in a burst block using software DMAREQ trigger. After each transfer, source, destination and DMA size are reset to initial software setting because DMA transfer mode 5 is used. P1.0 is toggled during DMA transfer only for demonstration purposes. ** RAM location 0x1C00 - 0x1C3F used - make sure no compiler conflict ** ACLK = REFO = 32kHz, MCLK = SMCLK = default DCO 1048576Hz

+

+Tested on MSP430F5529, MSP430FR5739

+

/|| XIN|- | | | 32kHz –|RST XOUT|- | | | P1.0|-> LED | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • DMA peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 68 of file dma_ex1_repeatedBlock.c.

+ +

References GPIO_setOutputHighOnPin(), GPIO_setOutputLowOnPin(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2dma_2dma__ex1__repeated_block_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2dma_2dma__ex1__repeated_block_8c.js new file mode 100644 index 0000000..bdca639 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2dma_2dma__ex1__repeated_block_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2dma_2dma__ex1__repeated_block_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2dma_2dma__ex1__repeated_block_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2dma_2dma__ex1__repeated_block_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2dma_2dma__ex1__repeated_block_8c_source.html new file mode 100644 index 0000000..1775789 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2dma_2dma__ex1__repeated_block_8c_source.html @@ -0,0 +1,220 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/dma/dma_ex1_repeatedBlock.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
dma_ex1_repeatedBlock.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
66 //******************************************************************************
+
67 
+
68 void main (void)
+
69 {
+
70  //Stop Watchdog Timer
+
71  WDT_A_hold(WDT_A_BASE);
+
72 
+
73  //Set P1.0 to output direction
+
74  GPIO_setAsOutputPin(
+
75  GPIO_PORT_P1,
+
76  GPIO_PIN0
+
77  );
+
78 
+
79  //Initialize and Setup DMA Channel 0
+
80  /*
+
81  * Base Address of the DMA Module
+
82  * Configure DMA channel 0
+
83  * Configure channel for repeated block transfers
+
84  * DMA interrupt flag will be set after every 16 transfers
+
85  * Use DMA_startTransfer() function to trigger transfers
+
86  * Transfer Word-to-Word
+
87  * Trigger upon Rising Edge of Trigger Source Signal
+
88  */
+
89  DMA_initParam param = {0};
+
90  param.channelSelect = DMA_CHANNEL_0;
+
91  param.transferModeSelect = DMA_TRANSFER_REPEATED_BLOCK;
+
92  param.transferSize = 16;
+
93  param.triggerSourceSelect = DMA_TRIGGERSOURCE_0;
+
94  param.transferUnitSelect = DMA_SIZE_SRCWORD_DSTWORD;
+
95  param.triggerTypeSelect = DMA_TRIGGER_RISINGEDGE;
+
96  DMA_init(&param);
+
97  /*
+
98  * Base Address of the DMA Module
+
99  * Configure DMA channel 0
+
100  * Use 0x1C00 as source
+
101  * Increment source address after every transfer
+
102  */
+
103  DMA_setSrcAddress(
+
104  DMA_CHANNEL_0,
+
105  0x1C00,
+
106  DMA_DIRECTION_INCREMENT);
+
107  /*
+
108  * Base Address of the DMA Module
+
109  * Configure DMA channel 0
+
110  * Use 0x1C20 as destination
+
111  * Increment destination address after every transfer
+
112  */
+
113  DMA_setDstAddress(
+
114  DMA_CHANNEL_0,
+
115  0x1C20,
+
116  DMA_DIRECTION_INCREMENT);
+
117 
+
118  //Enable transfers on DMA channel 0
+
119  DMA_enableTransfers(
+
120  DMA_CHANNEL_0);
+
121 
+
122  while (1)
+
123  {
+
124  //set P1.0
+ +
126  GPIO_PORT_P1,
+
127  GPIO_PIN0
+
128  );
+
129 
+
130  //Start block tranfer on DMA channel 0
+
131  DMA_startTransfer(
+
132  DMA_CHANNEL_0);
+
133 
+
134  //Clear P1.0 LED off
+ +
136  GPIO_PORT_P1,
+
137  GPIO_PIN0
+
138  );
+
139  }
+
140 }
+
141 
+
void main(void)
+
MPU_initThreeSegmentsParam param
+ +
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html new file mode 100644 index 0000000..412ae2f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html @@ -0,0 +1,217 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_a_spi/eusci_a_spi_ex1_master.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_a_spi_ex1_master.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCI_A0_ISR (void)
 
+ + + + + +

+Variables

uint8_t RXData =0
 
uint8_t TXData = 0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 80 of file eusci_a_spi_ex1_master.c.

+ +

References __delay_cycles(), __no_operation(), GPIO_setOutputLowOnPin(), i, param, and TXData.

+ +
+
+ +

◆ USCI_A0_ISR()

+ +
+
+ + + + + + + + +
void USCI_A0_ISR (void )
+
+ +

Definition at line 200 of file eusci_a_spi_ex1_master.c.

+ +

References __delay_cycles(), RXData, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData =0
+
+

USCI_A0, SPI 3-Wire Master Incremented Data This example shows how SPI master talks to SPI slave using 3-wire mode. Incrementing data is sent by the master starting at 0x01. Received data is expected to be same as the previous transmission. eUSCI RX ISR is used to handle communication with the CPU, normally in LPM0. If high, P1.0 indicates valid data reception. Because all execution after LPM0 is in ISRs, initialization waits for DCO to stabilize against ACLK. ACLK = ~32.768kHz, MCLK = SMCLK = DCO ~ 1048kHz. BRCLK = SMCLK/2

+

Use with eusci_spi_ex1_slave code example. If slave is in debug mode, P1.1 slave reset signal conflicts with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.


+

/|\ | | | | | Master—+->|RST | | | | P2.0|-> Data Out (UCA0SIMO) | | | P2.1|<- Data In (UCA0SOMI) | | | P1.5|-> Serial Clock Out (UCA0CLK)

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • SPI peripheral
  • +
  • GPIO Port peripheral (for SPI pins)
  • +
  • UCA0SIMO
  • +
  • UCA0SOMI
  • +
  • UCA0CLK
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_A0_VECTOR
  • +
+ +

Definition at line 77 of file eusci_a_spi_ex1_master.c.

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 78 of file eusci_a_spi_ex1_master.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.js new file mode 100644 index 0000000..41aa428 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCI_A0_ISR", "_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html#a7d5728ccc412d2d610500fa338c2d003", null ], + [ "RXData", "_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html#a597ef8ed788642728c57f66b3a21544f", null ], + [ "TXData", "_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c_source.html new file mode 100644 index 0000000..830df93 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c_source.html @@ -0,0 +1,300 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_a_spi/eusci_a_spi_ex1_master.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_a_spi_ex1_master.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 //*****************************************************************************
+
49 // MSP430FR5739
+
75 //*****************************************************************************
+
76 
+
77 uint8_t RXData =0;
+
78 uint8_t TXData = 0;
+
79 
+
80 void main(void)
+
81 {
+
82  volatile uint16_t i;
+
83 
+
84  //Stop watchdog timer
+
85  WDT_A_hold(WDT_A_BASE);
+
86 
+
87  //Set P1.0 as an output pin.
+
88  /*
+
89 
+
90  * Select Port 1
+
91  * Set Pin 0 as output
+
92  */
+
93  GPIO_setAsOutputPin(
+
94  GPIO_PORT_P1,
+
95  GPIO_PIN0
+
96  );
+
97  //Set P1.0 as Output Low.
+
98  /*
+
99 
+
100  * Select Port 1
+
101  * Set Pin 0 to output Low.
+
102  */
+ +
104  GPIO_PORT_P1,
+
105  GPIO_PIN0
+
106  );
+
107 
+
108  // Configure Pins for LFXIN
+
109  //Set PJ.4 and PJ.5 as Primary Module Function Input.
+
110  /*
+
111 
+
112  * Select Port J
+
113  * Set Pin 4, 5 to input Primary Module Function, (LFXIN).
+
114  */
+
115  GPIO_setAsPeripheralModuleFunctionInputPin(
+
116  GPIO_PORT_PJ,
+
117  GPIO_PIN4 + GPIO_PIN5,
+
118  GPIO_PRIMARY_MODULE_FUNCTION
+
119  );
+
120 
+
121  //Set external frequency for XT1
+
122  CS_setExternalClockSource(32768,0);
+
123  //Set DCO frequency to max DCO setting
+
124  CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_3);
+
125  //Select XT1 as the clock source for ACLK with no frequency divider
+
126  CS_initClockSignal(CS_ACLK,CS_XT1CLK_SELECT,CS_CLOCK_DIVIDER_1);
+
127  //Start XT1 with no time out
+
128  CS_turnOnXT1(CS_XT1_DRIVE_0);
+
129 
+
130  // Configure SPI pins
+
131  // Configure Pins for UCA0CLK
+
132  //Set P1.5 as Secondary Module Function Input.
+
133  /*
+
134 
+
135  * Select Port 1
+
136  * Set Pin 5 to input Secondary Module Function, (UCA0CLK).
+
137  */
+
138  GPIO_setAsPeripheralModuleFunctionInputPin(
+
139  GPIO_PORT_P1,
+
140  GPIO_PIN5,
+
141  GPIO_SECONDARY_MODULE_FUNCTION
+
142  );
+
143  // Configure Pins for UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI
+
144  //Set P2.0, P2.1 as Secondary Module Function Input.
+
145  /*
+
146 
+
147  * Select Port 2
+
148  * Set Pin 0, 1 to input Secondary Module Function, (UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI).
+
149  */
+
150  GPIO_setAsPeripheralModuleFunctionInputPin(
+
151  GPIO_PORT_P2,
+
152  GPIO_PIN0 + GPIO_PIN1,
+
153  GPIO_SECONDARY_MODULE_FUNCTION
+
154  );
+
155 
+
156  //Initialize Master
+
157  EUSCI_A_SPI_initMasterParam param = {0};
+
158  param.selectClockSource = EUSCI_A_SPI_CLOCKSOURCE_ACLK;
+
159  param.clockSourceFrequency = CS_getACLK();
+
160  param.desiredSpiClock = 500000;
+
161  param.msbFirst = EUSCI_A_SPI_MSB_FIRST;
+
162  param.clockPhase = EUSCI_A_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
+
163  param.clockPolarity = EUSCI_A_SPI_CLOCKPOLARITY_INACTIVITY_HIGH;
+
164  param.spiMode = EUSCI_A_SPI_3PIN;
+
165  EUSCI_A_SPI_initMaster(EUSCI_A0_BASE, &param);
+
166 
+
167  //Enable SPI module
+
168  EUSCI_A_SPI_enable(EUSCI_A0_BASE);
+
169 
+
170  EUSCI_A_SPI_clearInterrupt(EUSCI_A0_BASE,
+
171  EUSCI_A_SPI_RECEIVE_INTERRUPT);
+
172  // Enable USCI_A0 RX interrupt
+
173  EUSCI_A_SPI_enableInterrupt(EUSCI_A0_BASE,
+
174  EUSCI_A_SPI_RECEIVE_INTERRUPT);
+
175 
+
176  //Wait for slave to initialize
+
177  __delay_cycles(100);
+
178 
+
179  TXData = 0x1; // Holds TX data
+
180 
+
181  //USCI_A0 TX buffer ready?
+
182  while (!EUSCI_A_SPI_getInterruptStatus(EUSCI_A0_BASE,
+
183  EUSCI_A_SPI_TRANSMIT_INTERRUPT)) ;
+
184 
+
185  //Transmit Data to slave
+
186  EUSCI_A_SPI_transmitData(EUSCI_A0_BASE, TXData);
+
187 
+
188 
+
189  __bis_SR_register(LPM0_bits + GIE); // CPU off, enable interrupts
+
190  __no_operation(); // Remain in LPM0
+
191 
+
192 }
+
193 
+
194 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
195 #pragma vector=USCI_A0_VECTOR
+
196 __interrupt
+
197 #elif defined(__GNUC__)
+
198 __attribute__((interrupt(USCI_A0_VECTOR)))
+
199 #endif
+
200 void USCI_A0_ISR (void)
+
201 {
+
202  switch (__even_in_range(UCA0IV,4)){
+
203  //Vector 2 - RXIFG
+
204  case 2:
+
205  //USCI_A0 TX buffer ready?
+
206  while (!EUSCI_A_SPI_getInterruptStatus(EUSCI_A0_BASE,
+
207  EUSCI_A_SPI_TRANSMIT_INTERRUPT)) ;
+
208 
+
209  RXData = EUSCI_A_SPI_receiveData(EUSCI_A0_BASE);
+
210 
+
211  //Increment data
+
212  TXData++;
+
213 
+
214  //Send next value
+
215  EUSCI_A_SPI_transmitData(EUSCI_A0_BASE,
+
216  TXData
+
217  );
+
218 
+
219  //Delay between transmissions for slave to process information
+
220  __delay_cycles(40);
+
221 
+
222  break;
+
223  default: break;
+
224  }
+
225 }
+
uint8_t RXData
+
void main(void)
+
void USCI_A0_ISR(void)
+
uint8_t TXData
+
MPU_initThreeSegmentsParam param
+ + +
__no_operation()
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html new file mode 100644 index 0000000..6c19024 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html @@ -0,0 +1,219 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_a_spi/eusci_a_spi_ex1_slave.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_a_spi_ex1_slave.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCI_A0_ISR (void)
 
+ + + + + +

+Variables

uint8_t transmitData = 0x01
 
uint8_t receiveData = 0x00
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 76 of file eusci_a_spi_ex1_slave.c.

+ +

References param.

+ +
+
+ +

◆ USCI_A0_ISR()

+ +
+
+ + + + + + + + +
void USCI_A0_ISR (void )
+
+ +

Definition at line 156 of file eusci_a_spi_ex1_slave.c.

+ +

References receiveData, and transmitData.

+ +
+
+

Variable Documentation

+ +

◆ receiveData

+ +
+
+ + + + +
uint8_t receiveData = 0x00
+
+ +

Definition at line 74 of file eusci_a_spi_ex1_slave.c.

+ +
+
+ +

◆ transmitData

+ +
+
+ + + + +
uint8_t transmitData = 0x01
+
+

SPI slave talks to SPI master using 3-wire mode. Data is received from master and data from slave is then transmitted back to master. USCI RX ISR is used to handle communication, CPU normally in LPM4. Prior to initial data exchange, master pulses slaves RST for complete reset.

+

Use with eusci_spi_ex1_master code example. If the slave is in debug mode, the reset signal from the master will conflict with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.

+

+Tesed on MSP430FR5969 and MSP430FR5739

+

/|\ | | | | | Master—+->|RST | | | | P2.0|-> Data Out (UCA0SIMO) | | | P2.1|<- Data In (UCA0SOMI) | | | P1.5|<- Serial Clock Out (UCA0CLK)

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • SPI peripheral
  • +
  • GPIO Port peripheral (for SPI pins)
  • +
  • UCA0SIMO
  • +
  • UCA0SOMI
  • +
  • UCA0CLK
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_A0_VECTOR
  • +
+ +

Definition at line 74 of file eusci_a_spi_ex1_slave.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.js new file mode 100644 index 0000000..96fef53 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCI_A0_ISR", "_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html#a7d5728ccc412d2d610500fa338c2d003", null ], + [ "receiveData", "_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html#a216001f02f93a2c0b512c1b8724bdc60", null ], + [ "transmitData", "_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html#ac23b8f721ac5b7a4315ba2c3409b9e0a", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c_source.html new file mode 100644 index 0000000..71edca0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c_source.html @@ -0,0 +1,256 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_a_spi/eusci_a_spi_ex1_slave.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_a_spi_ex1_slave.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
72 //
+
73 //*****************************************************************************
+
74 uint8_t transmitData = 0x01, receiveData = 0x00;
+
75 
+
76 void main(void)
+
77 {
+
78  //Stop watchdog timer
+
79  WDT_A_hold(WDT_A_BASE);
+
80 
+
81  // Configure Pins for LFXIN
+
82  //Set PJ.4 and PJ.5 as Primary Module Function Input.
+
83  /*
+
84 
+
85  * Select Port J
+
86  * Set Pin 4, 5 to input Primary Module Function, (LFXIN).
+
87  */
+
88  GPIO_setAsPeripheralModuleFunctionInputPin(
+
89  GPIO_PORT_PJ,
+
90  GPIO_PIN4 + GPIO_PIN5,
+
91  GPIO_PRIMARY_MODULE_FUNCTION
+
92  );
+
93 
+
94  // Configure SPI pins
+
95  // Configure Pins for UCA0CLK
+
96  //Set P1.5 as Secondary Module Function Input.
+
97  /*
+
98 
+
99  * Select Port 1
+
100  * Set Pin 5 to input Secondary Module Function, (UCA0CLK).
+
101  */
+
102  GPIO_setAsPeripheralModuleFunctionInputPin(
+
103  GPIO_PORT_P1,
+
104  GPIO_PIN5,
+
105  GPIO_SECONDARY_MODULE_FUNCTION
+
106  );
+
107  // Configure Pins for UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI
+
108  //Set P2.0, P2.1 as Secondary Module Function Input.
+
109  /*
+
110 
+
111  * Select Port 2
+
112  * Set Pin 0, 1 to input Secondary Module Function, (UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI).
+
113  */
+
114  GPIO_setAsPeripheralModuleFunctionInputPin(
+
115  GPIO_PORT_P2,
+
116  GPIO_PIN0 + GPIO_PIN1,
+
117  GPIO_SECONDARY_MODULE_FUNCTION
+
118  );
+
119 
+
120  //Initialize slave to MSB first, inactive high clock polarity and 3 wire SPI
+
121  EUSCI_A_SPI_initSlaveParam param = {0};
+
122  param.msbFirst = EUSCI_A_SPI_MSB_FIRST;
+
123  param.clockPhase = EUSCI_A_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
+
124  param.clockPolarity = EUSCI_A_SPI_CLOCKPOLARITY_INACTIVITY_HIGH;
+
125  param.spiMode = EUSCI_A_SPI_3PIN;
+
126  EUSCI_A_SPI_initSlave(EUSCI_A0_BASE, &param);
+
127 
+
128  //Enable SPI Module
+
129  EUSCI_A_SPI_enable(EUSCI_A0_BASE);
+
130 
+
131  EUSCI_A_SPI_clearInterrupt(EUSCI_A0_BASE,
+
132  EUSCI_A_SPI_RECEIVE_INTERRUPT);
+
133 
+
134  //Enable Receive interrupt
+
135  EUSCI_A_SPI_enableInterrupt(EUSCI_A0_BASE,
+
136  EUSCI_A_SPI_RECEIVE_INTERRUPT
+
137  );
+
138 
+
139  __bis_SR_register(LPM0_bits + GIE); // Enter LPM0, enable interrupts
+
140 
+
141 
+
142 
+
143 }
+
144 
+
145 //******************************************************************************
+
146 //
+
147 //This is the USCI_A0 interrupt vector service routine.
+
148 //
+
149 //******************************************************************************
+
150 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
151 #pragma vector=USCI_A0_VECTOR
+
152 __interrupt
+
153 #elif defined(__GNUC__)
+
154 __attribute__((interrupt(USCI_A0_VECTOR)))
+
155 #endif
+
156 void USCI_A0_ISR (void)
+
157 {
+
158  switch (__even_in_range(UCA0IV,4)){
+
159  //Vector 2 - RXIFG
+
160  case 2:
+
161  //USCI_A0 TX buffer ready?
+
162  while (!EUSCI_A_SPI_getInterruptStatus(EUSCI_A0_BASE,
+
163  EUSCI_A_SPI_TRANSMIT_INTERRUPT
+
164  )) ;
+
165 
+
166  //Transmit data to master
+
167  EUSCI_A_SPI_transmitData(EUSCI_A0_BASE,
+ +
169  );
+
170 
+
171  //Receive data from master
+
172  receiveData = EUSCI_A_SPI_receiveData(EUSCI_A0_BASE);
+
173 
+
174  //Increment data to be transmitted
+
175  transmitData++;
+
176 
+
177  break;
+
178 
+
179  default: break;
+
180  }
+
181 }
+
182 
+
uint8_t receiveData
+
void main(void)
+
void USCI_A0_ISR(void)
+
uint8_t transmitData
+
MPU_initThreeSegmentsParam param
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html new file mode 100644 index 0000000..eb28ec1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html @@ -0,0 +1,259 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_a_uart/eusci_a_uart_ex1_loopbackAdvanced.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_a_uart_ex1_loopbackAdvanced.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void EUSCI_A0_ISR (void)
 
+ + + + + + + + + +

+Variables

uint16_t i
 
uint8_t RXData = 0
 
uint8_t TXData = 0
 
uint8_t check = 0
 
+

Function Documentation

+ +

◆ EUSCI_A0_ISR()

+ +
+
+ + + + + + + + +
void EUSCI_A0_ISR (void )
+
+ +

Definition at line 159 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +

References check, RXData, and TXData.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 68 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +

References check, param, STATUS_FAIL, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ check

+ +
+
+ + + + +
uint8_t check = 0
+
+ +

Definition at line 66 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +
+
+ +

◆ i

+ +
+
+ + + + +
uint16_t i
+
+

EUSCI_A0 External Loopback test using EUSCI_A_UART_init API

+

Description: This demo connects TX to RX of the MSP430 UART The example code shows proper initialization of registers and interrupts to receive and transmit data.

+

ACLK = BRCLK = 32.768kHz, MCLK = SMCLK = DCO/8 = ~1MHz

+
       Tested on MSP430FR5739
+        -----------------
+  RST -|     P2.0/UCA0TXD|----|
+       |                 |    |
+       |                 |    |
+       |     P2.1/UCA0RXD|----|
+       |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • UART peripheral
  • +
  • GPIO Port peripheral (for UART pins)
  • +
  • UCA0TXD
  • +
  • UCA0RXD
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_A0_VECTOR.
  • +
+ +

Definition at line 64 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +
+
+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData = 0
+
+ +

Definition at line 65 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 65 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.js new file mode 100644 index 0000000..6a8a21f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.js @@ -0,0 +1,9 @@ +var _m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c = +[ + [ "EUSCI_A0_ISR", "_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#a06404fa75e5db173d0570112cbb0d39a", null ], + [ "main", "_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "check", "_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#ad47d5b159b4c95a163edac9d1b659751", null ], + [ "i", "_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#a78f7a37dba921e0b0347b960fb40bc51", null ], + [ "RXData", "_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#a597ef8ed788642728c57f66b3a21544f", null ], + [ "TXData", "_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c_source.html new file mode 100644 index 0000000..602ebd4 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c_source.html @@ -0,0 +1,262 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_a_uart/eusci_a_uart_ex1_loopbackAdvanced.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_a_uart_ex1_loopbackAdvanced.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 uint16_t i;
+
65 uint8_t RXData = 0, TXData = 0;
+
66 uint8_t check = 0;
+
67 
+
68 void main(void)
+
69 {
+
70  // stop watchdog
+
71  WDT_A_hold(WDT_A_BASE);
+
72 
+
73  // LFXT Setup
+
74  //Set PJ.4 and PJ.5 as Primary Module Function Input.
+
75  /*
+
76 
+
77  * Select Port J
+
78  * Set Pin 4, 5 to input Primary Module Function, LFXT.
+
79  */
+
80  GPIO_setAsPeripheralModuleFunctionInputPin(
+
81  GPIO_PORT_PJ,
+
82  GPIO_PIN4 + GPIO_PIN5,
+
83  GPIO_PRIMARY_MODULE_FUNCTION
+
84  );
+
85 
+
86  //Set DCO frequency to 8 MHz
+
87  CS_setDCOFreq(CS_DCORSEL_1,CS_DCOFSEL_3);
+
88  //Set external clock frequency to 32.768 KHz
+
89  CS_setExternalClockSource(32768,0);
+
90  //Set ACLK=XT1
+
91  CS_initClockSignal(CS_ACLK,CS_XT1CLK_SELECT,CS_CLOCK_DIVIDER_1);
+
92  //Start XT1 with no time out
+
93  CS_turnOnXT1(CS_XT1_DRIVE_0);
+
94  //Set SMCLK = DCO with frequency divider of 8
+
95  CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_8);
+
96  //Set MCLK = DCO with frequency divider of 8
+
97  CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_8);
+
98 
+
99  // Configure UART pins
+
100  //Set P2.0 and P2.1 as Secondary Module Function Input.
+
101  /*
+
102 
+
103  * Select Port 2d
+
104  * Set Pin 0, 1 to input Secondary Module Function, (UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI).
+
105  */
+
106  GPIO_setAsPeripheralModuleFunctionInputPin(
+
107  GPIO_PORT_P2,
+
108  GPIO_PIN0 + GPIO_PIN1,
+
109  GPIO_SECONDARY_MODULE_FUNCTION
+
110  );
+
111 
+
112  // Configure UART
+
113  EUSCI_A_UART_initParam param = {0};
+
114  param.selectClockSource = EUSCI_A_UART_CLOCKSOURCE_ACLK;
+
115  param.clockPrescalar = 3;
+
116  param.firstModReg = 0;
+
117  param.secondModReg = 92;
+
118  param.parity = EUSCI_A_UART_NO_PARITY;
+
119  param.msborLsbFirst = EUSCI_A_UART_LSB_FIRST;
+
120  param.numberofStopBits = EUSCI_A_UART_ONE_STOP_BIT;
+
121  param.uartMode = EUSCI_A_UART_MODE;
+
122  param.overSampling = EUSCI_A_UART_LOW_FREQUENCY_BAUDRATE_GENERATION;
+
123 
+
124  if (STATUS_FAIL == EUSCI_A_UART_init(EUSCI_A0_BASE, &param)) {
+
125  return;
+
126  }
+
127 
+
128  EUSCI_A_UART_enable(EUSCI_A0_BASE);
+
129 
+
130  EUSCI_A_UART_clearInterrupt(EUSCI_A0_BASE,
+
131  EUSCI_A_UART_RECEIVE_INTERRUPT);
+
132 
+
133  // Enable USCI_A0 RX interrupt
+
134  EUSCI_A_UART_enableInterrupt(EUSCI_A0_BASE,
+
135  EUSCI_A_UART_RECEIVE_INTERRUPT); // Enable interrupt
+
136 
+
137  __enable_interrupt();
+
138  while (1)
+
139  {
+
140  TXData = TXData+1; // Increment TX data
+
141  // Load data onto buffer
+
142  EUSCI_A_UART_transmitData(EUSCI_A0_BASE,
+
143  TXData);
+
144  while(check != 1);
+
145  check = 0;
+
146  }
+
147 }
+
148 //******************************************************************************
+
149 //
+
150 //This is the USCI_A0 interrupt vector service routine.
+
151 //
+
152 //******************************************************************************
+
153 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
154 #pragma vector=USCI_A0_VECTOR
+
155 __interrupt
+
156 #elif defined(__GNUC__)
+
157 __attribute__((interrupt(USCI_A0_VECTOR)))
+
158 #endif
+
159 void EUSCI_A0_ISR(void)
+
160 {
+
161  switch(__even_in_range(UCA0IV,USCI_UART_UCTXCPTIFG))
+
162  {
+
163  case USCI_NONE: break;
+
164  case USCI_UART_UCRXIFG:
+
165  RXData = EUSCI_A_UART_receiveData(EUSCI_A0_BASE);
+
166  if(!(RXData == TXData)) // Check value
+
167  {
+
168  while(1);
+
169  }
+
170  check =1;
+
171  break;
+
172  case USCI_UART_UCTXIFG: break;
+
173  case USCI_UART_UCSTTIFG: break;
+
174  case USCI_UART_UCTXCPTIFG: break;
+
175  }
+
176 }
+
void EUSCI_A0_ISR(void)
+ + + + + +
MPU_initThreeSegmentsParam param
+ +
#define STATUS_FAIL
Definition: hw_memmap.h:23
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html new file mode 100644 index 0000000..142c3fd --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html @@ -0,0 +1,238 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex1_masterRxMultiple.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex1_masterRxMultiple.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
#define RXCOUNT   0x05
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t RXData
 
+

Macro Definition Documentation

+ +

◆ RXCOUNT

+ +
+
+ + + + +
#define RXCOUNT   0x05
+
+ +

Definition at line 75 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +
+
+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

i2c_master_rx_multi_int

+

This example shows how to configure the I2C module as a master for multi-byte reception with teh help of interrupts. The address of the slave module that the master communicating with also set in this example. This example uses the interrupt driven mode to receive data.

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR
  • +
+ +

Definition at line 69 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 99 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +

References __delay_cycles(), param, RXCOUNT, and SLAVE_ADDRESS.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 185 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +

References __bic_SR_register_on_exit(), RXCOUNT, and RXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData
+
+ +

Definition at line 98 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.js new file mode 100644 index 0000000..5e9b8fd --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.js @@ -0,0 +1,8 @@ +var _m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c = +[ + [ "RXCOUNT", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#a70033793a4008a84a5022c8e8467c71b", null ], + [ "SLAVE_ADDRESS", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "RXData", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#a597ef8ed788642728c57f66b3a21544f", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c_source.html new file mode 100644 index 0000000..68adb68 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c_source.html @@ -0,0 +1,319 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex1_masterRxMultiple.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex1_masterRxMultiple.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*****************************************************************************
+
33 //
+
53 //
+
54 //*****************************************************************************
+
55 
+
56 #include "driverlib.h"
+
57 
+
58 //*****************************************************************************
+
59 //
+
60 //Set the address for slave module. This is a 7-bit address sent in the
+
61 //following format:
+
62 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
63 //
+
64 //A zero in the "RS" position of the first byte means that the master
+
65 //transmits (sends) data to the selected slave, and a one in this position
+
66 //means that the master receives data from the slave.
+
67 //
+
68 //*****************************************************************************
+
69 #define SLAVE_ADDRESS 0x48
+
70 //*****************************************************************************
+
71 //
+
72 //Specify Expected Receive data count.
+
73 //
+
74 //*****************************************************************************
+
75 #define RXCOUNT 0x05
+
76 
+
77 
+
78 //******************************************************************************
+
79 // MSP430FR57xx Demo - USCI_B0 I2C Master RX multiple bytes from MSP430 Slave
+
80 //
+
81 // Description: This demo connects two MSP430's via the I2C bus. The master
+
82 // reads 5 bytes from the slave. This is the MASTER CODE. The data from the slave
+
83 // transmitter begins at 0 and increments with each transfer.
+
84 // The USCI_B0 RX interrupt is used to know when new data has been received.
+
85 // ACLK = n/a, MCLK = SMCLK = BRCLK = DCO = 1MHz
+
86 //
+
87 // /|\ /|\
+
88 // MSP430FR5739 10k 10k MSP430F5739
+
89 // slave | | master
+
90 // ----------------- | | -----------------
+
91 // -|XIN P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA XIN|-
+
92 // | | | | | 32kHz
+
93 // -|XOUT | | | XOUT|-
+
94 // | P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL |
+
95 // | | | P1.0|--> LED
+
96 //
+
97 //******************************************************************************
+
98 uint8_t RXData;
+
99 void main (void)
+
100 {
+
101  WDT_A_hold(WDT_A_BASE);
+
102 
+
103  //Set DCO frequency to 8MHz
+
104  CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_3);
+
105  //Set ACLK = DCO with frequency divider of 8
+
106  CS_initClockSignal(CS_ACLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_8);
+
107  //Set SMCLK = DCO with frequency divider of 8
+
108  CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_8);
+
109  //Set MCLK = DCO with frequency divider of 8
+
110  CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_8);
+
111 
+
112  // Configure Pins for I2C
+
113  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
114  /*
+
115 
+
116  * Select Port 1
+
117  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
118  */
+
119  GPIO_setAsPeripheralModuleFunctionInputPin(
+
120  GPIO_PORT_P1,
+
121  GPIO_PIN6 + GPIO_PIN7,
+
122  GPIO_SECONDARY_MODULE_FUNCTION
+
123  );
+
124 
+
125  //Init I2C master
+
126  EUSCI_B_I2C_initMasterParam param = {0};
+
127  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
128  param.i2cClk = CS_getSMCLK();
+
129  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
130  param.byteCounterThreshold = RXCOUNT;
+
131  param.autoSTOPGeneration = EUSCI_B_I2C_SEND_STOP_AUTOMATICALLY_ON_BYTECOUNT_THRESHOLD;
+
132  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
133 
+
134  //Specify slave address
+
135  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
137  );
+
138 
+
139  //Set Master in receive mode
+
140  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
141  EUSCI_B_I2C_RECEIVE_MODE
+
142  );
+
143 
+
144  //Enable I2C Module to start operations
+
145  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
146 
+
147  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
148  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
149  EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT +
+
150  EUSCI_B_I2C_NAK_INTERRUPT
+
151  );
+
152 
+
153  //Enable master Receive interrupt
+
154  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
155  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
156  EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT +
+
157  EUSCI_B_I2C_NAK_INTERRUPT
+
158  );
+
159 
+
160  //Set P1.0 as an output pin.
+
161  GPIO_setAsOutputPin(
+
162  GPIO_PORT_P1,
+
163  GPIO_PIN0
+
164  );
+
165 
+
166  while (1)
+
167  {
+
168  __delay_cycles(2000);
+
169 
+
170  while (EUSCI_B_I2C_SENDING_STOP ==
+
171  EUSCI_B_I2C_masterIsStopSent(EUSCI_B0_BASE));
+
172 
+
173  EUSCI_B_I2C_masterReceiveStart(EUSCI_B0_BASE);
+
174 
+
175  __bis_SR_register(CPUOFF+GIE); // Enter LPM0 w/ interrupt
+
176  }
+
177 }
+
178 
+
179 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
180 #pragma vector=USCI_B0_VECTOR
+
181 __interrupt
+
182 #elif defined(__GNUC__)
+
183 __attribute__((interrupt(USCI_B0_VECTOR)))
+
184 #endif
+
185 void USCIB0_ISR(void)
+
186 {
+
187  static uint8_t count = 0;
+
188  switch(__even_in_range(UCB0IV,0x1E))
+
189  {
+
190  case 0x00: break; // Vector 0: No interrupts break;
+
191  case 0x02: break; // Vector 2: ALIFG break;
+
192  case 0x04:
+
193  EUSCI_B_I2C_masterReceiveStart(EUSCI_B0_BASE);
+
194  break; // Vector 4: NACKIFG break;
+
195  case 0x06: break; // Vector 6: STT IFG break;
+
196  case 0x08: break; // Vector 8: STPIFG break;
+
197  case 0x0a: break; // Vector 10: RXIFG3 break;
+
198  case 0x0c: break; // Vector 14: TXIFG3 break;
+
199  case 0x0e: break; // Vector 16: RXIFG2 break;
+
200  case 0x10: break; // Vector 18: TXIFG2 break;
+
201  case 0x12: break; // Vector 20: RXIFG1 break;
+
202  case 0x14: break; // Vector 22: TXIFG1 break;
+
203  case 0x16:
+
204  RXData = EUSCI_B_I2C_masterReceiveSingle(
+
205  EUSCI_B0_BASE
+
206  ); // Get RX data
+
207  if (++count >= RXCOUNT) {
+
208  count = 0;
+
209  __bic_SR_register_on_exit(CPUOFF); // Exit LPM0
+
210  }
+
211  break; // Vector 24: RXIFG0 break;
+
212  case 0x18: break; // Vector 26: TXIFG0 break;
+
213  case 0x1a:
+
214  GPIO_toggleOutputOnPin(
+
215  GPIO_PORT_P1,
+
216  GPIO_PIN0
+
217  );
+
218  break; // Vector 28: BCNTIFG break;
+
219  case 0x1c: break; // Vector 30: clock low timeout break;
+
220  case 0x1e: break; // Vector 32: 9th bit break;
+
221  default: break;
+
222  }
+
223 }
+
224 
+ +
void USCIB0_ISR(void)
+ + + +
MPU_initThreeSegmentsParam param
+ +
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html new file mode 100644 index 0000000..1962ab8 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html @@ -0,0 +1,228 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex1_slaveTxMultiple.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex1_slaveTxMultiple.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t TXData = 0
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

EUSCI_B0 I2C Slave TX multiple bytes to MSP430 Master

+

Description: This demo connects two MSP430's via the I2C bus. The master reads from the slave. This is the SLAVE code. The TX data begins at 0 and is incremented each time it is sent. A stop condition is used as a trigger to initialize the outgoing data. The USCI_B0 TX interrupt is used to know when to TX. Tested on MSP430FR5739, MSP430FR5969

                          /|\  /|\
+                           10k  10k
+             slave         |    |        master
+       -----------------   |    |   -----------------
+     -|XIN  P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA  XIN|-
+      |                 |  |       |                 |
+     -|XOUT             |  |       |             XOUT|-
+      |     P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL     |
+      |                 |          |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 81 of file eusci_b_i2c_ex1_slaveTxMultiple.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 85 of file eusci_b_i2c_ex1_slaveTxMultiple.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 131 of file eusci_b_i2c_ex1_slaveTxMultiple.c.

+ +

References TXData.

+ +
+
+

Variable Documentation

+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 83 of file eusci_b_i2c_ex1_slaveTxMultiple.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.js new file mode 100644 index 0000000..b7ab971 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "TXData", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c_source.html new file mode 100644 index 0000000..cbaf035 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c_source.html @@ -0,0 +1,239 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex1_slaveTxMultiple.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex1_slaveTxMultiple.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
68 //
+
69 //*****************************************************************************
+
70 //*****************************************************************************
+
71 //
+
72 //Set the address for slave module. This is a 7-bit address sent in the
+
73 //following format:
+
74 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
75 //
+
76 //A zero in the "RS" position of the first byte means that the master
+
77 //transmits (sends) data to the selected slave, and a one in this position
+
78 //means that the master receives data from the slave.
+
79 //
+
80 //*****************************************************************************
+
81 #define SLAVE_ADDRESS 0x48
+
82 
+
83 uint8_t TXData = 0;
+
84 
+
85 void main(void)
+
86 {
+
87  WDT_A_hold(WDT_A_BASE);
+
88 
+
89  // Configure Pins for I2C
+
90  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
91  /*
+
92 
+
93  * Select Port 1
+
94  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
95  */
+
96  GPIO_setAsPeripheralModuleFunctionInputPin(
+
97  GPIO_PORT_P1,
+
98  GPIO_PIN6 + GPIO_PIN7,
+
99  GPIO_SECONDARY_MODULE_FUNCTION
+
100  );
+
101 
+
102  EUSCI_B_I2C_initSlaveParam param = {0};
+
103  param.slaveAddress = 0x48;
+
104  param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
105  param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
106  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &param);
+
107 
+
108  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
109 
+
110  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
111  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
112  EUSCI_B_I2C_STOP_INTERRUPT
+
113  );
+
114 
+
115  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
116  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
117  EUSCI_B_I2C_STOP_INTERRUPT
+
118  );
+
119 
+
120  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
121  __no_operation();
+
122 }
+
123 
+
124 
+
125 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
126 #pragma vector=USCI_B0_VECTOR
+
127 __interrupt
+
128 #elif defined(__GNUC__)
+
129 __attribute__((interrupt(USCI_B0_VECTOR)))
+
130 #endif
+
131 void USCIB0_ISR(void)
+
132 
+
133 {
+
134 
+
135 switch(__even_in_range(UCB0IV,0x1E))
+
136  {
+
137  case 0x00: break; // Vector 0: No interrupts break;
+
138  case 0x02: break; // Vector 2: ALIFG
+
139  case 0x04: break; // Vector 4: NACKIFG
+
140  case 0x06: break; // Vector 6: STTIFG
+
141  case 0x08: // Vector 8: STPIFG
+
142  TXData = 0;
+
143  break;
+
144  case 0x0a: break; // Vector 10: RXIFG3 break;
+
145  case 0x0c: break; // Vector 14: TXIFG3 break;
+
146  case 0x0e: break; // Vector 16: RXIFG2 break;
+
147  case 0x10: break; // Vector 18: TXIFG2 break;
+
148  case 0x12: break; // Vector 20: RXIFG1 break;
+
149  case 0x14: break; // Vector 22: TXIFG1 break;
+
150  case 0x16: break; // Vector 24: RXIFG0 break;
+
151  case 0x18:
+
152  EUSCI_B_I2C_slavePutData(EUSCI_B0_BASE,
+
153  TXData++);
+
154  break; // Vector 26: TXIFG0 break;
+
155  case 0x1a: break; // Vector 28: BCNTIFG break;
+
156  case 0x1c: break; // Vector 30: clock low timeout break;
+
157  case 0x1e: break; // Vector 32: 9th bit break;
+
158  default: break;
+
159 
+
160  }
+
161 }
+
void USCIB0_ISR(void)
+
void main(void)
+ +
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html new file mode 100644 index 0000000..d4d4bf5 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html @@ -0,0 +1,204 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex2_masterRxSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex2_masterRxSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + +

+Functions

void main (void)
 
+ + + +

+Variables

uint8_t RXData
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

This example shows how to configure the I2C module as a master for single byte reception in interrupt driven mode. The address of the slave module that the master is communicating with also set in this example.

+

Description: This demo connects two MSP430's via the I2C bus. The master reads from the slave. This is the MASTER CODE. The data from the slave transmitter begins at 0 and increments with each transfer. The USCI_B0 RX interrupt is used to know when new data has been received. ACLK = n/a, MCLK = SMCLK = BRCLK = DCO = 1MHz

                          /|\  /|\
+         MSP430FR5739      10k  10k     MSP430F5739
+             slave         |    |        master
+       -----------------   |    |   -----------------
+     -|XIN  P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA  XIN|-
+      |                 |  |       |                 | 32kHz
+     -|XOUT             |  |       |             XOUT|-
+      |     P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL     |
+      |                 |          |             P1.0|--> LED
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 82 of file eusci_b_i2c_ex2_masterRxSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 85 of file eusci_b_i2c_ex2_masterRxSingle.c.

+ +

References __delay_cycles(), param, RXData, and SLAVE_ADDRESS.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData
+
+ +

Definition at line 84 of file eusci_b_i2c_ex2_masterRxSingle.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.js new file mode 100644 index 0000000..0ffa53c --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "RXData", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html#a597ef8ed788642728c57f66b3a21544f", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c_source.html new file mode 100644 index 0000000..2a6f072 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c_source.html @@ -0,0 +1,232 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex2_masterRxSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex2_masterRxSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
55 
+
68 //
+
69 //*****************************************************************************
+
70 //*****************************************************************************
+
71 //
+
72 //Set the address for slave module. This is a 7-bit address sent in the
+
73 //following format:
+
74 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
75 //
+
76 //A zero in the "RS" position of the first byte means that the master
+
77 //transmits (sends) data to the selected slave, and a one in this position
+
78 //means that the master receives data from the slave.
+
79 //
+
80 //*****************************************************************************
+
81 
+
82 #define SLAVE_ADDRESS 0x48
+
83 
+
84 uint8_t RXData;
+
85 void main (void)
+
86 {
+
87  //Stop WDT
+
88  WDT_A_hold(WDT_A_BASE);
+
89 
+
90  //Set DCO frequency to 8MHz
+
91  CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_3);
+
92  //Set ACLK = DCO with frequency divider of 8
+
93  CS_initClockSignal(CS_ACLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_8);
+
94  //Set SMCLK = DCO with frequency divider of 8
+
95  CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_8);
+
96  //Set MCLK = DCO with frequency divider of 8
+
97  CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_8);
+
98 
+
99  // Configure Pins for I2C
+
100  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
101  /*
+
102 
+
103  * Select Port 1
+
104  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
105  */
+
106  GPIO_setAsPeripheralModuleFunctionInputPin(
+
107  GPIO_PORT_P1,
+
108  GPIO_PIN6 + GPIO_PIN7,
+
109  GPIO_SECONDARY_MODULE_FUNCTION
+
110  );
+
111 
+
112  /*
+
113  * Disable the GPIO power-on default high-impedance mode to activate
+
114  * previously configured port settings
+
115  */
+
116  PMM_unlockLPM5();
+
117 
+
118  EUSCI_B_I2C_initMasterParam param = {0};
+
119  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
120  param.i2cClk = CS_getSMCLK();
+
121  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
122  param.byteCounterThreshold = 1;
+
123  param.autoSTOPGeneration = EUSCI_B_I2C_SEND_STOP_AUTOMATICALLY_ON_BYTECOUNT_THRESHOLD;
+
124  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
125 
+
126  //Specify slave address
+
127  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
129  );
+
130 
+
131  //Set Master in receive mode
+
132  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
133  EUSCI_B_I2C_RECEIVE_MODE
+
134  );
+
135 
+
136  //Enable I2C Module to start operations
+
137  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
138 
+
139  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
140  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
141  EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT
+
142  );
+
143 
+
144 
+
145  while (1)
+
146  {
+
147  __delay_cycles(2000);
+
148 
+
149  // I2C start condition
+
150  RXData = EUSCI_B_I2C_masterReceiveSingleByte(EUSCI_B0_BASE);
+
151 
+
152  }
+
153 }
+ +
void main(void)
+
#define SLAVE_ADDRESS
+
MPU_initThreeSegmentsParam param
+ +
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html new file mode 100644 index 0000000..7235a9b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html @@ -0,0 +1,227 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex2_slaveTxSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex2_slaveTxSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t TXData = 0x00
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

Description: This demo connects two MSP430's via the I2C bus. The master reads from the slave. This is the SLAVE code. The TX data begins at 0 and is incremented each time it is sent. A stop condition is used as a trigger to increment the outgoing data. The USCI_B0 TX interrupt is used to know when to TX. Tested on MSP430FR5739, MSP430FR5969

                          /|\  /|\
+                           10k  10k
+             slave         |    |        master
+       -----------------   |    |   -----------------
+     -|XIN  P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA  XIN|-
+      |                 |  |       |                 |
+     -|XOUT             |  |       |             XOUT|-
+      |     P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL     |
+      |                 |          |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 78 of file eusci_b_i2c_ex2_slaveTxSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 82 of file eusci_b_i2c_ex2_slaveTxSingle.c.

+ +

References __no_operation(), param, and SLAVE_ADDRESS.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 134 of file eusci_b_i2c_ex2_slaveTxSingle.c.

+ +

References TXData.

+ +
+
+

Variable Documentation

+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0x00
+
+ +

Definition at line 80 of file eusci_b_i2c_ex2_slaveTxSingle.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.js new file mode 100644 index 0000000..56e4f33 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "TXData", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c_source.html new file mode 100644 index 0000000..b07dba4 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c_source.html @@ -0,0 +1,245 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex2_slaveTxSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex2_slaveTxSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
66 //*****************************************************************************
+
67 //*****************************************************************************
+
68 //
+
69 //Set the address for slave module. This is a 7-bit address sent in the
+
70 //following format:
+
71 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
72 //
+
73 //A zero in the "RS" position of the first byte means that the master
+
74 //transmits (sends) data to the selected slave, and a one in this position
+
75 //means that the master receives data from the slave.
+
76 //
+
77 //*****************************************************************************
+
78 #define SLAVE_ADDRESS 0x48
+
79 
+
80 uint8_t TXData = 0x00;
+
81 
+
82 void main(void)
+
83 {
+
84  WDT_A_hold(WDT_A_BASE);
+
85 
+
86  // Configure Pins for I2C
+
87  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
88  /*
+
89 
+
90  * Select Port 1
+
91  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
92  */
+
93  GPIO_setAsPeripheralModuleFunctionInputPin(
+
94  GPIO_PORT_P1,
+
95  GPIO_PIN6 + GPIO_PIN7,
+
96  GPIO_SECONDARY_MODULE_FUNCTION
+
97  );
+
98 
+
99  // eUSCI configuration
+
100  EUSCI_B_I2C_initSlaveParam param = {0};
+
101  param.slaveAddress = SLAVE_ADDRESS;
+
102  param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
103  param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
104  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &param);
+
105 
+
106  //Enable I2C Module to start operations
+
107  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
108 
+
109  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
110  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
111  EUSCI_B_I2C_STOP_INTERRUPT
+
112  );
+
113 
+
114  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
115  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
116  EUSCI_B_I2C_STOP_INTERRUPT
+
117  );
+
118 
+
119  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
120  __no_operation();
+
121 }
+
122 
+
123 //******************************************************************************
+
124 //
+
125 //This is the USCI_B0 interrupt vector service routine.
+
126 //
+
127 //******************************************************************************
+
128 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
129 #pragma vector=USCI_B0_VECTOR
+
130 __interrupt
+
131 #elif defined(__GNUC__)
+
132 __attribute__((interrupt(USCI_B0_VECTOR)))
+
133 #endif
+
134 void USCIB0_ISR(void)
+
135 
+
136 {
+
137 switch(__even_in_range(UCB0IV,0x1E))
+
138  {
+
139  case 0x00: break; // Vector 0: No interrupts break;
+
140  case 0x02: break; // Vector 2: ALIFG
+
141  case 0x04: break; // Vector 4: NACKIFG
+
142  case 0x06: break; // Vector 6: STTIFG
+
143  case 0x08: // Vector 8: STPIFG
+
144  TXData++;
+
145  break;
+
146  case 0x0a: break; // Vector 10: RXIFG3 break;
+
147  case 0x0c: break; // Vector 14: TXIFG3 break;
+
148  case 0x0e: break; // Vector 16: RXIFG2 break;
+
149  case 0x10: break; // Vector 18: TXIFG2 break;
+
150  case 0x12: break; // Vector 20: RXIFG1 break;
+
151  case 0x14: break; // Vector 22: TXIFG1 break;
+
152  case 0x16: break; // Vector 24: RXIFG0 break;
+
153  case 0x18:
+
154  EUSCI_B_I2C_slavePutData(EUSCI_B0_BASE,
+
155  TXData
+
156  );
+
157  break; // Vector 26: TXIFG0 break;
+
158  case 0x1a: break; // Vector 28: BCNTIFG break;
+
159  case 0x1c: break; // Vector 30: clock low timeout break;
+
160  case 0x1e: break; // Vector 32: 9th bit break;
+
161  default: break;
+
162 
+
163  }
+
164 }
+
void USCIB0_ISR(void)
+
void main(void)
+ +
#define SLAVE_ADDRESS
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html new file mode 100644 index 0000000..90b5d9e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html @@ -0,0 +1,247 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex3_masterTxMultiple.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex3_masterTxMultiple.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + + + +

+Variables

uint8_t TXData =0
 
uint8_t TXByteCtr
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

This example shows how to configure the I2C module as a master for multi byte transmission in interrupt driven mode. The address of the slave module is set in this example.

+

MSP430FR57xx Demo - USCI_B0 I2C Master TX multiple bytes to MSP430 Slave

+

Description: This demo connects two MSP430's via the I2C bus. The master transmits to the slave. This is the MASTER CODE. It cntinuously transmits an array of data and demonstrates how to implement an I2C master transmitter sending multiple bytes using the USCI_B0 TX interrupt. ACLK = n/a, MCLK = SMCLK = BRCLK = default DCO = ~1.045MHz

                          /|\  /|\
+          MSP430FR5739    10k  10k      MSP430FR5739
+             slave         |    |         master
+       -----------------   |    |   -----------------
+     -|XIN  P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA  XIN|-
+      |                 |  |       |                 |
+     -|XOUT             |  |       |             XOUT|-
+      |     P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL     |
+      |                 |          |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 82 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 87 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +

References __delay_cycles(), param, SLAVE_ADDRESS, TXByteCtr, and TXData.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 177 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +

References __bic_SR_register_on_exit(), TXByteCtr, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ TXByteCtr

+ +
+
+ + + + +
uint8_t TXByteCtr
+
+ +

Definition at line 85 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData =0
+
+ +

Definition at line 84 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.js new file mode 100644 index 0000000..af6103b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.js @@ -0,0 +1,8 @@ +var _m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "TXByteCtr", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#a442fc7a9731fc8e66469e62429b32219", null ], + [ "TXData", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c_source.html new file mode 100644 index 0000000..c8e9969 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c_source.html @@ -0,0 +1,286 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex3_masterTxMultiple.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex3_masterTxMultiple.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
68 //
+
69 
+
70 //******************************************************************************
+
71 //*****************************************************************************
+
72 //
+
73 //Set the address for slave module. This is a 7-bit address sent in the
+
74 //following format:
+
75 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
76 //
+
77 //A zero in the "RS" position of the first byte means that the master
+
78 //transmits (sends) data to the selected slave, and a one in this position
+
79 //means that the master receives data from the slave.
+
80 //
+
81 //*****************************************************************************
+
82 #define SLAVE_ADDRESS 0x48
+
83 
+
84 uint8_t TXData =0; // Pointer to TX data
+
85 uint8_t TXByteCtr;
+
86 
+
87 void main(void)
+
88 {
+
89  WDT_A_hold(WDT_A_BASE);
+
90 
+
91  //Set DCO frequency to 8MHz
+
92  CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_3);
+
93  //Set ACLK = DCO with frequency divider of 8
+
94  CS_initClockSignal(CS_ACLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_8);
+
95  //Set SMCLK = DCO with frequency divider of 8
+
96  CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_8);
+
97  //Set MCLK = DCO with frequency divider of 8
+
98  CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_8);
+
99 
+
100  // Configure Pins for I2C
+
101  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
102  /*
+
103 
+
104  * Select Port 1
+
105  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
106  */
+
107  GPIO_setAsPeripheralModuleFunctionInputPin(
+
108  GPIO_PORT_P1,
+
109  GPIO_PIN6 + GPIO_PIN7,
+
110  GPIO_SECONDARY_MODULE_FUNCTION
+
111  );
+
112 
+
113  EUSCI_B_I2C_initMasterParam param = {0};
+
114  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
115  param.i2cClk = 1000000;
+
116  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
117  param.byteCounterThreshold = 0;
+
118  param.autoSTOPGeneration = EUSCI_B_I2C_NO_AUTO_STOP;
+
119  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
120 
+
121  //Specify slave address
+
122  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
124  );
+
125 
+
126  //Set Master in receive mode
+
127  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
128  EUSCI_B_I2C_TRANSMIT_MODE
+
129  );
+
130 
+
131  //Enable I2C Module to start operations
+
132  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
133 
+
134  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
135  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
136  EUSCI_B_I2C_NAK_INTERRUPT
+
137  );
+
138 
+
139  //Enable master Receive interrupt
+
140  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
141  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
142  EUSCI_B_I2C_NAK_INTERRUPT
+
143  );
+
144  while(1)
+
145  {
+
146  __delay_cycles(1000); // Delay between transmissions
+
147  TXByteCtr = 4; // Load TX byte counter
+
148  TXData = 0;
+
149 
+
150  while (EUSCI_B_I2C_SENDING_STOP == EUSCI_B_I2C_masterIsStopSent
+
151  (EUSCI_B0_BASE));
+
152 
+
153 
+
154  EUSCI_B_I2C_masterSendMultiByteStart(EUSCI_B0_BASE,
+
155  TXData++);
+
156 
+
157  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
158  // Remain in LPM0 until all data
+
159  // is TX'd
+
160  // Increment data byte
+
161  }
+
162 
+
163 }
+
164 
+
165 
+
166 //------------------------------------------------------------------------------
+
167 // The USCIAB0TX_ISR is structured such that it can be used to transmit any
+
168 // number of bytes by pre-loading TXByteCtr with the byte count. Also, TXData
+
169 // points to the next byte to transmit.
+
170 //------------------------------------------------------------------------------
+
171 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
172 #pragma vector=USCI_B0_VECTOR
+
173 __interrupt
+
174 #elif defined(__GNUC__)
+
175 __attribute__((interrupt(USCI_B0_VECTOR)))
+
176 #endif
+
177 void USCIB0_ISR(void)
+
178 {
+
179  switch(__even_in_range(UCB0IV,0x1E))
+
180  {
+
181  case 0x00: break; // Vector 0: No interrupts break;
+
182  case 0x02: break;
+
183  case 0x04:
+
184  //resend start if NACK
+
185  EUSCI_B_I2C_masterSendStart(EUSCI_B0_BASE);
+
186  break; // Vector 4: NACKIFG break;
+
187  case 0x18:
+
188  if (TXByteCtr) // Check TX byte counter
+
189  {
+
190 
+
191  EUSCI_B_I2C_masterSendMultiByteNext(EUSCI_B0_BASE,
+
192  TXData++);
+
193  TXByteCtr--; // Decrement TX byte counter
+
194 
+
195  }
+
196  else
+
197  {
+
198  EUSCI_B_I2C_masterSendMultiByteStop(EUSCI_B0_BASE);
+
199 
+
200  __bic_SR_register_on_exit(CPUOFF);// Exit LPM0
+
201  }
+
202  break; // Vector 26: TXIFG0 break;
+
203  default: break;
+
204  }
+
205 }
+ +
void USCIB0_ISR(void)
+ + + +
MPU_initThreeSegmentsParam param
+ +
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html new file mode 100644 index 0000000..a1e74eb --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html @@ -0,0 +1,209 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex3_slaveRxMultiple.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex3_slaveRxMultiple.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t RXData
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+ +

Definition at line 67 of file eusci_b_i2c_ex3_slaveRxMultiple.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 71 of file eusci_b_i2c_ex3_slaveRxMultiple.c.

+ +

References __no_operation(), param, and SLAVE_ADDRESS.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 125 of file eusci_b_i2c_ex3_slaveRxMultiple.c.

+ +

References RXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData
+
+ +

Definition at line 69 of file eusci_b_i2c_ex3_slaveRxMultiple.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.js new file mode 100644 index 0000000..fb1d566 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "RXData", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html#a597ef8ed788642728c57f66b3a21544f", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c_source.html new file mode 100644 index 0000000..1e11942 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c_source.html @@ -0,0 +1,263 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex3_slaveRxMultiple.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex3_slaveRxMultiple.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
35 // EUSCI_B0 I2C Slave RX single bytes from MSP430 Master
+
36 //
+
37 // Description: This demo connects two MSP430's via the I2C bus. The master
+
38 // transmits to the slave. This is the slave code. The interrupt driven
+
39 // data receiption is demonstrated using the USCI_B0 RX interrupt.
+
40 //
+
41 // Tested on MSP430FR5739, MSP430FR5969
+
42 //
+
43 // /|\ /|\
+
44 // 10k 10k
+
45 // slave | | master
+
46 // ----------------- | | -----------------
+
47 // -|XIN P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA XIN|-
+
48 // | | | | |
+
49 // -|XOUT | | | XOUT|-
+
50 // | P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL |
+
51 // | | | |
+
52 // | | | |
+
53 //
+
54 
+
55 //******************************************************************************
+
56 //*****************************************************************************
+
57 //
+
58 //Set the address for slave module. This is a 7-bit address sent in the
+
59 //following format:
+
60 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
61 //
+
62 //A zero in the "RS" position of the first byte means that the master
+
63 //transmits (sends) data to the selected slave, and a one in this position
+
64 //means that the master receives data from the slave.
+
65 //
+
66 //*****************************************************************************
+
67 #define SLAVE_ADDRESS 0x48
+
68 
+
69 uint8_t RXData;
+
70 
+
71 void main(void)
+
72 {
+
73  WDT_A_hold(WDT_A_BASE);
+
74 
+
75  // Configure Pins for I2C
+
76  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
77  /*
+
78 
+
79  * Select Port 1
+
80  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
81  */
+
82  GPIO_setAsPeripheralModuleFunctionInputPin(
+
83  GPIO_PORT_P1,
+
84  GPIO_PIN6 + GPIO_PIN7,
+
85  GPIO_SECONDARY_MODULE_FUNCTION
+
86  );
+
87 
+
88  // eUSCI configuration
+
89  EUSCI_B_I2C_initSlaveParam param = {0};
+
90  param.slaveAddress = SLAVE_ADDRESS;
+
91  param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
92  param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
93  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &param);
+
94 
+
95  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
96 
+
97  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
98  EUSCI_B_I2C_RECEIVE_INTERRUPT0
+
99  );
+
100 
+
101  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
102  EUSCI_B_I2C_RECEIVE_INTERRUPT0
+
103  );
+
104 
+
105  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
106  __no_operation();
+
107 }
+
108 
+
109 
+
110 //------------------------------------------------------------------------------
+
111 // The USCI_B0 data ISR RX vector is used to move received data from the I2C
+
112 // master to the MSP430 memory.
+
113 //------------------------------------------------------------------------------
+
114 //------------------------------------------------------------------------------
+
115 // The USCI_B0 state ISR TX vector is used to wake up the CPU from LPM0 in order
+
116 // to process the received data in the main program. LPM0 is only exit in case
+
117 // of a (re-)start or stop condition when actual data was received.
+
118 //------------------------------------------------------------------------------
+
119 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
120 #pragma vector=USCI_B0_VECTOR
+
121 __interrupt
+
122 #elif defined(__GNUC__)
+
123 __attribute__((interrupt(USCI_B0_VECTOR)))
+
124 #endif
+
125 void USCIB0_ISR(void)
+
126 {
+
127  switch(__even_in_range(UCB0IV,0x1E))
+
128  {
+
129  case 0x00: break; // Vector 0: No interrupts break;
+
130  case 0x02: break; // Vector 2: ALIFG break;
+
131  case 0x04: break; // Vector 4: NACKIFG break;
+
132  case 0x06: break; // Vector 6: STTIFG break;
+
133  case 0x08: break; // Vector 8: STPIFG break;
+
134  case 0x0a: break; // Vector 10: RXIFG3 break;
+
135  case 0x0c: break; // Vector 14: TXIFG3 break;
+
136  case 0x0e: break; // Vector 16: RXIFG2 break;
+
137  case 0x10: break; // Vector 18: TXIFG2 break;
+
138  case 0x12: break; // Vector 20: RXIFG1 break;
+
139  case 0x14: break; // Vector 22: TXIFG1 break;
+
140  case 0x16:
+
141  RXData = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
142 
+
143  break; // Vector 24: RXIFG0 break;
+
144  case 0x18: break; // Vector 26: TXIFG0 break;
+
145  case 0x1a: break; // Vector 28: BCNTIFG break;
+
146  case 0x1c: break; // Vector 30: clock low timeout break;
+
147  case 0x1e: break; // Vector 32: 9th bit break;
+
148  default: break;
+
149  }
+
150 
+
151 }
+ +
void USCIB0_ISR(void)
+
void main(void)
+
#define SLAVE_ADDRESS
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html new file mode 100644 index 0000000..5a17248 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html @@ -0,0 +1,205 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex4_masterTxSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex4_masterTxSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + +

+Functions

void main (void)
 
+ + + +

+Variables

uint8_t transmitData
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

This example shows how to configure the I2C module as a master for single byte transmission in interrupt mode. The address of the slave module that the master is communicating with also set in this example.

+

MSP430FR57xx Demo - USCI_B0 I2C Master TX single bytes to MSP430 Slave

+

Description: This demo connects two MSP430's via the I2C bus. The master transmits to the slave. This is the master code. It continuously transmits 00h, 01h, ..., 0ffh and demonstrates how to implement an I2C master transmitter sending a single byte using the USCI_B0 TX interrupt. ACLK = n/a, MCLK = SMCLK = BRCLK = default DCO = ~1.045MHz

                          /|\  /|\
+          MSP430FR5739    10k  10k     MSP430FR5739
+             slave         |    |         master
+       -----------------   |    |   -----------------
+     -|XIN  P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA  XIN|-
+      |                 |  |       |                 |
+     -|XOUT             |  |       |             XOUT|-
+      |     P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL     |
+      |                 |          |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 82 of file eusci_b_i2c_ex4_masterTxSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 86 of file eusci_b_i2c_ex4_masterTxSingle.c.

+ +

References __delay_cycles(), param, SLAVE_ADDRESS, and transmitData.

+ +
+
+

Variable Documentation

+ +

◆ transmitData

+ +
+
+ + + + +
uint8_t transmitData
+
+ +

Definition at line 84 of file eusci_b_i2c_ex4_masterTxSingle.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.js new file mode 100644 index 0000000..1967a55 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "transmitData", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html#ac23b8f721ac5b7a4315ba2c3409b9e0a", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c_source.html new file mode 100644 index 0000000..24f64c4 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c_source.html @@ -0,0 +1,232 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex4_masterTxSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex4_masterTxSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
69 //
+
70 //*****************************************************************************
+
71 //*****************************************************************************
+
72 //
+
73 //Set the address for slave module. This is a 7-bit address sent in the
+
74 //following format:
+
75 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
76 //
+
77 //A zero in the "RS" position of the first byte means that the master
+
78 //transmits (sends) data to the selected slave, and a one in this position
+
79 //means that the master receives data from the slave.
+
80 //
+
81 //*****************************************************************************
+
82 #define SLAVE_ADDRESS 0x48
+
83 
+
84 uint8_t transmitData;
+
85 
+
86 void main (void)
+
87 {
+
88  WDT_A_hold(WDT_A_BASE);
+
89 
+
90  //Set DCO frequency to 8MHz
+
91  CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_3);
+
92  //Set ACLK = DCO with frequency divider of 8
+
93  CS_initClockSignal(CS_ACLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_8);
+
94  //Set SMCLK = DCO with frequency divider of 8
+
95  CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_8);
+
96  //Set MCLK = DCO with frequency divider of 8
+
97  CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_8);
+
98 
+
99  // Configure Pins for I2C
+
100  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
101  /*
+
102 
+
103  * Select Port 1
+
104  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
105  */
+
106  GPIO_setAsPeripheralModuleFunctionInputPin(
+
107  GPIO_PORT_P1,
+
108  GPIO_PIN6 + GPIO_PIN7,
+
109  GPIO_SECONDARY_MODULE_FUNCTION
+
110  );
+
111 
+
112  //Initialize transmit data packet
+
113  transmitData = 0x01;
+
114 
+
115  //Initialize Master
+
116  EUSCI_B_I2C_initMasterParam param = {0};
+
117  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
118  param.i2cClk = CS_getSMCLK();
+
119  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
120  param.byteCounterThreshold = 1;
+
121  param.autoSTOPGeneration = EUSCI_B_I2C_NO_AUTO_STOP;
+
122  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
123 
+
124  //Specify slave address
+
125  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
127  );
+
128 
+
129  //Set in transmit mode
+
130  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
131  EUSCI_B_I2C_TRANSMIT_MODE
+
132  );
+
133 
+
134  //Enable I2C Module to start operations
+
135  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
136 
+
137  while (1)
+
138  {
+
139  //Send single byte data.
+
140  EUSCI_B_I2C_masterSendSingleByte(EUSCI_B0_BASE,
+ +
142  );
+
143 
+
144  //Delay until transmission completes
+
145  while (EUSCI_B_I2C_isBusBusy(EUSCI_B0_BASE)) ;
+
146 
+
147  //Delay between each transaction
+
148  __delay_cycles(50);
+
149 
+
150  //Increment transmit data counter
+
151  transmitData++;
+
152  }
+
153 }
+
154 
+
155 
+
void main(void)
+
uint8_t transmitData
+
#define SLAVE_ADDRESS
+
MPU_initThreeSegmentsParam param
+ +
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html new file mode 100644 index 0000000..e3b381f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html @@ -0,0 +1,230 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex4_slaveRxSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex4_slaveRxSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t RXData
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

This example shows how to configure the I2C module as a slave for single byte reception in interrupt driven mode. The address of the slave module is set in this example. EUSCI_B0 I2C Slave RX single bytes from MSP430 Master

+

Description: This demo connects two MSP430's via the I2C bus. The master transmits to the slave. This is the slave code. The interrupt driven data receiption is demonstrated using the USCI_B0 RX interrupt.

+

Tested on MSP430FR5739, MSP430FR5969

                          /|\  /|\
+                          10k  10k
+             slave         |    |         master
+       -----------------   |    |   -----------------
+     -|XIN  P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA  XIN|-
+      |                 |  |       |                 |
+     -|XOUT             |  |       |             XOUT|-
+      |     P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL     |
+      |                 |          |                 |
+      |                 |          |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 83 of file eusci_b_i2c_ex4_slaveRxSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 87 of file eusci_b_i2c_ex4_slaveRxSingle.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 132 of file eusci_b_i2c_ex4_slaveRxSingle.c.

+ +

References RXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData
+
+ +

Definition at line 85 of file eusci_b_i2c_ex4_slaveRxSingle.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.js new file mode 100644 index 0000000..affd42c --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "RXData", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html#a597ef8ed788642728c57f66b3a21544f", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c_source.html new file mode 100644 index 0000000..d72c645 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c_source.html @@ -0,0 +1,234 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex4_slaveRxSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex4_slaveRxSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
70 //
+
71 //*****************************************************************************
+
72 //*****************************************************************************
+
73 //
+
74 //Set the address for slave module. This is a 7-bit address sent in the
+
75 //following format:
+
76 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
77 //
+
78 //A zero in the "RS" position of the first byte means that the master
+
79 //transmits (sends) data to the selected slave, and a one in this position
+
80 //means that the master receives data from the slave.
+
81 //
+
82 //*****************************************************************************
+
83 #define SLAVE_ADDRESS 0x48
+
84 
+
85 uint8_t RXData;
+
86 
+
87 void main(void)
+
88 {
+
89  WDT_A_hold(WDT_A_BASE);
+
90 
+
91  // Configure Pins for I2C
+
92  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
93  /*
+
94 
+
95  * Select Port 1
+
96  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
97  */
+
98  GPIO_setAsPeripheralModuleFunctionInputPin(
+
99  GPIO_PORT_P1,
+
100  GPIO_PIN6 + GPIO_PIN7,
+
101  GPIO_SECONDARY_MODULE_FUNCTION
+
102  );
+
103 
+
104  // eUSCI configuration
+
105  EUSCI_B_I2C_initSlaveParam param = {0};
+
106  param.slaveAddress = 0x48;
+
107  param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
108  param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
109  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &param);
+
110 
+
111  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
112 
+
113  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
114  EUSCI_B_I2C_RECEIVE_INTERRUPT0
+
115  );
+
116 
+
117  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
118  EUSCI_B_I2C_RECEIVE_INTERRUPT0
+
119  );
+
120 
+
121 
+
122  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
123  __no_operation();
+
124 }
+
125 
+
126 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
127 #pragma vector=USCI_B0_VECTOR
+
128 __interrupt
+
129 #elif defined(__GNUC__)
+
130 __attribute__((interrupt(USCI_B0_VECTOR)))
+
131 #endif
+
132 void USCIB0_ISR(void)
+
133 {
+
134  switch(__even_in_range(UCB0IV,0x1E))
+
135  {
+
136  case 0x00: break; // Vector 0: No interrupts break;
+
137  case 0x02: break; // Vector 2: ALIFG break;
+
138  case 0x04: break; // Vector 4: NACKIFG break;
+
139  case 0x06: break; // Vector 6: STTIFG break;
+
140  case 0x08: break; // Vector 8: STPIFG break;
+
141  case 0x0a: break; // Vector 10: RXIFG3 break;
+
142  case 0x0c: break; // Vector 14: TXIFG3 break;
+
143  case 0x0e: break; // Vector 16: RXIFG2 break;
+
144  case 0x10: break; // Vector 18: TXIFG2 break;
+
145  case 0x12: break; // Vector 20: RXIFG1 break;
+
146  case 0x14: break; // Vector 22: TXIFG1 break;
+
147  case 0x16:
+
148  RXData = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
149  // Get RX data
+
150  break; // Vector 24: RXIFG0 break;
+
151  case 0x18: break; // Vector 26: TXIFG0 break;
+
152  case 0x1a: break; // Vector 28: BCNTIFG break;
+
153  case 0x1c: break; // Vector 30: clock low timeout break;
+
154  case 0x1e: break; // Vector 32: 9th bit break;
+
155  default: break;
+
156  }
+
157 
+
158 }
+ +
void USCIB0_ISR(void)
+
void main(void)
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html new file mode 100644 index 0000000..8645ac2 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html @@ -0,0 +1,240 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex5_masterMultipleSlave.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex5_masterMultipleSlave.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + + + + + + + +

+Variables

uint8_t TXData [] = {0xA1,0xB1,0xC1,0xD1}
 
uint8_t SlaveAddress [] = {0x0A,0x0B,0x0C,0x0D}
 
uint8_t TXByteCtr
 
uint8_t SlaveFlag = 0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 63 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +

References __delay_cycles(), param, SlaveAddress, SlaveFlag, and TXByteCtr.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 157 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +

References __bic_SR_register_on_exit(), SlaveFlag, TXByteCtr, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ SlaveAddress

+ +
+
+ + + + +
uint8_t SlaveAddress[] = {0x0A,0x0B,0x0C,0x0D}
+
+ +

Definition at line 59 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +
+
+ +

◆ SlaveFlag

+ +
+
+ + + + +
uint8_t SlaveFlag = 0
+
+ +

Definition at line 61 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +
+
+ +

◆ TXByteCtr

+ +
+
+ + + + +
uint8_t TXByteCtr
+
+ +

Definition at line 60 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData[] = {0xA1,0xB1,0xC1,0xD1}
+
+ +

Definition at line 58 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.js new file mode 100644 index 0000000..a51def0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.js @@ -0,0 +1,9 @@ +var _m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "SlaveAddress", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#acab914ed25efe33c5ff39bffa442b25f", null ], + [ "SlaveFlag", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#a8400431f2b4b75fc33a2b9d755be8796", null ], + [ "TXByteCtr", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#a442fc7a9731fc8e66469e62429b32219", null ], + [ "TXData", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#adb697e8622bce2ab592d2ee2395bd672", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c_source.html new file mode 100644 index 0000000..70bc830 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c_source.html @@ -0,0 +1,306 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex5_masterMultipleSlave.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex5_masterMultipleSlave.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
35 // MSP430FR57xx Demo - USCI_B0 I2C Master TX bytes to Multiple Slaves
+
36 //
+
37 // Description: This demo connects two MSP430's via the I2C bus.
+
38 // The master transmits to 4 different I2C slave addresses 0x0A,0x0B,0x0C&0x0D.
+
39 // Each slave address has a specific related data in the array TXData[].
+
40 // At the end of four I2C transactions the slave address rolls over and begins
+
41 // again at 0x0A.
+
42 // ACLK = n/a, MCLK = SMCLK = BRCLK = default DCO = ~1.045MHz
+
43 // Use with MSP430FR57xx_uscib0_i2c_MultiSlave.c
+
44 //
+
45 // /|\ /|\
+
46 // MSP430FR5739 10k 10k MSP430FR5739
+
47 // slave | | master
+
48 // ----------------- | | -----------------
+
49 // -|XIN P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA XIN|-
+
50 // | | | | |
+
51 // -|XOUT | | | XOUT|-
+
52 // | P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL |
+
53 // | | | |
+
54 //
+
55 //******************************************************************************
+
56 
+
57 
+
58 uint8_t TXData[]= {0xA1,0xB1,0xC1,0xD1};// Pointer to TX data
+
59 uint8_t SlaveAddress[]= {0x0A,0x0B,0x0C,0x0D};
+
60 uint8_t TXByteCtr;
+
61 uint8_t SlaveFlag = 0;
+
62 
+
63 void main(void)
+
64 {
+
65  WDT_A_hold(WDT_A_BASE);
+
66 
+
67  // Configure MCLK=SMCLK=ACLK=DCOCLK for 1MHz operation
+
68  //Set DCO frequency to 8MHz
+
69  CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_3);
+
70  //Set ACLK = DCO with frequency divider of 8
+
71  CS_initClockSignal(CS_ACLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_8);
+
72  //Set SMCLK = DCO with frequency divider of 8
+
73  CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_8);
+
74  //Set MCLK = DCO with frequency divider of 8
+
75  CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_8);
+
76 
+
77 
+
78  // Configure Pins for I2C
+
79  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
80  /*
+
81 
+
82  * Select Port 1
+
83  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
84  */
+
85  GPIO_setAsPeripheralModuleFunctionInputPin(
+
86  GPIO_PORT_P1,
+
87  GPIO_PIN6 + GPIO_PIN7,
+
88  GPIO_SECONDARY_MODULE_FUNCTION
+
89  );
+
90 
+
91  EUSCI_B_I2C_initMasterParam param = {0};
+
92  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
93  param.i2cClk = CS_getSMCLK();
+
94  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
95  param.byteCounterThreshold = 0;
+
96  param.autoSTOPGeneration = EUSCI_B_I2C_NO_AUTO_STOP;
+
97  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
98 
+
99 
+
100  //Set Master in receive mode
+
101  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
102  EUSCI_B_I2C_TRANSMIT_MODE
+
103  );
+
104  //Enable I2C Module to start operations
+
105  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
106 
+
107  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
108  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
109  EUSCI_B_I2C_NAK_INTERRUPT
+
110  );
+
111 
+
112  //Enable master Receive interrupt
+
113  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
114  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
115  EUSCI_B_I2C_NAK_INTERRUPT
+
116  );
+
117 
+
118  SlaveFlag =0;
+
119  while(1)
+
120  {
+
121  //Specify slave address
+
122  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
124  );
+
125 
+
126 
+
127  TXByteCtr = 1; // Load TX byte counter
+
128 
+
129  while (EUSCI_B_I2C_SENDING_STOP == EUSCI_B_I2C_masterIsStopSent
+
130  (EUSCI_B0_BASE));
+
131 
+
132 
+
133  EUSCI_B_I2C_masterSendStart(EUSCI_B0_BASE);
+
134 
+
135  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
136  // Remain in LPM0 until all data
+
137  // is TX'd
+
138  // Change Slave address
+
139  SlaveFlag++;
+
140  if (SlaveFlag>3) // Roll over slave address
+
141  {
+
142  SlaveFlag =0;
+
143  __delay_cycles(1000); // Delay between transmissions
+
144  }
+
145 
+
146  }
+
147 
+
148 }
+
149 
+
150 
+
151 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
152 #pragma vector=USCI_B0_VECTOR
+
153 __interrupt
+
154 #elif defined(__GNUC__)
+
155 __attribute__((interrupt(USCI_B0_VECTOR)))
+
156 #endif
+
157 void USCIB0_ISR(void)
+
158 {
+
159  switch(__even_in_range(UCB0IV,0x1E))
+
160  {
+
161  case 0x00: break; // Vector 0: No interrupts break;
+
162  case 0x02: break;
+
163  case 0x04:
+
164  EUSCI_B_I2C_masterSendStart(EUSCI_B0_BASE);
+
165  break; // Vector 4: NACKIFG break;
+
166  case 0x06: break; // Vector 6: STTIFG break;
+
167  case 0x08: break; // Vector 8: STPIFG break;
+
168  case 0x0a: break; // Vector 10: RXIFG3 break;
+
169  case 0x0c: break; // Vector 14: TXIFG3 break;
+
170  case 0x0e: break; // Vector 16: RXIFG2 break;
+
171  case 0x10: break; // Vector 18: TXIFG2 break;
+
172  case 0x12: break; // Vector 20: RXIFG1 break;
+
173  case 0x14: break; // Vector 22: TXIFG1 break;
+
174  case 0x16: break; // Vector 24: RXIFG0 break;
+
175  case 0x18:
+
176  if (TXByteCtr) // Check TX byte counter
+
177  {
+
178  EUSCI_B_I2C_masterSendMultiByteNext(EUSCI_B0_BASE,
+
179  TXData[SlaveFlag]);
+
180  TXByteCtr--; // Decrement TX byte counter
+
181  }
+
182  else
+
183  {
+
184  EUSCI_B_I2C_masterSendMultiByteStop(EUSCI_B0_BASE);
+
185  __bic_SR_register_on_exit(CPUOFF);// Exit LPM0
+
186  }
+
187  break; // Vector 26: TXIFG0 break;
+
188  default: break;
+
189  }
+
190 }
+
191 
+ + + + + + +
MPU_initThreeSegmentsParam param
+ +
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html new file mode 100644 index 0000000..8ab8d21 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html @@ -0,0 +1,240 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex5_slaveMultipleSlave.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex5_slaveMultipleSlave.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + + + + + + + +

+Variables

uint8_t RXData0 =0
 
uint8_t RXData1 =0
 
uint8_t RXData2 =0
 
uint8_t RXData3 =0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 59 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +

References __no_operation().

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 135 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +

References RXData0, RXData1, RXData2, and RXData3.

+ +
+
+

Variable Documentation

+ +

◆ RXData0

+ +
+
+ + + + +
uint8_t RXData0 =0
+
+ +

Definition at line 54 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +
+
+ +

◆ RXData1

+ +
+
+ + + + +
uint8_t RXData1 =0
+
+ +

Definition at line 55 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +
+
+ +

◆ RXData2

+ +
+
+ + + + +
uint8_t RXData2 =0
+
+ +

Definition at line 56 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +
+
+ +

◆ RXData3

+ +
+
+ + + + +
uint8_t RXData3 =0
+
+ +

Definition at line 57 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.js new file mode 100644 index 0000000..f72ae55 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.js @@ -0,0 +1,9 @@ +var _m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "RXData0", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#ad8363a0fe210b31eb7174491f478dd02", null ], + [ "RXData1", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#afd0f3a79374491b2736c8448c3b85e3a", null ], + [ "RXData2", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#ad490477b6b68af21a68dcde8035a0f61", null ], + [ "RXData3", "_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#af6a6cccb6c28ae3621d22627201ff981", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c_source.html new file mode 100644 index 0000000..af78a7a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c_source.html @@ -0,0 +1,282 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_i2c/eusci_b_i2c_ex5_slaveMultipleSlave.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex5_slaveMultipleSlave.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 //******************************************************************************
+
34 // MSP430FR57xx Demo - USCI_B0 I2C 4 Hardware I2C slaves
+
35 //
+
36 // Description: This demo connects two MSP430's via the I2C bus.
+
37 // This code configures the MSP430 USCI to be addressed as 4 independent I2C
+
38 // slaves. Each slave has its owm interrupt flag and data variable to store
+
39 // incoming data.
+
40 //
+
41 // Tested on MSP430FR5739, MSP430FR5969
+
42 // /|\ /|\
+
43 // 10k 10k
+
44 // slave | | master
+
45 // ----------------- | | -----------------
+
46 // -|XIN P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA XIN|-
+
47 // | | | | |
+
48 // -|XOUT | | | XOUT|-
+
49 // | P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL |
+
50 // | | | |
+
51 // | | | |
+
52 //
+
53 //******************************************************************************
+
54 uint8_t RXData0=0;
+
55 uint8_t RXData1=0;
+
56 uint8_t RXData2=0;
+
57 uint8_t RXData3=0;
+
58 
+
59 void main(void)
+
60 {
+
61  WDT_A_hold(WDT_A_BASE);
+
62 
+
63  // Configure Pins for I2C
+
64  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
65  /*
+
66 
+
67  * Select Port 1
+
68  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
69  */
+
70  GPIO_setAsPeripheralModuleFunctionInputPin(
+
71  GPIO_PORT_P1,
+
72  GPIO_PIN6 + GPIO_PIN7,
+
73  GPIO_SECONDARY_MODULE_FUNCTION
+
74  );
+
75 
+
76  // eUSCI configuration
+
77  //SLAVE0 own address is 0x0A+ enable
+
78  EUSCI_B_I2C_initSlaveParam initSlave0Param = {0};
+
79  initSlave0Param.slaveAddress = 0x0A;
+
80  initSlave0Param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
81  initSlave0Param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
82  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &initSlave0Param);
+
83 
+
84  //SLAVE1 own address is 0x0B+ enable
+
85  EUSCI_B_I2C_initSlaveParam initSlave1Param = {0};
+
86  initSlave1Param.slaveAddress = 0x0B;
+
87  initSlave1Param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET1;
+
88  initSlave1Param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
89  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &initSlave1Param);
+
90 
+
91  //SLAVE2 own address is 0x0C+ enable
+
92  EUSCI_B_I2C_initSlaveParam initSlave2Param = {0};
+
93  initSlave2Param.slaveAddress = 0x0C;
+
94  initSlave2Param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET2;
+
95  initSlave2Param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
96  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &initSlave2Param);
+
97 
+
98  //SLAVE3 own address is 0x0D+ enable
+
99  EUSCI_B_I2C_initSlaveParam initSlave3Param = {0};
+
100  initSlave3Param.slaveAddress = 0x0D;
+
101  initSlave3Param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET3;
+
102  initSlave3Param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
103  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &initSlave3Param);
+
104 
+
105  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
106 
+
107  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
108  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
109  EUSCI_B_I2C_RECEIVE_INTERRUPT1 +
+
110  EUSCI_B_I2C_RECEIVE_INTERRUPT2 +
+
111  EUSCI_B_I2C_RECEIVE_INTERRUPT3
+
112  );
+
113 
+
114  //receive interrupt enable
+
115  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
116  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
117  EUSCI_B_I2C_RECEIVE_INTERRUPT1 +
+
118  EUSCI_B_I2C_RECEIVE_INTERRUPT2 +
+
119  EUSCI_B_I2C_RECEIVE_INTERRUPT3
+
120  );
+
121 
+
122 
+
123 
+
124  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
125  __no_operation();
+
126 }
+
127 
+
128 
+
129 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
130 #pragma vector=USCI_B0_VECTOR
+
131 __interrupt
+
132 #elif defined(__GNUC__)
+
133 __attribute__((interrupt(USCI_B0_VECTOR)))
+
134 #endif
+
135 void USCIB0_ISR(void)
+
136 {
+
137  switch(__even_in_range(UCB0IV,0x1E))
+
138  {
+
139  case 0x00: break; // Vector 0: No interrupts break;
+
140  case 0x02: break; // Vector 2: ALIFG break;
+
141  case 0x04: break; // Vector 4: NACKIFG break;
+
142  case 0x06: break; // Vector 6: STTIFG break;
+
143  case 0x08: break; // Vector 8: STPIFG break;
+
144  case 0x0a: // SLAVE3
+
145  RXData3 = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
146  break; // Vector 10: RXIFG3 break;
+
147  case 0x0c: break; // Vector 14: TXIFG3 break;
+
148  case 0x0e: // SLAVE2
+
149  RXData2 = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
150  break; // Vector 16: RXIFG2 break;
+
151  case 0x10: break; // Vector 18: TXIFG2 break;
+
152  case 0x12: // SLAVE1
+
153  RXData1 = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
154  break; // Vector 20: RXIFG1 break;
+
155  case 0x14: break; // Vector 22: TXIFG1 break;
+
156  case 0x16: // SLAVE0
+
157  RXData0 = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
158  // Get RX data
+
159  break; // Vector 24: RXIFG0 break;
+
160  case 0x18: break; // Vector 26: TXIFG0 break;
+
161  case 0x1a: break; // Vector 28: BCNTIFG break;
+
162  case 0x1c: break; // Vector 30: clock low timeout break;
+
163  case 0x1e: break; // Vector 32: 9th bit break;
+
164  default: break;
+
165  }
+
166 
+
167 }
+
168 
+
169 
+ + + + + + + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html new file mode 100644 index 0000000..9644764 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html @@ -0,0 +1,217 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_spi/eusci_b_spi_ex1_master.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_spi_ex1_master.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCI_B0_ISR (void)
 
+ + + + + +

+Variables

uint8_t RXData =0
 
uint8_t TXData = 0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 80 of file eusci_b_spi_ex1_master.c.

+ +

References __delay_cycles(), __no_operation(), GPIO_setOutputLowOnPin(), i, param, and TXData.

+ +
+
+ +

◆ USCI_B0_ISR()

+ +
+
+ + + + + + + + +
void USCI_B0_ISR (void )
+
+ +

Definition at line 200 of file eusci_b_spi_ex1_master.c.

+ +

References __delay_cycles(), RXData, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData =0
+
+

USCI_A0, SPI 3-Wire Master Incremented Data This example shows how SPI master talks to SPI slave using 3-wire mode. Incrementing data is sent by the master starting at 0x01. Received data is expected to be same as the previous transmission. eUSCI RX ISR is used to handle communication with the CPU, normally in LPM0. If high, P1.0 indicates valid data reception. Because all execution after LPM0 is in ISRs, initialization waits for DCO to stabilize against ACLK. ACLK = ~32.768kHz, MCLK = SMCLK = DCO ~ 1048kHz. BRCLK = SMCLK/2

+

Use with eusci_spi_ex1_slave code example. If slave is in debug mode, P1.1 slave reset signal conflicts with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.


+

/|\ | | | | | Master—+->|RST | | | | P1.6|-> Data Out (UCB0SIMO) | | | P1.7|<- Data In (UCB0SOMI) | | | P2.2|-> Serial Clock Out (UCB0CLK)

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • SPI peripheral
  • +
  • GPIO Port peripheral (for SPI pins)
  • +
  • UCB0SIMO
  • +
  • UCB0SOMI
  • +
  • UCB0CLK
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_A0_VECTOR
  • +
+ +

Definition at line 77 of file eusci_b_spi_ex1_master.c.

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 78 of file eusci_b_spi_ex1_master.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.js new file mode 100644 index 0000000..c6c01db --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCI_B0_ISR", "_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html#abb8ec2e0335e1b8389161437129cc39a", null ], + [ "RXData", "_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html#a597ef8ed788642728c57f66b3a21544f", null ], + [ "TXData", "_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c_source.html new file mode 100644 index 0000000..4307131 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c_source.html @@ -0,0 +1,300 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_spi/eusci_b_spi_ex1_master.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_spi_ex1_master.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 //*****************************************************************************
+
49 // MSP430FR5739
+
75 //*****************************************************************************
+
76 
+
77 uint8_t RXData =0;
+
78 uint8_t TXData = 0;
+
79 
+
80 void main(void)
+
81 {
+
82  volatile uint16_t i;
+
83 
+
84  //Stop watchdog timer
+
85  WDT_A_hold(WDT_A_BASE);
+
86 
+
87  //Set P1.0 as an output pin.
+
88  /*
+
89 
+
90  * Select Port 1
+
91  * Set Pin 0 as output
+
92  */
+
93  GPIO_setAsOutputPin(
+
94  GPIO_PORT_P1,
+
95  GPIO_PIN0
+
96  );
+
97  //Set P1.0 as Output Low.
+
98  /*
+
99 
+
100  * Select Port 1
+
101  * Set Pin 0 to output Low.
+
102  */
+ +
104  GPIO_PORT_P1,
+
105  GPIO_PIN0
+
106  );
+
107 
+
108  // Configure Pins for LFXIN
+
109  //Set PJ.4 and PJ.5 as Primary Module Function Input.
+
110  /*
+
111 
+
112  * Select Port J
+
113  * Set Pin 4, 5 to input Primary Module Function, (LFXIN).
+
114  */
+
115  GPIO_setAsPeripheralModuleFunctionInputPin(
+
116  GPIO_PORT_PJ,
+
117  GPIO_PIN4 + GPIO_PIN5,
+
118  GPIO_PRIMARY_MODULE_FUNCTION
+
119  );
+
120 
+
121  //Set external frequency for XT1
+
122  CS_setExternalClockSource(32768,0);
+
123  //Set DCO frequency to max DCO setting
+
124  CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_3);
+
125  //Select XT1 as the clock source for ACLK with no frequency divider
+
126  CS_initClockSignal(CS_ACLK,CS_XT1CLK_SELECT,CS_CLOCK_DIVIDER_1);
+
127  //Start XT1 with no time out
+
128  CS_turnOnXT1(CS_XT1_DRIVE_0);
+
129 
+
130  // Configure SPI pins
+
131  /*
+
132 
+
133  * Select Port 2
+
134  * Set Pin 2 to input Secondary Module Function, (UCB0CLK).
+
135  */
+
136  GPIO_setAsPeripheralModuleFunctionInputPin(
+
137  GPIO_PORT_P2,
+
138  GPIO_PIN2,
+
139  GPIO_SECONDARY_MODULE_FUNCTION
+
140  );
+
141  // Configure Pins for UCB0TXD/UCB0SIMO, UCB0RXD/UCB0SOMI
+
142  //Set P2.0, P2.1 as Secondary Module Function Input.
+
143  /*
+
144 
+
145  * Select Port1
+
146  * Set Pin 6,7 to input Secondary Module Function, (UCB0TXD/UCB0SIMO, UCB0RXD/UCB0SOMI).
+
147  */
+
148  GPIO_setAsPeripheralModuleFunctionInputPin(
+
149  GPIO_PORT_P1,
+
150  GPIO_PIN6 + GPIO_PIN7,
+
151  GPIO_SECONDARY_MODULE_FUNCTION
+
152  );
+
153 
+
154  //Initialize Master
+
155  EUSCI_B_SPI_initMasterParam param = {0};
+
156  param.selectClockSource = EUSCI_B_SPI_CLOCKSOURCE_ACLK;
+
157  param.clockSourceFrequency = CS_getACLK();
+
158  param.desiredSpiClock = 500000;
+
159  param.msbFirst = EUSCI_B_SPI_MSB_FIRST;
+
160  param.clockPhase = EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
+
161  param.clockPolarity = EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_HIGH;
+
162  param.spiMode = EUSCI_B_SPI_3PIN;
+
163  EUSCI_B_SPI_initMaster(EUSCI_B0_BASE, &param);
+
164 
+
165 
+
166  //Enable SPI module
+
167  EUSCI_B_SPI_enable(EUSCI_B0_BASE);
+
168 
+
169  EUSCI_B_SPI_clearInterrupt(EUSCI_B0_BASE,
+
170  EUSCI_B_SPI_RECEIVE_INTERRUPT);
+
171  // Enable USCI_B0 RX interrupt
+
172  EUSCI_B_SPI_enableInterrupt(EUSCI_B0_BASE,
+
173  EUSCI_B_SPI_RECEIVE_INTERRUPT);
+
174 
+
175  //Wait for slave to initialize
+
176  __delay_cycles(100);
+
177 
+
178  TXData = 0x1; // Holds TX data
+
179 
+
180  //USCI_B0 TX buffer ready?
+
181  while (!EUSCI_B_SPI_getInterruptStatus(EUSCI_B0_BASE,
+
182  EUSCI_B_SPI_TRANSMIT_INTERRUPT)) ;
+
183 
+
184  //Transmit Data to slave
+
185  EUSCI_B_SPI_transmitData(EUSCI_B0_BASE, TXData);
+
186 
+
187 
+
188  __bis_SR_register(LPM0_bits + GIE); // CPU off, enable interrupts
+
189  __no_operation(); // Remain in LPM0
+
190 
+
191 
+
192 }
+
193 
+
194 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
195 #pragma vector=USCI_B0_VECTOR
+
196 __interrupt
+
197 #elif defined(__GNUC__)
+
198 __attribute__((interrupt(USCI_B0_VECTOR)))
+
199 #endif
+
200 void USCI_B0_ISR (void)
+
201 {
+
202  switch (__even_in_range(UCB0IV,4)){
+
203  //Vector 2 - RXIFG
+
204  case 2:
+
205  //USCI_A0 TX buffer ready?
+
206  while (!EUSCI_B_SPI_getInterruptStatus(EUSCI_B0_BASE,
+
207  EUSCI_B_SPI_TRANSMIT_INTERRUPT)) ;
+
208 
+
209  RXData = EUSCI_B_SPI_receiveData(EUSCI_B0_BASE);
+
210 
+
211  //Increment data
+
212  TXData++;
+
213 
+
214  //Send next value
+
215  EUSCI_B_SPI_transmitData(EUSCI_B0_BASE,
+
216  TXData
+
217  );
+
218 
+
219  //Delay between transmissions for slave to process information
+
220  __delay_cycles(40);
+
221 
+
222  break;
+
223  default: break;
+
224  }
+
225 }
+
uint8_t RXData
+
void main(void)
+
void USCI_B0_ISR(void)
+
uint8_t TXData
+
MPU_initThreeSegmentsParam param
+ + +
__no_operation()
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html new file mode 100644 index 0000000..81ac8d1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html @@ -0,0 +1,219 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_spi/eusci_b_spi_ex1_slave.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_spi_ex1_slave.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCI_B0_ISR (void)
 
+ + + + + +

+Variables

uint8_t transmitData = 0x01
 
uint8_t receiveData = 0x00
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 76 of file eusci_b_spi_ex1_slave.c.

+ +

References param.

+ +
+
+ +

◆ USCI_B0_ISR()

+ +
+
+ + + + + + + + +
void USCI_B0_ISR (void )
+
+ +

Definition at line 153 of file eusci_b_spi_ex1_slave.c.

+ +

References receiveData, and transmitData.

+ +
+
+

Variable Documentation

+ +

◆ receiveData

+ +
+
+ + + + +
uint8_t receiveData = 0x00
+
+ +

Definition at line 74 of file eusci_b_spi_ex1_slave.c.

+ +
+
+ +

◆ transmitData

+ +
+
+ + + + +
uint8_t transmitData = 0x01
+
+

SPI slave talks to SPI master using 3-wire mode. Data is received from master and data from slave is then transmitted back to master. USCI RX ISR is used to handle communication, CPU normally in LPM4. Prior to initial data exchange, master pulses slaves RST for complete reset.

+

Use with eusci_spi_ex1_master code example. If the slave is in debug mode, the reset signal from the master will conflict with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.

+

+Tesed on MSP430FR5969 and MSP430FR5739

+

/|\ | | | | | Master—+->|RST | | | | P1.6|-> Data Out (UCB0SIMO) | | | P1.7|<- Data In (UCB0SOMI) | | | P2.2|<- Serial Clock Out (UCB0CLK)

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • SPI peripheral
  • +
  • GPIO Port peripheral (for SPI pins)
  • +
  • UCB0SIMO
  • +
  • UCB0SOMI
  • +
  • UCB0CLK
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_A0_VECTOR
  • +
+ +

Definition at line 74 of file eusci_b_spi_ex1_slave.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.js new file mode 100644 index 0000000..d844ab4 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCI_B0_ISR", "_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html#abb8ec2e0335e1b8389161437129cc39a", null ], + [ "receiveData", "_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html#a216001f02f93a2c0b512c1b8724bdc60", null ], + [ "transmitData", "_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html#ac23b8f721ac5b7a4315ba2c3409b9e0a", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c_source.html new file mode 100644 index 0000000..12bee48 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c_source.html @@ -0,0 +1,253 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/eusci_b_spi/eusci_b_spi_ex1_slave.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_spi_ex1_slave.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
72 //
+
73 //*****************************************************************************
+
74 uint8_t transmitData = 0x01, receiveData = 0x00;
+
75 
+
76 void main(void)
+
77 {
+
78  //Stop watchdog timer
+
79  WDT_A_hold(WDT_A_BASE);
+
80 
+
81  // Configure Pins for LFXIN
+
82  //Set PJ.4 and PJ.5 as Primary Module Function Input.
+
83  /*
+
84 
+
85  * Select Port J
+
86  * Set Pin 4, 5 to input Primary Module Function, (LFXIN).
+
87  */
+
88  GPIO_setAsPeripheralModuleFunctionInputPin(
+
89  GPIO_PORT_PJ,
+
90  GPIO_PIN4 + GPIO_PIN5,
+
91  GPIO_PRIMARY_MODULE_FUNCTION
+
92  );
+
93 
+
94  // Configure SPI pins
+
95  // Configure Pins for UCB0CLK
+
96  //Set P2.2 as Secondary Module Function Input.
+
97  /*
+
98 
+
99  * Select Port 2
+
100  * Set Pin 2 to input Secondary Module Function, (UCB0CLK).
+
101  */
+
102  GPIO_setAsPeripheralModuleFunctionInputPin(
+
103  GPIO_PORT_P2,
+
104  GPIO_PIN2,
+
105  GPIO_SECONDARY_MODULE_FUNCTION
+
106  );
+
107  // Configure Pins for UCB0TXD/UCB0SIMO, UCB0RXD/UCB0SOMI
+
108  //Set P1.6, P1.7 as Secondary Module Function Input.
+
109  /*
+
110 
+
111  * Select Port 1
+
112  * Set Pin 6, 7 to input Secondary Module Function, (UCB0TXD/UCB0SIMO, UCB0RXD/UCB0SOMI).
+
113  */
+
114  GPIO_setAsPeripheralModuleFunctionInputPin(
+
115  GPIO_PORT_P1,
+
116  GPIO_PIN6 + GPIO_PIN7,
+
117  GPIO_SECONDARY_MODULE_FUNCTION
+
118  );
+
119 
+
120  //Initialize slave to MSB first, inactive high clock polarity and 3 wire SPI
+
121  EUSCI_B_SPI_initSlaveParam param = {0};
+
122  param.msbFirst = EUSCI_B_SPI_MSB_FIRST;
+
123  param.clockPhase = EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
+
124  param.clockPolarity = EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_HIGH;
+
125  param.spiMode = EUSCI_B_SPI_3PIN;
+
126  EUSCI_B_SPI_initSlave(EUSCI_B0_BASE, &param);
+
127 
+
128  //Enable SPI Module
+
129  EUSCI_B_SPI_enable(EUSCI_B0_BASE);
+
130 
+
131  EUSCI_B_SPI_clearInterrupt(EUSCI_B0_BASE,
+
132  EUSCI_B_SPI_RECEIVE_INTERRUPT);
+
133  //Enable Receive interrupt
+
134  EUSCI_B_SPI_enableInterrupt(EUSCI_B0_BASE,
+
135  EUSCI_B_SPI_RECEIVE_INTERRUPT
+
136  );
+
137 
+
138  __bis_SR_register(LPM0_bits + GIE); // Enter LPM0, enable interrupts
+
139 
+
140 }
+
141 
+
142 //******************************************************************************
+
143 //
+
144 //This is the USCI_B0 interrupt vector service routine.
+
145 //
+
146 //******************************************************************************
+
147 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
148 #pragma vector=USCI_B0_VECTOR
+
149 __interrupt
+
150 #elif defined(__GNUC__)
+
151 __attribute__((interrupt(USCI_B0_VECTOR)))
+
152 #endif
+
153 void USCI_B0_ISR (void)
+
154 {
+
155  switch (__even_in_range(UCB0IV,4)){
+
156  //Vector 2 - RXIFG
+
157  case 2:
+
158  //USCI_A0 TX buffer ready?
+
159  while (!EUSCI_B_SPI_getInterruptStatus(EUSCI_B0_BASE,
+
160  EUSCI_B_SPI_TRANSMIT_INTERRUPT
+
161  )) ;
+
162 
+
163  //Transmit data to master
+
164  EUSCI_B_SPI_transmitData(EUSCI_B0_BASE,
+ +
166  );
+
167 
+
168  //Receive data from master
+
169  receiveData = EUSCI_B_SPI_receiveData(EUSCI_B0_BASE);
+
170 
+
171  //Increment data to be transmitted
+
172  transmitData++;
+
173 
+
174  break;
+
175 
+
176  default: break;
+
177  }
+
178 }
+
179 
+
uint8_t receiveData
+
void main(void)
+
void USCI_B0_ISR(void)
+
uint8_t transmitData
+
MPU_initThreeSegmentsParam param
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2framctl_2framctl__ex1__write_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2framctl_2framctl__ex1__write_8c.html new file mode 100644 index 0000000..222296c --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2framctl_2framctl__ex1__write_8c.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/framctl/framctl_ex1_write.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
framctl_ex1_write.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define FRAM_TEST_START   0xCABA
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ FRAM_TEST_START

+ +
+
+ + + + +
#define FRAM_TEST_START   0xCABA
+
+

Long word writes to FRAM

+

Description: Use long word write to write to 512 byte blocks of FRAM. Toggle LEDs after every 100 writes. NOTE: Running this example for extended periods will impact the FRAM endurance. ACLK = VLO, MCLK = SMCLK = 4MHz

+

+Tested On: MSP430FR5739

+ + + + + +
/ |
RST
+

| | | | | P1.0|—> LED | P3.5|-->LED

+ +

Definition at line 54 of file framctl_ex1_write.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 56 of file framctl_ex1_write.c.

+ +

References FRAM_TEST_START.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2framctl_2framctl__ex1__write_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2framctl_2framctl__ex1__write_8c.js new file mode 100644 index 0000000..48a08b9 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2framctl_2framctl__ex1__write_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r57xx_2framctl_2framctl__ex1__write_8c = +[ + [ "FRAM_TEST_START", "_m_s_p430_f_r57xx_2framctl_2framctl__ex1__write_8c.html#a4776f26339da4e54480825286f6a55c2", null ], + [ "main", "_m_s_p430_f_r57xx_2framctl_2framctl__ex1__write_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2framctl_2framctl__ex1__write_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2framctl_2framctl__ex1__write_8c_source.html new file mode 100644 index 0000000..a125c99 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2framctl_2framctl__ex1__write_8c_source.html @@ -0,0 +1,196 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/framctl/framctl_ex1_write.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
framctl_ex1_write.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
51 //******************************************************************************
+
52 #include "driverlib.h"
+
53 
+
54 #define FRAM_TEST_START 0xCABA
+
55 
+
56 void main(void) {
+
57  uint8_t count = 0;
+
58  uint32_t data = 0;
+
59 
+
60  WDT_A_hold(WDT_A_BASE); // Stop WDT
+
61 
+
62  //Set P1.0 as an output pin.
+
63  /*
+
64 
+
65  * Select Port 1
+
66  * Set Pin 0 as output
+
67  */
+
68  GPIO_setAsOutputPin(GPIO_PORT_P1, GPIO_PIN0);
+
69  //Set P3.5 as an output pin.
+
70  /*
+
71 
+
72  * Select Port 3
+
73  * Set Pin 5 as output
+
74  */
+
75  GPIO_setAsOutputPin(GPIO_PORT_P3, GPIO_PIN5);
+
76 
+
77  // Initialize dummy data
+
78  data = 0x11111111;
+
79 
+
80  while (1) {
+
81  data += 0x00010001;
+
82 
+
83  FRAMCtl_memoryFill32(data, (uint32_t *) FRAM_TEST_START,
+
84  128);
+
85  count++;
+
86  if (count > 100) {
+
87  //Toggle P1.0 output pin.
+
88  /*
+
89 
+
90  * Select Port 1
+
91  * Set Pin 0 as output
+
92  */
+
93  GPIO_toggleOutputOnPin(GPIO_PORT_P1, GPIO_PIN0);
+
94  //Toggle P3.5 output pin.
+
95  /*
+
96 
+
97  * Select Port 3
+
98  * Set Pin 5 as output
+
99  */
+
100  GPIO_toggleOutputOnPin(GPIO_PORT_P3, GPIO_PIN5);
+
101 
+
102  count = 0; //Reset counter
+
103  data = 0x11111111;
+
104  }
+
105  }
+
106 }
+
void main(void)
+
#define FRAM_TEST_START
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex1__output_hi_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex1__output_hi_8c.html new file mode 100644 index 0000000..a47166a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex1__output_hi_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/gpio/gpio_ex1_outputHi.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
gpio_ex1_outputHi.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 58 of file gpio_ex1_outputHi.c.

+ +

References __no_operation(), and GPIO_setOutputHighOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex1__output_hi_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex1__output_hi_8c.js new file mode 100644 index 0000000..4e763a2 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex1__output_hi_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2gpio_2gpio__ex1__output_hi_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2gpio_2gpio__ex1__output_hi_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex1__output_hi_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex1__output_hi_8c_source.html new file mode 100644 index 0000000..36f1d1a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex1__output_hi_8c_source.html @@ -0,0 +1,197 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/gpio/gpio_ex1_outputHi.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
gpio_ex1_outputHi.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Write a Word to Port A (Port1+Port2)
+
34 //
+
35 // Writes a Word(FFFFh) to Port A and stays in LPM4
+
36 // ACLK = 32.768kHz, MCLK = SMCLK = default DCO
+
37 //
+
38 // Tested On: MSP430F5529, MSP430FR5739
+
39 // -----------------
+
40 // /|\| |
+
41 // | | |
+
42 // --|RST PA.x|-->HI
+
43 // | |
+
44 // | |
+
45 //
+
46 //
+
47 // This example uses the following peripherals and I/O signals. You must
+
48 // review these and change as needed for your own board:
+
49 // - GPIO Port peripheral
+
50 //
+
51 // This example uses the following interrupt handlers. To use this example
+
52 // in your own application you must add these interrupt handlers to your
+
53 // vector table.
+
54 // - None.
+
55 //******************************************************************************
+
56 #include "driverlib.h"
+
57 
+
58 void main (void)
+
59 {
+
60  //Stop WDT
+
61  WDT_A_hold(WDT_A_BASE);
+
62 
+
63  //PA.x output
+
64  GPIO_setAsOutputPin(
+
65  GPIO_PORT_PA,
+
66  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3 +
+
67  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7 +
+
68  GPIO_PIN8 + GPIO_PIN9 + GPIO_PIN10 + GPIO_PIN11 +
+
69  GPIO_PIN12 + GPIO_PIN13 + GPIO_PIN14 + GPIO_PIN15
+
70  );
+
71 
+
72 
+
73  //Set all PA pins HI
+ +
75 
+
76  GPIO_PORT_PA,
+
77  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3 +
+
78  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7 +
+
79  GPIO_PIN8 + GPIO_PIN9 + GPIO_PIN10 + GPIO_PIN11 +
+
80  GPIO_PIN12 + GPIO_PIN13 + GPIO_PIN14 + GPIO_PIN15
+
81  );
+
82 
+
83  //Enter LPM4 w/interrupts enabled
+
84  __bis_SR_register(LPM4_bits + GIE);
+
85 
+
86  //For debugger
+ +
88 }
+
void main(void)
+ +
__no_operation()
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex2__input_capture_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex2__input_capture_8c.html new file mode 100644 index 0000000..486b3ba --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex2__input_capture_8c.html @@ -0,0 +1,161 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/gpio/gpio_ex2_inputCapture.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
gpio_ex2_inputCapture.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void Port_1 (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 62 of file gpio_ex2_inputCapture.c.

+ +

References __no_operation().

+ +
+
+ +

◆ Port_1()

+ +
+
+ + + + + + + + +
void Port_1 (void )
+
+ +

Definition at line 117 of file gpio_ex2_inputCapture.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex2__input_capture_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex2__input_capture_8c.js new file mode 100644 index 0000000..7e97972 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex2__input_capture_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r57xx_2gpio_2gpio__ex2__input_capture_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2gpio_2gpio__ex2__input_capture_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Port_1", "_m_s_p430_f_r57xx_2gpio_2gpio__ex2__input_capture_8c.html#a3a8f9242a81f4c686517653be5fbf412", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex2__input_capture_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex2__input_capture_8c_source.html new file mode 100644 index 0000000..cdf69d3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex2__input_capture_8c_source.html @@ -0,0 +1,241 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/gpio/gpio_ex2_inputCapture.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
gpio_ex2_inputCapture.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Software Port Interrupt Service on P1.4 from LPM4 with
+
34 // Internal Pull-up Resistance Enabled
+
35 //
+
36 // A hi "TO" low transition on P1.4 will trigger P1_ISR which,
+
37 // toggles P1.0. P1.4 is internally enabled to pull-up. Normal mode is
+
38 // LPM4 ~ 0.1uA. LPM4 current can be measured with the LED removed, all
+
39 // unused Px.x configured as output or inputs pulled high or low.
+
40 // ACLK = n/a, MCLK = SMCLK = default DCO
+
41 //
+
42 // Tested On: MSP430F5529, MSP430FR5739
+
43 // -----------------
+
44 // /|\| XIN|-
+
45 // | | |
+
46 // --|RST XOUT|-
+
47 // /|\ | |
+
48 // --o--|P1.4 P1.0|-->LED
+
49 // \|/
+
50 //
+
51 // This example uses the following peripherals and I/O signals. You must
+
52 // review these and change as needed for your own board:
+
53 // - GPIO Port peripheral
+
54 //
+
55 // This example uses the following interrupt handlers. To use this example
+
56 // in your own application you must add these interrupt handlers to your
+
57 // vector table.
+
58 // - PORT1_VECTOR
+
59 //******************************************************************************
+
60 #include "driverlib.h"
+
61 
+
62 void main (void)
+
63 {
+
64  //Stop watchdog timer
+
65  WDT_A_hold(WDT_A_BASE);
+
66 
+
67  //Set P1.0 to output direction
+
68  GPIO_setAsOutputPin(
+
69  GPIO_PORT_P1,
+
70  GPIO_PIN0
+
71  );
+
72 
+
73  //Enable P1.4 internal resistance as pull-Up resistance
+
74  GPIO_setAsInputPinWithPullUpResistor(
+
75  GPIO_PORT_P1,
+
76  GPIO_PIN4
+
77  );
+
78 
+
79  //P1.4 interrupt enabled
+
80  GPIO_enableInterrupt(
+
81  GPIO_PORT_P1,
+
82  GPIO_PIN4
+
83  );
+
84 
+
85  //P1.4 Hi/Lo edge
+
86  GPIO_selectInterruptEdge(
+
87  GPIO_PORT_P1,
+
88  GPIO_PIN4,
+
89  GPIO_HIGH_TO_LOW_TRANSITION
+
90  );
+
91 
+
92 
+
93  //P1.4 IFG cleared
+
94  GPIO_clearInterrupt(
+
95  GPIO_PORT_P1,
+
96  GPIO_PIN4
+
97  );
+
98 
+
99  //Enter LPM4 w/interrupt
+
100  __bis_SR_register(LPM4_bits + GIE);
+
101 
+
102  //For debugger
+
103  __no_operation();
+
104 }
+
105 
+
106 //******************************************************************************
+
107 //
+
108 //This is the PORT1_VECTOR interrupt vector service routine
+
109 //
+
110 //******************************************************************************
+
111 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
112 #pragma vector=PORT1_VECTOR
+
113 __interrupt
+
114 #elif defined(__GNUC__)
+
115 __attribute__((interrupt(PORT1_VECTOR)))
+
116 #endif
+
117 void Port_1 (void)
+
118 {
+
119  //P1.0 = toggle
+
120  GPIO_toggleOutputOnPin(
+
121  GPIO_PORT_P1,
+
122  GPIO_PIN0
+
123  );
+
124 
+
125 
+
126  //P1.4 IFG cleared
+
127  GPIO_clearInterrupt(
+
128  GPIO_PORT_P1,
+
129  GPIO_PIN4
+
130  );
+
131 }
+
132 
+
void Port_1(void)
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex3__software_poll_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex3__software_poll_8c.html new file mode 100644 index 0000000..00ca0cc --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex3__software_poll_8c.html @@ -0,0 +1,152 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/gpio/gpio_ex3_softwarePoll.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
gpio_ex3_softwarePoll.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

Software Poll P1.4, Set P1.0 if P1.4 = 1

+

Poll P1.4 in a loop, if hi P1.0 is set, if low, P1.0 reset. ACLK = n/a, MCLK = SMCLK = default DCO

   MSP430F5529, MSP430FR5739
+      -----------------
+  /|\|              XIN|-
+   | |                 |
+   --|RST          XOUT|-
+

/|\ | | –o–|P1.4 P1.0|-->LED |/

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None
  • +
+ +

Definition at line 59 of file gpio_ex3_softwarePoll.c.

+ +

References GPIO_setOutputHighOnPin(), and GPIO_setOutputLowOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex3__software_poll_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex3__software_poll_8c.js new file mode 100644 index 0000000..15c13dc --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex3__software_poll_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2gpio_2gpio__ex3__software_poll_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2gpio_2gpio__ex3__software_poll_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex3__software_poll_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex3__software_poll_8c_source.html new file mode 100644 index 0000000..46dd2e0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex3__software_poll_8c_source.html @@ -0,0 +1,183 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/gpio/gpio_ex3_softwarePoll.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
gpio_ex3_softwarePoll.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
56 //******************************************************************************
+
57 #include "driverlib.h"
+
58 
+
59 void main (void)
+
60 {
+
61  //Stop watchdog timer
+
62  WDT_A_hold(WDT_A_BASE);
+
63 
+
64  //Set P1.0 to output direction
+
65  GPIO_setAsOutputPin(
+
66  GPIO_PORT_P1,
+
67  GPIO_PIN0
+
68  );
+
69 
+
70  //Set P1.4 to input direction
+
71  GPIO_setAsInputPin(
+
72  GPIO_PORT_P1,
+
73  GPIO_PIN4
+
74  );
+
75 
+
76  while (1)
+
77  {
+
78  //Test P1.4
+
79  if (GPIO_INPUT_PIN_HIGH == GPIO_getInputPinValue(
+
80  GPIO_PORT_P1,
+
81  GPIO_PIN4
+
82  )){
+
83  //if P1.4 set, set P1.0
+ +
85  GPIO_PORT_P1,
+
86  GPIO_PIN0
+
87  );
+
88  } else {
+
89  //else reset
+ +
91  GPIO_PORT_P1,
+
92  GPIO_PIN0
+
93  );
+
94  }
+
95  }
+
96 }
+
97 
+
void main(void)
+ +
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex4__write_to_port1_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex4__write_to_port1_8c.html new file mode 100644 index 0000000..3a6d285 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex4__write_to_port1_8c.html @@ -0,0 +1,154 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/gpio/gpio_ex4_writeToPort1.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
gpio_ex4_writeToPort1.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

Write a byte to Port 1

+

Description: Writes a byte(0xFF) to Port 1 and stays in LPM4 mode ACLK = n/a, MCLK = SMCLK = default DCO

   MSP430F5529, MSP430FR5739
+      -----------------
+  /|\|                 |
+   | |                 |
+   --|RST              |
+     |             P1.x|-->HI
+     |                 |
+     |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 59 of file gpio_ex4_writeToPort1.c.

+ +

References __no_operation(), and GPIO_setOutputHighOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex4__write_to_port1_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex4__write_to_port1_8c.js new file mode 100644 index 0000000..30f1639 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex4__write_to_port1_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2gpio_2gpio__ex4__write_to_port1_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2gpio_2gpio__ex4__write_to_port1_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex4__write_to_port1_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex4__write_to_port1_8c_source.html new file mode 100644 index 0000000..514808e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2gpio_2gpio__ex4__write_to_port1_8c_source.html @@ -0,0 +1,170 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/gpio/gpio_ex4_writeToPort1.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
gpio_ex4_writeToPort1.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
56 //******************************************************************************
+
57 
+
58 #include "driverlib.h"
+
59 void main (void)
+
60 {
+
61  //Stop watchdog timer
+
62  WDT_A_hold(WDT_A_BASE);
+
63 
+
64  //Set P1.x to output direction
+
65  GPIO_setAsOutputPin(
+
66  GPIO_PORT_P1,
+
67  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3 +
+
68  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7
+
69  );
+
70 
+
71  //Set all P1 pins HI
+ +
73  GPIO_PORT_P1,
+
74  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3 +
+
75  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7
+
76  );
+
77 
+
78  //Enter LPM4 w/interrupt
+
79  __bis_SR_register(LPM4_bits + GIE);
+
80 
+
81  //For debugger
+ +
83 }
+
84 
+
void main(void)
+ +
__no_operation()
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex1__three_seg_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex1__three_seg_8c.html new file mode 100644 index 0000000..12719bb --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex1__three_seg_8c.html @@ -0,0 +1,195 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpu/mpu_ex1_threeSeg.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpu_ex1_threeSeg.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + +

+Variables

uint16_t * ptr = 0
 
uint16_t Data =0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+
+

Variable Documentation

+ +

◆ Data

+ +
+
+ + + + +
uint16_t Data =0
+
+ +

Definition at line 61 of file mpu_ex1_threeSeg.c.

+ +

Referenced by main().

+ +
+
+ +

◆ ptr

+ +
+
+ + + + +
uint16_t* ptr = 0
+
+

MSP430FR57x Demo - MPU Write protection violation - PUC

+

Description: The MPU segment boundaries are defined by: Border 1 = 0xCA00 [segment #: 5] Border 2 = 0xD000 [segment #: 8] Segment 1 = 0xC200 - 0xC9FF Segment 2 = 0xCA00 - 0xCFFF Segment 3 = 0xD000 - 0xFFFF Segment 2 is write protected. Any write to an address in the segment 2 range causes a PUC. The LEDs toggles due to repeated PUCs. A delay is included so the debugger can gain access via JTAG.

+

ACLK = n/a, MCLK = SMCLK = TACLK = default DCO = ~625 KHz

     MSP430FR5739
+   ---------------
+
+ + + + +
/ |
RST
+

| | | P1.0|-->LED | P3.5|-->LED

+ +

Definition at line 60 of file mpu_ex1_threeSeg.c.

+ +

Referenced by main().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex1__three_seg_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex1__three_seg_8c.js new file mode 100644 index 0000000..46519ca --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex1__three_seg_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r57xx_2mpu_2mpu__ex1__three_seg_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpu_2mpu__ex1__three_seg_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Data", "_m_s_p430_f_r57xx_2mpu_2mpu__ex1__three_seg_8c.html#af75ea13d281210e54c4d4c09ea42b1df", null ], + [ "ptr", "_m_s_p430_f_r57xx_2mpu_2mpu__ex1__three_seg_8c.html#a933b1d543427520898d681b8912b529e", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex1__three_seg_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex1__three_seg_8c_source.html new file mode 100644 index 0000000..97ce586 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex1__three_seg_8c_source.html @@ -0,0 +1,231 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpu/mpu_ex1_threeSeg.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpu_ex1_threeSeg.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
56 //******************************************************************************
+
57 
+
58 #include "driverlib.h"
+
59 
+
60 uint16_t *ptr = 0;
+
61 uint16_t Data =0;
+
62 
+
63 void main(void)
+
64 {
+
65  WDT_A_hold(WDT_A_BASE); // Stop WDT
+
66 
+
67  //Set P1.0 as an output pin.
+
68  /*
+
69 
+
70  * Select Port 1
+
71  * Set Pin 0 as output
+
72  */
+
73  GPIO_setAsOutputPin(
+
74  GPIO_PORT_P1,
+
75  GPIO_PIN0);
+
76 
+
77  //Set P3.5 as an output pin.
+
78  /*
+
79 
+
80  * Select Port 3
+
81  * Set Pin 5 as output
+
82  */
+
83 
+
84  GPIO_setAsOutputPin(
+
85  GPIO_PORT_P3,
+
86  GPIO_PIN5
+
87  );
+
88 
+
89  if(MPU_getInterruptStatus(MPU_BASE,MPUSEG2IFG))
+
90  {
+
91  //Toggle P1.0 output pin.
+
92  /*
+
93 
+
94  * Select Port 1
+
95  * Set Pin 0 as output
+
96  */
+
97 
+
98  GPIO_toggleOutputOnPin(
+
99  GPIO_PORT_P1,
+
100  GPIO_PIN0
+
101  );
+
102 
+
103  //Toggle P3.5 output pin.
+
104  /*
+
105 
+
106  * Select Port 3
+
107  * Set Pin 5 as output
+
108  */
+
109 
+
110  GPIO_toggleOutputOnPin(
+
111  GPIO_PORT_P3,
+
112  GPIO_PIN5
+
113  );
+
114  }
+
115 
+
116  __delay_cycles(30000); // Delay to see toggle
+
117 
+
118  MPU_enablePUCOnViolation(MPU_BASE,MPU_SECOND_SEG);
+
119 
+
120  MPU_initThreeSegmentsParam param = {0};
+
121  param.seg1boundary = 0x05;
+
122  param.seg2boundary = 0x08;
+
123  param.seg1accmask = MPU_READ|MPU_WRITE|MPU_EXEC;
+
124  param.seg2accmask = MPU_READ;
+
125  param.seg3accmask = MPU_READ|MPU_WRITE|MPU_EXEC;
+
126  MPU_initThreeSegments(MPU_BASE, &param);
+
127 
+
128  MPU_start(MPU_BASE);
+
129 
+
130  Data = 0x88;
+
131 
+
132  // Cause an MPU violation by writing to segment 2
+
133  ptr = (uint16_t *)0xCC02;
+
134  *ptr = Data;
+
135 
+
136 
+
137  while(1); // Code never gets here
+
138 }
+
139 
+
140 
+
void main(void)
+
uint16_t * ptr
+
uint16_t Data
+
MPU_initThreeSegmentsParam param
+
MPU_start(MPU_BASE)
+
MPU_enablePUCOnViolation(MPU_BASE, MPU_SECOND_SEG)
+
MPU_initThreeSegments(MPU_BASE, &param)
+ +
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c.html new file mode 100644 index 0000000..e419b5a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c.html @@ -0,0 +1,195 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpu/mpu_ex2_twoSeg.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpu_ex2_twoSeg.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + +

+Variables

uint16_t * ptr = 0
 
uint16_t Data =0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 61 of file mpu_ex2_twoSeg.c.

+ +

References __delay_cycles(), Data, MPU_enablePUCOnViolation(), MPU_start(), and ptr.

+ +
+
+

Variable Documentation

+ +

◆ Data

+ +
+
+ + + + +
uint16_t Data =0
+
+ +

Definition at line 59 of file mpu_ex2_twoSeg.c.

+ +

Referenced by main().

+ +
+
+ +

◆ ptr

+ +
+
+ + + + +
uint16_t* ptr = 0
+
+

MSP430FR57x Demo - MPU Write protection violation - PUC

+

Description: The MPU segment boundaries are defined by: Border 1 = 0xD000 [segment #: 8] Segment 1 = 0xC200 - 0xCFFF Segment 2 = 0xD000 - 0xFFFF Segment 2 is write protected. Any write to an address in the segment 2 range causes a PUC. The LEDs toggles due to repeated PUCs. A delay is included so the debugger can gain access via JTAG.

+

ACLK = n/a, MCLK = SMCLK = TACLK = default DCO = ~625 KHz

     MSP430FR5739
+   ---------------
+
+ + + + +
/ |
RST
+

| | | P1.0|-->LED | P3.5|-->LED

+ +

Definition at line 58 of file mpu_ex2_twoSeg.c.

+ +

Referenced by main().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c.js new file mode 100644 index 0000000..eb4fffa --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Data", "_m_s_p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c.html#af75ea13d281210e54c4d4c09ea42b1df", null ], + [ "ptr", "_m_s_p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c.html#a933b1d543427520898d681b8912b529e", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c_source.html new file mode 100644 index 0000000..cc1bcf2 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex2__two_seg_8c_source.html @@ -0,0 +1,223 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpu/mpu_ex2_twoSeg.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpu_ex2_twoSeg.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
54 //******************************************************************************
+
55 
+
56 #include "driverlib.h"
+
57 
+
58 uint16_t *ptr = 0;
+
59 uint16_t Data =0;
+
60 
+
61 void main(void)
+
62 {
+
63  WDT_A_hold(WDT_A_BASE); // Stop WDT
+
64 
+
65  //Set P1.0 as an output pin.
+
66  /*
+
67 
+
68  * Select Port 1
+
69  * Set Pin 0 as output
+
70  */
+
71  GPIO_setAsOutputPin(
+
72  GPIO_PORT_P1,
+
73  GPIO_PIN0);
+
74 
+
75  //Set P3.5 as an output pin.
+
76  /*
+
77 
+
78  * Select Port 3
+
79  * Set Pin 5 as output
+
80  */
+
81 
+
82  GPIO_setAsOutputPin(
+
83  GPIO_PORT_P3,
+
84  GPIO_PIN5
+
85  );
+
86 
+
87  if(MPU_getInterruptStatus(MPU_BASE,MPUSEG2IFG))
+
88  {
+
89  //Toggle P1.0 output pin.
+
90  /*
+
91 
+
92  * Select Port 1
+
93  * Set Pin 0 as output
+
94  */
+
95 
+
96  GPIO_toggleOutputOnPin(
+
97  GPIO_PORT_P1,
+
98  GPIO_PIN0
+
99  );
+
100 
+
101  //Toggle P3.5 output pin.
+
102  /*
+
103 
+
104  * Select Port 3
+
105  * Set Pin 5 as output
+
106  */
+
107 
+
108  GPIO_toggleOutputOnPin(
+
109  GPIO_PORT_P3,
+
110  GPIO_PIN5
+
111  );
+
112  }
+
113 
+
114  __delay_cycles(30000); // Delay to see toggle
+
115 
+
116  MPU_enablePUCOnViolation(MPU_BASE,MPU_SECOND_SEG);
+
117 
+
118  MPU_initTwoSegments(MPU_BASE, 0x08, MPU_READ|MPU_WRITE|MPU_EXEC, MPU_READ);
+
119 
+
120  MPU_start(MPU_BASE);
+
121 
+
122  Data = 0x88;
+
123 
+
124  // Cause an MPU violation by writing to segment 2
+
125  ptr = (uint16_t *)0xD002;
+
126  *ptr = Data;
+
127 
+
128 
+
129  while(1); // Code never gets here
+
130 }
+
131 
+
132 
+
void main(void)
+
uint16_t * ptr
+
uint16_t Data
+
MPU_start(MPU_BASE)
+
MPU_enablePUCOnViolation(MPU_BASE, MPU_SECOND_SEG)
+ +
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.html new file mode 100644 index 0000000..96a8a17 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.html @@ -0,0 +1,367 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpu/mpu_ex3_systemPreInit.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpu_ex3_systemPreInit.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + +

+Functions

 MPU_enablePUCOnViolation (MPU_BASE, MPU_SECOND_SEG)
 
 MPU_initThreeSegments (MPU_BASE, &param)
 
 MPU_start (MPU_BASE)
 
void main (void)
 
+ + + + + + + + + + + + + + + +

+Variables

MPU_initThreeSegmentsParam param = {0}
 
param seg1boundary = 0x05
 
param seg2boundary = 0x08
 
param seg1accmask = MPU_READ|MPU_WRITE|MPU_EXEC
 
param seg2accmask = MPU_READ
 
param seg3accmask = MPU_READ|MPU_WRITE|MPU_EXEC
 
 return
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 88 of file mpu_ex3_systemPreInit.c.

+ +
+
+ +

◆ MPU_enablePUCOnViolation()

+ +
+
+ + + + + + + + + + + + + + + + + + +
MPU_enablePUCOnViolation (MPU_BASE ,
MPU_SECOND_SEG  
)
+
+

MSP430FR57x Demo - MPU Write protection violation - PUC in the device's boot process. The MPU configuration code is put in the _system_pre_init() for CCS and __low_level_init() for IAR.

+

Description: The MPU segment boundaries are defined by: Border 1 = 0xCA00 [segment #: 5] Border 2 = 0xD000 [segment #: 8] Segment 1 = 0xC200 - 0xC9FF Segment 2 = 0xCA00 - 0xCFFF Segment 3 = 0xD000 - 0xFFFF Segment 2 is write protected. Any write to an address in the segment 2 range causes a PUC. The LEDs toggles due to repeated PUCs. A delay is included so the debugger can gain access via JTAG.

+

ACLK = n/a, MCLK = SMCLK = TACLK = default DCO = ~625 KHz

     MSP430FR5739
+   ---------------
+
+ + + + +
/ |
RST
+

| |

+ +

Referenced by main().

+ +
+
+ +

◆ MPU_initThreeSegments()

+ +
+
+ + + + + + + + + + + + + + + + + + +
MPU_initThreeSegments (MPU_BASE ,
param 
)
+
+ +

Referenced by main().

+ +
+
+ +

◆ MPU_start()

+ +
+
+ + + + + + + + +
MPU_start (MPU_BASE )
+
+ +

Referenced by main().

+ +
+
+

Variable Documentation

+ +

◆ param

+ +
+
+ + + + +
MPU_initThreeSegmentsParam param = {0}
+
+ +

Definition at line 75 of file mpu_ex3_systemPreInit.c.

+ +

Referenced by calibrateADC(), HSPLL_routine(), and main().

+ +
+
+ +

◆ return

+ +
+
+ + + + +
return
+
+ +

Definition at line 85 of file mpu_ex3_systemPreInit.c.

+ +
+
+ +

◆ seg1accmask

+ +
+
+ + + + +
param seg1accmask = MPU_READ|MPU_WRITE|MPU_EXEC
+
+ +

Definition at line 78 of file mpu_ex3_systemPreInit.c.

+ +
+
+ +

◆ seg1boundary

+ +
+
+ + + + +
param seg1boundary = 0x05
+
+ +

Definition at line 76 of file mpu_ex3_systemPreInit.c.

+ +
+
+ +

◆ seg2accmask

+ +
+
+ + + + +
param seg2accmask = MPU_READ
+
+ +

Definition at line 79 of file mpu_ex3_systemPreInit.c.

+ +
+
+ +

◆ seg2boundary

+ +
+
+ + + + +
param seg2boundary = 0x08
+
+ +

Definition at line 77 of file mpu_ex3_systemPreInit.c.

+ +
+
+ +

◆ seg3accmask

+ +
+
+ + + + +
param seg3accmask = MPU_READ|MPU_WRITE|MPU_EXEC
+
+ +

Definition at line 80 of file mpu_ex3_systemPreInit.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.js new file mode 100644 index 0000000..c28cf3a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.js @@ -0,0 +1,14 @@ +var _m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "MPU_enablePUCOnViolation", "_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.html#ade70e3002fbd10d68b224546e6ad32f0", null ], + [ "MPU_initThreeSegments", "_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.html#af4173ddf04121ee329891bd4945e33f5", null ], + [ "MPU_start", "_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.html#acf9f489c8a8f5202d6aa7f9e333c258b", null ], + [ "param", "_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.html#a95ea9afb900e6437e2aa85f3578289b7", null ], + [ "return", "_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.html#a9717e7bbecb906637e86cef6da3d83c2", null ], + [ "seg1accmask", "_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.html#a1d86198f633b7a8ce214bc0a3d2de9f4", null ], + [ "seg1boundary", "_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.html#ab6b4d6a5e28b73200b2b7252584274cf", null ], + [ "seg2accmask", "_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.html#a6943c5f21c946a48f6e7dfb0417e7a22", null ], + [ "seg2boundary", "_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.html#a97322c87f0d996839137973d42296083", null ], + [ "seg3accmask", "_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c.html#ab72ed4133b34fab0cf30bb4a35b51309", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c_source.html new file mode 100644 index 0000000..d5aed15 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpu_2mpu__ex3__system_pre_init_8c_source.html @@ -0,0 +1,179 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpu/mpu_ex3_systemPreInit.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpu_ex3_systemPreInit.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
56 //******************************************************************************
+
57 
+
58 #include "driverlib.h"
+
59 
+
60 #if defined(__TI_COMPILER_VERSION__)
+
61 int _system_pre_init(void)
+
62 #elif defined(__IAR_SYSTEMS_ICC__)
+
63 int __low_level_init(void)
+
64 #elif defined(__GNUC__)
+
65 int __attribute__((naked, section(".crt_0000init"), used)) _system_pre_init(void)
+
66 #endif
+
67 {
+
68  // Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  // Enable PUC on violation
+
72  MPU_enablePUCOnViolation(MPU_BASE,MPU_SECOND_SEG);
+
73 
+
74  // Configure MPU
+
75  MPU_initThreeSegmentsParam param = {0};
+
76  param.seg1boundary = 0x05;
+
77  param.seg2boundary = 0x08;
+
78  param.seg1accmask = MPU_READ|MPU_WRITE|MPU_EXEC;
+
79  param.seg2accmask = MPU_READ;
+
80  param.seg3accmask = MPU_READ|MPU_WRITE|MPU_EXEC;
+ +
82 
+
83  MPU_start(MPU_BASE);
+
84 
+
85  return 1;
+
86 }
+
87 
+
88 void main(void)
+
89 {
+
90 
+
91 }
+
void main(void)
+
MPU_initThreeSegmentsParam param
+
MPU_start(MPU_BASE)
+
MPU_enablePUCOnViolation(MPU_BASE, MPU_SECOND_SEG)
+
MPU_initThreeSegments(MPU_BASE, &param)
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html new file mode 100644 index 0000000..f5a8190 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex10_32bitSignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex10_32bitSignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 32x32 Signed Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RES0, RES1, RES2 and RES3.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex10_32bitSignedMultiply.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.js new file mode 100644 index 0000000..8c207f2 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c_source.html new file mode 100644 index 0000000..1fcc56c --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c_source.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex10_32bitSignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex10_32bitSignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop Watchdog Timer
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
69  //signed multiplication
+
70  MPY32_setOperandOne32Bit(
+
71  MPY32_MULTIPLY_SIGNED,
+
72  0x12341234);
+
73 
+
74  //Set 32-bit Operand 2 to begin the multiplication operation
+
75  MPY32_setOperandTwo32Bit(
+
76  0x56785678);
+
77 
+
78  //Wait for the result to become ready
+ + + + + +
84 
+
85  //Enter LPM4
+
86  __bis_SR_register(LPM4_bits);
+
87 
+
88  //BREAKPOINT HERE to verify the correct Result in Registers:
+
89  //Verify if values are RES0=0x0060, RES1=0x06E6, RES2=0x0CAC, RES3=0x0626
+ +
91 }
+
92 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html new file mode 100644 index 0000000..458e3e7 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex11_32bitSignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex11_32bitSignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 32x32 Signed Multiply Accumalate

+

Hardware multiplier is used to multiply-accumalate a set of numbers. The first calculation is automatically initiated after the second operand is loaded. A second multiply-accumulate operation is performed next. Results are stored in RES0, RES1, RES2 and RES3. SUMEXT contains the extended sign of the result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 66 of file mpy32_ex11_32bitSignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.js new file mode 100644 index 0000000..0e22508 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c_source.html new file mode 100644 index 0000000..efbc063 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c_source.html @@ -0,0 +1,181 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex11_32bitSignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex11_32bitSignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
62 //******************************************************************************
+
63 
+
64 #include "driverlib.h"
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop Watchdog Timer
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
72  //unsigned multiplication
+
73  MPY32_setOperandOne32Bit(
+
74  MPY32_MULTIPLY_UNSIGNED,
+
75  0x12341234);
+
76  //Set 32-bit Operand 2 to begin the multiplication operation
+
77  MPY32_setOperandTwo32Bit(
+
78  0x56785678);
+
79 
+
80  //Wait for the result to become ready
+ + + + + +
86 
+
87  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
88  //signed multiplication added to the current result
+
89  MPY32_setOperandOne32Bit(
+
90  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
91  0x12341234);
+
92  //Set 32-bit Operand 2 to begin the multiplication operation
+
93  MPY32_setOperandTwo32Bit(
+
94  0x56785678);
+
95 
+
96  //Enter LPM4
+
97  __bis_SR_register(LPM4_bits);
+
98 
+
99  //BREAKPOINT HERE to verify the correct Result in Registers.
+
100  __no_operation();
+
101 }
+
102 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html new file mode 100644 index 0000000..2f8293b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex12_32bitUnsignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex12_32bitUnsignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 32x32 Unsigned Multiply Accumalate

+

Hardware multiplier is used to multiply-accumalate a set of numbers. The first calculation is automatically initiated after the second operand is loaded. A second multiply-accumulate operation is performed next. Results are stored in RES0, RES1, RES2 and RES3. SUMEXT contains the extended sign of the result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 65 of file mpy32_ex12_32bitUnsignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.js new file mode 100644 index 0000000..7f28507 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c_source.html new file mode 100644 index 0000000..e0d7460 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c_source.html @@ -0,0 +1,180 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex12_32bitUnsignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex12_32bitUnsignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
62 //******************************************************************************
+
63 #include "driverlib.h"
+
64 
+
65 void main (void)
+
66 {
+
67  //Stop Watchdog Timer
+
68  WDT_A_hold(WDT_A_BASE);
+
69 
+
70  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
71  //unsigned multiplication
+
72  MPY32_setOperandOne32Bit(
+
73  MPY32_MULTIPLY_UNSIGNED,
+
74  0x12341234);
+
75  //Set 32-bit Operand 2 to begin the multiplication operation
+
76  MPY32_setOperandTwo32Bit(
+
77  0x56785678);
+
78 
+
79  //Wait for the result to become ready
+ + + + + +
85 
+
86  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
87  //unsigned multiplication added to the current result
+
88  MPY32_setOperandOne32Bit(
+
89  MPY32_MULTIPLYACCUMULATE_UNSIGNED,
+
90  0x12341234);
+
91  //Set 32-bit Operand 2 to begin the multiplication operation
+
92  MPY32_setOperandTwo32Bit(
+
93  0x56785678);
+
94 
+
95  //Enter LPM4
+
96  __bis_SR_register(LPM4_bits);
+
97  //BREAKPOINT HERE to verify the correct Result in Registers.
+
98  //0xC4C19580DCC00C0
+ +
100 }
+
101 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html new file mode 100644 index 0000000..32cfea0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html @@ -0,0 +1,216 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex13_saturationUnderflow.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex13_saturationUnderflow.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + + + +

+Variables

uint32_t Result
 
uint16_t Result_lower16
 
uint16_t Result_upper16
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 69 of file mpy32_ex13_saturationUnderflow.c.

+ +

References __no_operation(), Result, Result_lower16, and Result_upper16.

+ +
+
+

Variable Documentation

+ +

◆ Result

+ +
+
+ + + + +
uint32_t Result
+
+

MPY - Saturation Mpode Underflow Test

+

Description: The example illustrates a special case showing underflow. Underflow occurs when adding 2 negative numbers yields a positive result. By having the saturation mode enabled, the result if rounded off to the highest negative number (0x8000.0000 for 16 bit). Results can be viewed in the debugger window.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 65 of file mpy32_ex13_saturationUnderflow.c.

+ +
+
+ +

◆ Result_lower16

+ +
+
+ + + + +
uint16_t Result_lower16
+
+ +

Definition at line 66 of file mpy32_ex13_saturationUnderflow.c.

+ +
+
+ +

◆ Result_upper16

+ +
+
+ + + + +
uint16_t Result_upper16
+
+ +

Definition at line 67 of file mpy32_ex13_saturationUnderflow.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.js new file mode 100644 index 0000000..4ae7eff --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Result", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html#a393f0b6791aa78cf29746a1877494247", null ], + [ "Result_lower16", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html#a9763beb1d3667cef32e0da3789b01e13", null ], + [ "Result_upper16", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html#afbdc37ba5018f94d28647a31a235b701", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c_source.html new file mode 100644 index 0000000..7f7f0cc --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex13__saturation_underflow_8c_source.html @@ -0,0 +1,204 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex13_saturationUnderflow.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex13_saturationUnderflow.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
62 //******************************************************************************
+
63 #include "driverlib.h"
+
64 
+
65 uint32_t Result;
+
66 uint16_t Result_lower16;
+
67 uint16_t Result_upper16;
+
68 
+
69 void main (void)
+
70 {
+
71  //Stop Watchdog Timer
+
72  WDT_A_hold(WDT_A_BASE);
+
73 
+
74 //------Pre-Multiply to setup RES0 and RES1 ------------------------
+
75 
+
76  MPY32_setOperandOne16Bit(
+
77  MPY32_MULTIPLY_UNSIGNED,
+
78  0x8000);
+
79  MPY32_setOperandTwo8Bit(
+
80  0x1);
+
81 
+
82 //------32-bit Result of a multiply operation in RES0 and RES1------
+
83 //RES1 == 0x0000
+
84 //RES0 == 0x8000
+
85 
+
86  MPY32CTL0 = MPYC; //Explicity Set MPY Carry Bit.
+
87  //Enable Saturation Mode.
+
88  MPY32_enableSaturationMode();
+
89 
+
90  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
91  //signed multiplication added to the current result
+
92  MPY32_setOperandOne16Bit(
+
93  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
94  0x8000);
+
95  //Set 16-bit Operand 2 to begin the multiplication operation
+
96  MPY32_setOperandTwo16Bit(
+
97  0x0005);
+
98 
+
99  //Wait for the result to become ready
+
100  __no_operation();
+
101  __no_operation();
+
102  __no_operation();
+
103  __no_operation();
+
104  __no_operation();
+
105 
+
106  //Read out Result
+
107  Result = MPY32_getResult();
+
108 
+
109  //Result_upper16 == 0x8000
+
110  //Result_lower16 == 0x0000
+
111 
+ +
113  Result_lower16 = (Result >> 16);
+
114 
+
115  //Disable Saturation Mode
+
116  MPY32_disableSaturationMode();
+
117 
+
118  //Enter LPM4
+
119  __bis_SR_register(LPM4_bits);
+
120  __no_operation();
+
121 }
+
122 
+ +
void main(void)
+
uint16_t Result_lower16
+
uint16_t Result_upper16
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html new file mode 100644 index 0000000..963ccae --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html @@ -0,0 +1,216 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex14_saturationOverflow.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex14_saturationOverflow.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + + + +

+Variables

uint32_t Result
 
uint16_t Result_lower16
 
uint16_t Result_upper16
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 70 of file mpy32_ex14_saturationOverflow.c.

+ +

References __no_operation(), Result, Result_lower16, and Result_upper16.

+ +
+
+

Variable Documentation

+ +

◆ Result

+ +
+
+ + + + +
uint32_t Result
+
+

MPY - Saturation Mode Overflow Test

+

The example illustrates a special case showing overflow. The addition result of 2 positive numbers may exceed the highest positive number (0x7FFF FFFF for 32 bit result) due to overflow indicating a negative result. By having the saturation mode enabled, this result can be truncated off to this highest positive number. Results with and without saturation mode are shown.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 66 of file mpy32_ex14_saturationOverflow.c.

+ +
+
+ +

◆ Result_lower16

+ +
+
+ + + + +
uint16_t Result_lower16
+
+ +

Definition at line 67 of file mpy32_ex14_saturationOverflow.c.

+ +
+
+ +

◆ Result_upper16

+ +
+
+ + + + +
uint16_t Result_upper16
+
+ +

Definition at line 68 of file mpy32_ex14_saturationOverflow.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.js new file mode 100644 index 0000000..a2b6ee1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Result", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html#a393f0b6791aa78cf29746a1877494247", null ], + [ "Result_lower16", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html#a9763beb1d3667cef32e0da3789b01e13", null ], + [ "Result_upper16", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html#afbdc37ba5018f94d28647a31a235b701", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c_source.html new file mode 100644 index 0000000..5260ab6 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex14__saturation_overflow_8c_source.html @@ -0,0 +1,210 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex14_saturationOverflow.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex14_saturationOverflow.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
63 //******************************************************************************
+
64 #include "driverlib.h"
+
65 
+
66 uint32_t Result;
+
67 uint16_t Result_lower16;
+
68 uint16_t Result_upper16;
+
69 
+
70 void main (void)
+
71 {
+
72  //Stop Watchdog Timer
+
73  WDT_A_hold(WDT_A_BASE);
+
74 
+
75 //------Pre-Multiply to setup RES0 and RES1 ------------------------
+
76 
+
77  MPY32_setOperandOne16Bit(
+
78  MPY32_MULTIPLY_UNSIGNED,
+
79  0xFFFF);
+
80  MPY32_setOperandTwo16Bit(
+
81  0x8000);
+
82  MPY32_setOperandOne16Bit(
+
83  MPY32_MULTIPLYACCUMULATE_UNSIGNED,
+
84  0x7FFD);
+
85  MPY32_setOperandTwo16Bit(
+
86  0x1);
+
87 
+
88 //------32-bit Result of a multiply operation in RES0 and RES1------
+
89 //RES1 == 0x7FFF
+
90 //RES0 == 0xFFFD
+
91 
+
92  //Enable Saturation Mode
+
93  MPY32_enableSaturationMode();
+
94 
+
95  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
96  //signed multiplication added to the current result
+
97  MPY32_setOperandOne16Bit(
+
98  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
99  0x05);
+
100 
+
101  //Set 16-bit Operand 2 to begin the multiplication operation
+
102  MPY32_setOperandTwo16Bit(
+
103  0x01);
+
104 
+
105  //Wait for the result to become ready
+
106  __no_operation();
+
107  __no_operation();
+
108  __no_operation();
+
109  __no_operation();
+
110  __no_operation();
+
111 
+
112  //Read out Result
+
113  Result = MPY32_getResult();
+
114 
+ +
116  Result_lower16 = (Result >> 16);
+
117 
+
118  //Disable Saturation Mode
+
119  MPY32_disableSaturationMode();
+
120 
+
121  //Enter LPM4
+
122  __bis_SR_register(LPM4_bits);
+
123 
+
124  //BREAKPOINT HERE to verify the correct Results:
+
125  //Result_upper16 == 0x7FFF
+
126  //Result_lower16 == 0xFFFF
+
127  __no_operation();
+
128 }
+
129 
+
uint32_t Result
+
void main(void)
+
uint16_t Result_lower16
+
uint16_t Result_upper16
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html new file mode 100644 index 0000000..2fda043 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html @@ -0,0 +1,198 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex15_fractionMode.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex15_fractionMode.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + +

+Variables

uint32_t Result
 
uint16_t Result_Q15
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file mpy32_ex15_fractionMode.c.

+ +

References __no_operation(), Result, and Result_Q15.

+ +
+
+

Variable Documentation

+ +

◆ Result

+ +
+
+ + + + +
uint32_t Result
+
+

MPY - Fractional mode, Q15 multiplication

+

The example illustrates multiplication of 2 Q15 numbers in fractional mode. The result is a Q15 (15 bit) number stored in the RES1 register. It can be viewed in the debugger window.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex15_fractionMode.c.

+ +
+
+ +

◆ Result_Q15

+ +
+
+ + + + +
uint16_t Result_Q15
+
+ +

Definition at line 64 of file mpy32_ex15_fractionMode.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex15__fraction_mode_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex15__fraction_mode_8c.js new file mode 100644 index 0000000..0573739 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex15__fraction_mode_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r57xx_2mpy32_2mpy32__ex15__fraction_mode_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Result", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html#a393f0b6791aa78cf29746a1877494247", null ], + [ "Result_Q15", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html#a92e9913f091bda690c6dbc95a2319102", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex15__fraction_mode_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex15__fraction_mode_8c_source.html new file mode 100644 index 0000000..d060983 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex15__fraction_mode_8c_source.html @@ -0,0 +1,181 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex15_fractionMode.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex15_fractionMode.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 uint32_t Result;
+
64 uint16_t Result_Q15;
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop Watchdog Timer
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Enable Fraction Mode
+
72  MPY32_enableFractionalMode();
+
73 
+
74  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
75  //signed multiplication
+
76  MPY32_setOperandOne16Bit(
+
77  MPY32_MULTIPLY_SIGNED,
+
78  0x7D70);
+
79  //Set 16-bit Operand 2 to begin the multiplication operation
+
80  MPY32_setOperandTwo16Bit(
+
81  0x1000);
+
82 
+
83  //Read out Result
+
84  Result = MPY32_getResult();
+
85 
+
86  Result_Q15 = (Result >> 16);
+
87  //Q15 result == 0x0FAE
+
88 
+
89  //Disable Fraction Mode
+
90  MPY32_disableFractionalMode();
+
91 
+
92  //Enter LPM4
+
93  __bis_SR_register(LPM4_bits);
+
94 
+
95  //BREAKPOINT HERE to verify the correct Result_Q15
+ +
97 }
+
98 
+
uint32_t Result
+
void main(void)
+
uint16_t Result_Q15
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html new file mode 100644 index 0000000..565ff06 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex1_16bitUnsignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex1_16bitUnsignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 16x16 Unsigned Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RESLO and RESHI.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex1_16bitUnsignedMultiply.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.js new file mode 100644 index 0000000..85b4719 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c_source.html new file mode 100644 index 0000000..2947c81 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c_source.html @@ -0,0 +1,164 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex1_16bitUnsignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex1_16bitUnsignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop Watchdog Timer
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
69  //unsigned multiplication
+
70  MPY32_setOperandOne16Bit(MPY32_MULTIPLY_UNSIGNED,
+
71  0x1234);
+
72 
+
73  //Set Operand 2 to begin the multiplication operation
+
74  MPY32_setOperandTwo16Bit(0x5678);
+
75 
+
76  //Enter LPM4
+
77  __bis_SR_register(LPM4_bits);
+
78 
+
79  //BREAKPOINT HERE to verify the correct Result in Registers:
+
80  //Verify if RESLO == 0x0060 and RESHI == 0x0626
+ +
82 }
+
83 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html new file mode 100644 index 0000000..e225b8b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex2_8bitUnsignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex2_8bitUnsignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 8x8 Unsigned Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RESLO and RESHI.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex2_8bitUnsignedMultiply.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.js new file mode 100644 index 0000000..4efa440 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c_source.html new file mode 100644 index 0000000..22da04a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c_source.html @@ -0,0 +1,164 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex2_8bitUnsignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex2_8bitUnsignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop Watchdog Timer
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
69  //unsigned multiplication
+
70  MPY32_setOperandOne8Bit(
+
71  MPY32_MULTIPLY_UNSIGNED,
+
72  0x12);
+
73  //Set 8- bit Operand 2 to begin the multiplication operation
+
74  MPY32_setOperandTwo8Bit(
+
75  0x56);
+
76 
+
77  //Enter LPM4
+
78  __bis_SR_register(LPM4_bits);
+
79  //BREAKPOINT HERE to verify the correct Result in Registers,
+
80  //RES0=0x060c RES1=0x0000
+ +
82 }
+
83 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html new file mode 100644 index 0000000..76e118a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html @@ -0,0 +1,216 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex3_16bitSignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex3_16bitSignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + + + +

+Variables

int16_t multiplier = 0x1234
 
int16_t operand = -6578
 
int64_t Result
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 68 of file mpy32_ex3_16bitSignedMultiply.c.

+ +

References __no_operation(), multiplier, operand, and Result.

+ +
+
+

Variable Documentation

+ +

◆ multiplier

+ +
+
+ + + + +
int16_t multiplier = 0x1234
+
+

MPY - 16x16 Signed Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RESLO, RESHI and SUMEXT = FFFF if result is negative, SUMEXT = 0 otherwise. Result is also stored as Result variable.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex3_16bitSignedMultiply.c.

+ +
+
+ +

◆ operand

+ +
+
+ + + + +
int16_t operand = -6578
+
+ +

Definition at line 65 of file mpy32_ex3_16bitSignedMultiply.c.

+ +
+
+ +

◆ Result

+ +
+
+ + + + +
int64_t Result
+
+ +

Definition at line 66 of file mpy32_ex3_16bitSignedMultiply.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.js new file mode 100644 index 0000000..3f0612f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "multiplier", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html#a3b6affddfe426e29d8e6f98049e8a9f2", null ], + [ "operand", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html#a917f1d27bc92d7287c57835107470d07", null ], + [ "Result", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html#af5df517f0190d126def9ba83a94ef595", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c_source.html new file mode 100644 index 0000000..040878a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c_source.html @@ -0,0 +1,174 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex3_16bitSignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex3_16bitSignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 int16_t multiplier = 0x1234;
+
65 int16_t operand = -6578;
+
66 int64_t Result;
+
67 
+
68 void main (void)
+
69 {
+
70  //Stop Watchdog Timer
+
71  WDT_A_hold(WDT_A_BASE);
+
72 
+
73  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
74  //signed multiplication
+
75  MPY32_setOperandOne16Bit(
+
76  MPY32_MULTIPLY_SIGNED,
+
77  multiplier);
+
78  //Set 16-bit Operand 2 to begin the multiplication operation
+
79  MPY32_setOperandTwo16Bit(
+
80  operand);
+
81 
+
82  //Read out the result
+
83  Result = MPY32_getResult();
+
84 
+
85  //Enter LPM4
+
86  __bis_SR_register(LPM4_bits);
+
87 
+
88  //BREAKPOINT HERE to verify the correct Result
+ +
90 }
+
91 
+
int16_t multiplier
+
void main(void)
+ + + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html new file mode 100644 index 0000000..7d6a6c6 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex4_8bitSignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex4_8bitSignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 8x8 Signed Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RESLO, RESHI and SUMEXT = FFFF if result is negative, SUMEXT = 0 otherwise.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex4_8bitSignedMultiply.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.js new file mode 100644 index 0000000..4c87010 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c_source.html new file mode 100644 index 0000000..6c6e57e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c_source.html @@ -0,0 +1,170 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex4_8bitSignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex4_8bitSignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  uint8_t value1,value2;
+
67 
+
68  //Stop Watchdog Timer
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Assign operands for signed multiplication
+
72  value1 = 0x04; //value1 == 4
+
73  value2 = 0x84; //value2 == -124
+
74 
+
75  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
76  //signed multiplication
+
77  MPY32_setOperandOne8Bit(
+
78  MPY32_MULTIPLY_SIGNED,
+
79  value1);
+
80 
+
81  //Set 8- bit Operand 2 to begin the multiplication operation
+
82  MPY32_setOperandTwo8Bit(
+
83  value2);
+
84 
+
85  //Enter LPM4
+
86  __bis_SR_register(LPM4_bits);
+
87  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
89 }
+
90 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html new file mode 100644 index 0000000..9f49c86 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex5_16bitUnsignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex5_16bitUnsignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 16x16 Unsigned Multiply Accumulate

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. A second multiply accumulate operation is performed after that. Results are stored in RESLO and RESHI. SUMEXT contains the carry of the result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex5_16bitUnsignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.js new file mode 100644 index 0000000..2803f74 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c_source.html new file mode 100644 index 0000000..861c167 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c_source.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex5_16bitUnsignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex5_16bitUnsignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  //Stop Watchdog Timer
+
67  WDT_A_hold(WDT_A_BASE);
+
68 
+
69  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
70  //unsigned multiplication
+
71  MPY32_setOperandOne16Bit(
+
72  MPY32_MULTIPLY_UNSIGNED,
+
73  0x1234);
+
74  //Set 16-bit Operand 2 to begin the multiplication operation
+
75  MPY32_setOperandTwo16Bit(
+
76  0x5678);
+
77 
+
78  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
79  //unsigned multiplication added to the current result
+
80  MPY32_setOperandOne16Bit(
+
81  MPY32_MULTIPLYACCUMULATE_UNSIGNED,
+
82  0x1234);
+
83  //Set 16-bit Operand 2 to begin the multiplication operation
+
84  MPY32_setOperandTwo16Bit(
+
85  0x5678);
+
86 
+
87  //Enter LPM4
+
88  __bis_SR_register(LPM4_bits);
+
89 
+
90  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
92 }
+
93 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html new file mode 100644 index 0000000..fa6516d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html @@ -0,0 +1,156 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex6_8bitUnsignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex6_8bitUnsignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 8x8 Unsigned Multiply Accumulate

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. A second multiply accumulate operation is performed after that. Results are stored in RESLO and RESHI. SUMEXT contains the carry of the result.

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 62 of file mpy32_ex6_8bitUnsignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.js new file mode 100644 index 0000000..ee59b87 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c_source.html new file mode 100644 index 0000000..2ee1ba4 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c_source.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex6_8bitUnsignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex6_8bitUnsignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
59 //******************************************************************************
+
60 #include "driverlib.h"
+
61 
+
62 void main (void)
+
63 {
+
64  //Stop Watchdog Timer
+
65  WDT_A_hold(WDT_A_BASE);
+
66 
+
67  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
68  //unsigned multiplication
+
69  MPY32_setOperandOne8Bit(
+
70  MPY32_MULTIPLY_UNSIGNED,
+
71  0x12);
+
72  //Set 8- bit Operand 2 to begin the multiplication operation
+
73  MPY32_setOperandTwo8Bit(
+
74  0x56);
+
75 
+
76  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
77  //unsigned multiplication added to the current result
+
78  MPY32_setOperandOne8Bit(
+
79  MPY32_MULTIPLYACCUMULATE_UNSIGNED,
+
80  0x12);
+
81  //Set 8- bit Operand 2 to begin the multiplication operation
+
82  MPY32_setOperandTwo8Bit(
+
83  0x56);
+
84 
+
85  //Enter LPM4
+
86  __bis_SR_register(LPM4_bits);
+
87 
+
88  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
90 }
+
91 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html new file mode 100644 index 0000000..b1c4be0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex7_16bitSignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex7_16bitSignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 16x16 Signed Multiply Accumulate

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. A second multiply-accumulate operation is performed after that. Results are stored in RESLO and RESHI. SUMEXT contains the extended sign of the result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex7_16bitSignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.js new file mode 100644 index 0000000..a7076c7 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c_source.html new file mode 100644 index 0000000..6146139 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c_source.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex7_16bitSignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex7_16bitSignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  //Stop Watchdog Timer
+
67  WDT_A_hold(WDT_A_BASE);
+
68 
+
69  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
70  //unsigned multiplication
+
71  MPY32_setOperandOne16Bit(
+
72  MPY32_MULTIPLY_UNSIGNED,
+
73  0x1234);
+
74  //Set 16-bit Operand 2 to begin the multiplication operation
+
75  MPY32_setOperandTwo16Bit(
+
76  0x5678);
+
77 
+
78  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
79  //signed multiplication added to the current result
+
80  MPY32_setOperandOne16Bit(
+
81  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
82  0x1234);
+
83  //Set 16-bit Operand 2 to begin the multiplication operation
+
84  MPY32_setOperandTwo16Bit(
+
85  0x5678);
+
86 
+
87  //Enter LPM4
+
88  __bis_SR_register(LPM4_bits);
+
89 
+
90  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
92 }
+
93 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html new file mode 100644 index 0000000..0e7265a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex8_8bitSignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex8_8bitSignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 8x8 Signed Multiply Accumulate

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. A second multiply accumulate operation is performed after that. Results are stored in RESLO and RESHI. SUMEXT contains the extended sign of result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex8_8bitSignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.js new file mode 100644 index 0000000..2bf8ba2 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c_source.html new file mode 100644 index 0000000..90205b6 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c_source.html @@ -0,0 +1,180 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex8_8bitSignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex8_8bitSignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  uint8_t value1,value2;
+
67 
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
72  //unsigned multiplication
+
73  MPY32_setOperandOne16Bit(
+
74  MPY32_MULTIPLY_UNSIGNED,
+
75  0x1234);
+
76  //Set 8- bit Operand 2 to begin the multiplication operation
+
77  MPY32_setOperandTwo16Bit(
+
78  0x5678);
+
79 
+
80  //Load Operand Values for Signed MAC
+
81  value1 = 0x12;
+
82  value2 = 0x16;
+
83 
+
84  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
85  //unsigned multiplication added to the current result
+
86  MPY32_setOperandOne8Bit(
+
87  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
88  value1);
+
89 
+
90  //Set 8- bit Operand 2 to begin the multiplication operation
+
91  MPY32_setOperandTwo8Bit(
+
92  value2);
+
93 
+
94  //Enter LPM4
+
95  __bis_SR_register(LPM4_bits);
+
96 
+
97  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
99 }
+
100 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html new file mode 100644 index 0000000..5e25068 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html @@ -0,0 +1,180 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex9_32bitUnsignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex9_32bitUnsignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + +

+Variables

uint64_t Result
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 65 of file mpy32_ex9_32bitUnsignedMultiply.c.

+ +

References __no_operation(), and Result.

+ +
+
+

Variable Documentation

+ +

◆ Result

+ +
+
+ + + + +
uint64_t Result
+
+

MPY - 32x32 Unsigned Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RES0, RES1, RES2 and RES3.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex9_32bitUnsignedMultiply.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.js new file mode 100644 index 0000000..b85c905 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r57xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Result", "_m_s_p430_f_r57xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html#a84a5e5c775453416939a34ab72557bc5", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c_source.html new file mode 100644 index 0000000..86d83ce --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c_source.html @@ -0,0 +1,177 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/mpy32/mpy32_ex9_32bitUnsignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex9_32bitUnsignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 uint64_t Result;
+
64 
+
65 void main (void)
+
66 {
+
67  //Stop Watchdog Timer
+
68  WDT_A_hold(WDT_A_BASE);
+
69 
+
70  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
71  //unsigned multiplication
+
72  MPY32_setOperandOne32Bit(
+
73  MPY32_MULTIPLY_UNSIGNED,
+
74  0x12341234);
+
75  //Set 32-bit Operand 2 to begin the multiplication operation
+
76  MPY32_setOperandTwo32Bit(
+
77  0x56785678);
+
78 
+
79  //Wait for the result to become ready
+ + + + + +
85 
+
86  //Read out Result
+
87  Result = MPY32_getResult();
+
88 
+
89  //Enter LPM4
+
90  __bis_SR_register(LPM4_bits);
+
91 
+
92  //BREAKPOINT HERE to verify the correct Result
+ +
94 }
+
95 
+
void main(void)
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2pmm_2pmm___reset___l_p_mx__5_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2pmm_2pmm___reset___l_p_mx__5_8c.html new file mode 100644 index 0000000..62589e2 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2pmm_2pmm___reset___l_p_mx__5_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/pmm/pmm_Reset_LPMx_5.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
pmm_Reset_LPMx_5.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2pmm_2pmm___reset___l_p_mx__5_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2pmm_2pmm___reset___l_p_mx__5_8c.js new file mode 100644 index 0000000..79c3fe8 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2pmm_2pmm___reset___l_p_mx__5_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2pmm_2pmm___reset___l_p_mx__5_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2pmm_2pmm___reset___l_p_mx__5_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2pmm_2pmm___reset___l_p_mx__5_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2pmm_2pmm___reset___l_p_mx__5_8c_source.html new file mode 100644 index 0000000..b31a4e6 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2pmm_2pmm___reset___l_p_mx__5_8c_source.html @@ -0,0 +1,316 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/pmm/pmm_Reset_LPMx_5.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
pmm_Reset_LPMx_5.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR57xx PMM Test
+
34 // This example shows transitions between a user Reset via the reset button, a
+
35 // software triggered BOR, a previous LPMx.5 state indicator flag, and entrance
+
36 // into LPM4.5. Reading the reset interrupt flag from PMMIFG register is equivalent
+
37 // to reading from reset vector register.
+
38 //
+
39 // Upon device power on you will see the following sequence of LED's
+
40 // X = off
+
41 // O = on
+
42 //
+
43 // _7 = On indicates BOR
+
44 // _6 = On indicates Reset (from user button)
+
45 // _5 = on indicates device was previously in LPMx.5 state before the reset
+
46 // _4 = On indicates device is NOT sleeping. Off means device is in LPM4.5
+
47 //*******************************************************************************
+
48 //
+
49 // 1) Power on device:
+
50 // X7 X6 X5 O4 LED4 is on, device is running and was not in LPM4.5 mode previously.
+
51 //
+
52 // 2) Press User Reset button:
+
53 //
+
54 // X7 O6 X5 O4 Device is running and has reset due to RST pin
+
55 // O7 X6 X5 O4 Device is running and has reset due to a software BOR
+
56 // X7 X6 X5 X4 Device is now in LPM4.5
+
57 //
+
58 // 3) Press User Reset button:
+
59 // X7 X6 O5 O4 Device is running and was previously in LPM4.5
+
60 //
+
61 // 4) Press User Reset button:
+
62 // Device will restart the sequence beginning at step 2).
+
63 //
+
64 //
+
65 //********************************************************************************
+
66 #include "driverlib.h"
+
67 
+
68 void main(void)
+
69 {
+
70  //Stop WDT
+
71  WDT_A_hold(WDT_A_BASE);
+
72  //Unlock the GPIO pins.
+
73  /*
+
74  * Base Address of PMM,
+
75  * By default, the pins are unlocked unless waking
+
76  * up from an LPMx.5 state in which case all GPIO
+
77  * are previously locked.
+
78  *
+
79  */
+
80  PMM_unlockLPM5();
+
81  //Set P3.4, 3.5, 3.6, 3.7 as output pins.
+
82  /*
+
83 
+
84  * Select Port 3
+
85  * Set Pin 4, 5, 6, 7 as output
+
86  */
+
87  GPIO_setAsOutputPin(
+
88  GPIO_PORT_P3,
+
89  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7
+
90  );
+
91  //Set P3.5, 3.6, 3.7 Low.
+
92  /*
+
93 
+
94  * Select Port 3
+
95  * Set Pin 5, 6, 7 as Low
+
96  */
+ +
98  GPIO_PORT_P3,
+
99  GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7
+
100  );
+
101  //Set P3.4 as High.
+
102  /*
+
103 
+
104  * Select Port 3
+
105  * Set Pin 4 as High
+
106  */
+ +
108  GPIO_PORT_P3,
+
109  GPIO_PIN4
+
110  );
+
111 
+
112  //Get Interrupt Status from the PMMIFG register.
+
113  /* Base Address of PMM,
+
114  * mask:
+
115  * PMM_BOR_INTERRUPT
+
116  * PMM_RST_INTERRUPT,
+
117  * PMM_PMMPORIFG,
+
118  * PMM_SVSLIFG,
+
119  * PMM_SVSHIFG
+
120  * PMM_LPM5_INTERRUPT,
+
121  * return STATUS_SUCCESS (0x01) or STATUS_FAIL (0x00)
+
122  */
+
123  if (PMM_getInterruptStatus(PMM_LPM5_INTERRUPT)) // Was this device in LPMx.5 mode before the reset was triggered?
+
124  {
+
125  //Clear Interrupt Flag from the PMMIFG register.
+
126  /* Base Address of Comparator D,
+
127  * mask:
+
128  * PMM_BOR_INTERRUPT
+
129  * PMM_RST_INTERRUPT,
+
130  * PMM_PMMPORIFG,
+
131  * PMM_SVSLIFG,
+
132  * PMM_SVSHIFG
+
133  * PMM_LPM5_INTERRUPT,
+
134  * PMM_ALL
+
135  */
+
136  PMM_clearInterrupt(PMM_LPM5_INTERRUPT); // Clear the LPMx.5 flag
+ +
138  GPIO_PORT_P3,
+
139  GPIO_PIN5
+
140  );
+
141  }
+
142 
+
143  if (PMM_getInterruptStatus(PMM_RST_INTERRUPT)) // Was this reset triggered by the Reset flag?
+
144  {
+
145  PMM_clearInterrupt(PMM_RST_INTERRUPT); // Clear reset flag
+ +
147  GPIO_PORT_P3,
+
148  GPIO_PIN6
+
149  );
+
150  __delay_cycles(1000000); // to include a visual delay.
+
151 
+
152  //Trigger a software Brown Out Reset (BOR)
+
153  /*
+
154  * Base Address of PMM,
+
155  * Forces the devices to perform a BOR.
+
156  */
+
157  PMM_trigBOR(); // Software trigger a BOR.
+
158  }
+
159 
+
160  if (PMM_getInterruptStatus(PMM_BOR_INTERRUPT)) // Was this reset triggered by the BOR flag?
+
161  {
+
162  PMM_clearInterrupt(PMM_BOR_INTERRUPT); // Clear BOR flag
+ +
164  GPIO_PORT_P3,
+
165  GPIO_PIN7
+
166  );
+
167 
+
168  __delay_cycles(1000000); // to include a visual delay.
+ +
170  GPIO_PORT_P3,
+
171  GPIO_PIN4 + GPIO_PIN7
+
172  );
+
173 
+
174  //Disable SVSH
+
175  /*
+
176  * Base Address of PMM,
+
177  * High-side SVS (SVSH) is disabled in LPM4.5. SVSH is
+
178  * always enabled in active mode and LPM0/1/2/3/4 and LPM3.5.
+
179  */
+
180  PMM_disableSVSH();
+
181  //Disable SVSL
+
182  /*
+
183  * Base Address of PMM,
+
184  * Low-side SVS (SVSL) is disabled in low power modes.
+
185  * SVSL is always enabled in active mode and LPM0.
+
186  */
+
187  PMM_disableSVSL();
+
188  //Disable Regulator
+
189  /*
+
190  * Base Address of PMM,
+
191  * Regulator is turned off when going to LPM3/4.
+
192  * System enters LPM3.5 or LPM4.5, respectively.
+
193  */
+
194  PMM_turnOffRegulator();
+
195  __bis_SR_register(LPM4_bits); // Enter LPM4.5, This automatically locks
+
196  //(if not locked already) all GPIO pins.
+
197  // and will set the LPM5 flag and set the LOCKLPM5 bit
+
198  // in the PM5CTL0 register upon wake up.
+
199  }
+
200 
+
201  while (1)
+
202  {
+
203  __no_operation(); // Don't sleep
+
204  }
+
205 }
+
void main(void)
+ +
__no_operation()
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2rtc__b_2rtc__b__ex1__calendermode_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2rtc__b_2rtc__b__ex1__calendermode_8c.html new file mode 100644 index 0000000..dc9bfda --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2rtc__b_2rtc__b__ex1__calendermode_8c.html @@ -0,0 +1,201 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/rtc_b/rtc_b_ex1_calendermode.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
rtc_b_ex1_calendermode.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void RTC_B_ISR (void)
 
+ + + +

+Variables

volatile Calendar newTime
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 70 of file rtc_b_ex1_calendermode.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ RTC_B_ISR()

+ +
+
+ + + + + + + + +
void RTC_B_ISR (void )
+
+ +

Definition at line 152 of file rtc_b_ex1_calendermode.c.

+ +

References __no_operation(), and newTime.

+ +
+
+

Variable Documentation

+ +

◆ newTime

+ +
+
+ + + + +
volatile Calendar newTime
+
+

RTC_B in Calendar mode, Interruptions every 1s, 1m, and 5th day of week at 5:00pm

+

This program demonstrates the RTC mode by triggering an interrupt every second and minute. This code toggles P1.0 every second. This code recommends an external LFXT1 crystal for RTC accuracy. Note that if XT1 is not present the code loops in an infinite loop. ACLK = LFXT1 = 32768Hz, MCLK = SMCLK = default DCO = 32 x ACLK = 1048576Hz

+

+Tested on: MSP430FR5739

+

/|\ | XIN|- | | | 32kHz —|RST XOUT|- | | | P1.0 |--> Toggles every second | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • RTC peripheral
  • +
  • UCS peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • RTC_B_VECTOR
  • +
+ +

Definition at line 68 of file rtc_b_ex1_calendermode.c.

+ +

Referenced by RTC_B_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2rtc__b_2rtc__b__ex1__calendermode_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2rtc__b_2rtc__b__ex1__calendermode_8c.js new file mode 100644 index 0000000..df69c6a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2rtc__b_2rtc__b__ex1__calendermode_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r57xx_2rtc__b_2rtc__b__ex1__calendermode_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2rtc__b_2rtc__b__ex1__calendermode_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "RTC_B_ISR", "_m_s_p430_f_r57xx_2rtc__b_2rtc__b__ex1__calendermode_8c.html#a775f6c4e108b72493d5ed4e2e821a4fa", null ], + [ "newTime", "_m_s_p430_f_r57xx_2rtc__b_2rtc__b__ex1__calendermode_8c.html#ac6f7bbb5bb5d80ecf8c2eb3916ee8187", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2rtc__b_2rtc__b__ex1__calendermode_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2rtc__b_2rtc__b__ex1__calendermode_8c_source.html new file mode 100644 index 0000000..347e16f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2rtc__b_2rtc__b__ex1__calendermode_8c_source.html @@ -0,0 +1,261 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/rtc_b/rtc_b_ex1_calendermode.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
rtc_b_ex1_calendermode.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
64 //******************************************************************************
+
65 
+
66 #include "driverlib.h"
+
67 
+
68 volatile Calendar newTime;
+
69 
+
70 void main (void)
+
71 {
+
72  Calendar currentTime;
+
73 
+
74  WDT_A_hold(WDT_A_BASE);
+
75 
+
76  //Set P1.0 to output direction
+
77  GPIO_setAsOutputPin(
+
78  GPIO_PORT_P1,
+
79  GPIO_PIN0
+
80  );
+
81 
+
82  /*
+
83  * Select Port J
+
84  * Set Pin 4, 5 to input Primary Module Function, LFXT.
+
85  */
+
86  GPIO_setAsPeripheralModuleFunctionInputPin(
+
87  GPIO_PORT_PJ,
+
88  GPIO_PIN4 + GPIO_PIN5,
+
89  GPIO_PRIMARY_MODULE_FUNCTION
+
90  );
+
91 
+
92 
+
93  //Initialize XT1
+
94  CS_turnOnXT1(CS_XT1_DRIVE_0);
+
95 
+
96  //Setup Current Time for Calendar
+
97  currentTime.Seconds = 0x00;
+
98  currentTime.Minutes = 0x26;
+
99  currentTime.Hours = 0x13;
+
100  currentTime.DayOfWeek = 0x03;
+
101  currentTime.DayOfMonth = 0x20;
+
102  currentTime.Month = 0x07;
+
103  currentTime.Year = 0x2011;
+
104 
+
105  //Initialize Calendar Mode of RTC
+
106  /*
+
107  * Base Address of the RTC_B
+
108  * Pass in current time, intialized above
+
109  * Use BCD as Calendar Register Format
+
110  */
+
111  RTC_B_initCalendar(RTC_B_BASE,
+
112  &currentTime,
+
113  RTC_B_FORMAT_BCD);
+
114 
+
115  //Setup Calendar Alarm for 5:00pm on the 5th day of the week.
+
116  //Note: Does not specify day of the week.
+
117  RTC_B_configureCalendarAlarmParam param = {0};
+
118  param.minutesAlarm = 0x00;
+
119  param.hoursAlarm = 0x17;
+
120  param.dayOfWeekAlarm = RTC_B_ALARMCONDITION_OFF;
+
121  param.dayOfMonthAlarm = 0x05;
+
122  RTC_B_configureCalendarAlarm(RTC_B_BASE, &param);
+
123 
+
124  //Specify an interrupt to assert every minute
+
125  RTC_B_setCalendarEvent(RTC_B_BASE,
+
126  RTC_B_CALENDAREVENT_MINUTECHANGE);
+
127 
+
128  //Enable interrupt for RTC Ready Status, which asserts when the RTC
+
129  //Calendar registers are ready to read.
+
130  //Also, enable interrupts for the Calendar alarm and Calendar event.
+
131 
+
132  RTC_B_clearInterrupt(RTC_B_BASE,
+
133  RTCRDYIE + RTCTEVIE + RTCAIE);
+
134 
+
135  RTC_B_enableInterrupt(RTC_B_BASE,
+
136  RTCRDYIE + RTCTEVIE + RTCAIE);
+
137 
+
138  //Start RTC Clock
+
139  RTC_B_startClock(RTC_B_BASE);
+
140 
+
141  //Enter LPM3 mode with interrupts enabled
+
142  __bis_SR_register(LPM0_bits + GIE);
+
143  __no_operation();
+
144 }
+
145 
+
146 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
147 #pragma vector=RTC_VECTOR
+
148 __interrupt
+
149 #elif defined(__GNUC__)
+
150 __attribute__((interrupt(RTC_VECTOR)))
+
151 #endif
+
152 void RTC_B_ISR (void)
+
153 {
+
154  switch (__even_in_range(RTCIV,16)){
+
155  case 0: break; //No interrupts
+
156  case 2: //RTCRDYIFG
+
157  //Toggle P1.0 every second
+
158  GPIO_toggleOutputOnPin(
+
159  GPIO_PORT_P1,
+
160  GPIO_PIN0);
+
161  break;
+
162  case 4: //RTCEVIFG
+
163  //Interrupts every minute
+
164  __no_operation();
+
165 
+
166  //Read out New Time a Minute Later BREAKPOINT HERE
+
167  newTime = RTC_B_getCalendarTime(RTC_B_BASE);
+
168  break;
+
169  case 6: //RTCAIFG
+
170  //Interrupts 5:00pm on 5th day of week
+
171  __no_operation();
+
172  break;
+
173  case 8: break; //RT0PSIFG
+
174  case 10: break; //RT1PSIFG
+
175  case 12: break; //Reserved
+
176  case 14: break; //Reserved
+
177  case 16: break; //Reserved
+
178  default: break;
+
179  }
+
180 }
+
181 
+
MPU_initThreeSegmentsParam param
+
void main(void)
+
void RTC_B_ISR(void)
+
volatile Calendar newTime
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex1__pwm_single_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex1__pwm_single_8c.html new file mode 100644 index 0000000..a1b460d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex1__pwm_single_8c.html @@ -0,0 +1,198 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_a/timer_a_ex1_pwmSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex1_pwmSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define TIMER_A_PERIOD   524
 
#define DUTY_CYCLE   393
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE

+ +
+
+ + + + +
#define DUTY_CYCLE   393
+
+ +

Definition at line 63 of file timer_a_ex1_pwmSingle.c.

+ +
+
+ +

◆ TIMER_A_PERIOD

+ +
+
+ + + + +
#define TIMER_A_PERIOD   524
+
+

Timer_A3, PWM TA1.2, Up Mode, DCO SMCLK

+

Description: This program generates PWM outputs on P2.2 using Timer1_A configured for up mode. The value , TIMER_PERIOD, defines the PWM period and the value DUTY_CYCLE the PWM duty cycle. Using ~1.045MHz SMCLK as TACLK, the timer period is ~500us with a 75% duty cycle on P2.2 ACLK = n/a, SMCLK = MCLK = TACLK = default DCO ~1.045MHz.

+

+Tested On: MSP430FR5739

+ + + + + +
/ |
RST
+

| | | P1.2/TA1.1|--> CCR1 - 75% PWM | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 62 of file timer_a_ex1_pwmSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file timer_a_ex1_pwmSingle.c.

+ +

References __no_operation(), DUTY_CYCLE, param, and TIMER_A_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex1__pwm_single_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex1__pwm_single_8c.js new file mode 100644 index 0000000..5ae4a79 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex1__pwm_single_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r57xx_2timer__a_2timer__a__ex1__pwm_single_8c = +[ + [ "DUTY_CYCLE", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex1__pwm_single_8c.html#a940d0fcbbee0921e43201c554231947c", null ], + [ "TIMER_A_PERIOD", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex1__pwm_single_8c.html#ae899bfdc491d37c006b4c301d9f8e147", null ], + [ "main", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex1__pwm_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex1__pwm_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex1__pwm_single_8c_source.html new file mode 100644 index 0000000..d8a5c83 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex1__pwm_single_8c_source.html @@ -0,0 +1,179 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_a/timer_a_ex1_pwmSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex1_pwmSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*******************************************************************************
+
59 //******************************************************************************
+
60 #include "driverlib.h"
+
61 
+
62 #define TIMER_A_PERIOD 524
+
63 #define DUTY_CYCLE 393
+
64 
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //P1.2 as PWM output
+
72  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
73  GPIO_PORT_P1,
+
74  GPIO_PIN2,
+
75  GPIO_PRIMARY_MODULE_FUNCTION
+
76  );
+
77 
+
78  //Generate PWM - Timer runs in Up-Down mode
+
79  Timer_A_outputPWMParam param = {0};
+
80  param.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
81  param.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
82  param.timerPeriod = TIMER_A_PERIOD;
+
83  param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
+
84  param.compareOutputMode = TIMER_A_OUTPUTMODE_RESET_SET;
+
85  param.dutyCycle = DUTY_CYCLE;
+
86  Timer_A_outputPWM(TIMER_A1_BASE, &param);
+
87 
+
88  //Enter LPM0
+
89  __bis_SR_register(LPM0_bits);
+
90 
+
91  //For debugger
+ +
93 }
+
94 
+
void main(void)
+
MPU_initThreeSegmentsParam param
+
#define DUTY_CYCLE
+
#define TIMER_A_PERIOD
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html new file mode 100644 index 0000000..771e7f6 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html @@ -0,0 +1,204 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_a/timer_a_ex2_continousModeOperationWithCCR0Interrupt.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex2_continousModeOperationWithCCR0Interrupt.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define COMPARE_VALUE   50000
 
+ + + + + +

+Functions

void main (void)
 
void TIMER1_A0_ISR (void)
 
+

Macro Definition Documentation

+ +

◆ COMPARE_VALUE

+ +
+
+ + + + +
#define COMPARE_VALUE   50000
+
+

TIMER_A, Toggle P1.0, CCR0 Cont. Mode ISR, DCO SMCLK

+

Toggle P1.0 using software and TA_0 ISR. Toggles every 50000 SMCLK cycles. SMCLK provides clock source for TACLK. During the TA_0 ISR, P1.0 is toggled and 50000 clock cycles are added to CCR0. TA_0 ISR is triggered every 50000 cycles. CPU is normally off and used only during TA_ISR. ACLK = n/a, MCLK = SMCLK = TACLK = default DCO ~1.045MHz

+

+Tested On: MSP430F5529,MSP430FR5739

+ + + + + +
/ |
RST
+

| | | P1.0|-->LED

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • TimerA peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • Timer A0
  • +
+ +

Definition at line 64 of file timer_a_ex2_continousModeOperationWithCCR0Interrupt.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file timer_a_ex2_continousModeOperationWithCCR0Interrupt.c.

+ +

References __no_operation(), and COMPARE_VALUE.

+ +
+
+ +

◆ TIMER1_A0_ISR()

+ +
+
+ + + + + + + + +
void TIMER1_A0_ISR (void )
+
+ +

Definition at line 120 of file timer_a_ex2_continousModeOperationWithCCR0Interrupt.c.

+ +

References COMPARE_VALUE.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.js new file mode 100644 index 0000000..88b9345 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r57xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c = +[ + [ "COMPARE_VALUE", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html#a655c866eb3f7ee47831709b091612e63", null ], + [ "main", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMER1_A0_ISR", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html#a7041a18d2acb50837a4cbfb1bd386bd7", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c_source.html new file mode 100644 index 0000000..4eea528 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c_source.html @@ -0,0 +1,221 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_a/timer_a_ex2_continousModeOperationWithCCR0Interrupt.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex2_continousModeOperationWithCCR0Interrupt.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //
+
61 //*****************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 #define COMPARE_VALUE 50000
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Set P1.0 to output direction
+
72  GPIO_setAsOutputPin(
+
73  GPIO_PORT_P1,
+
74  GPIO_PIN0
+
75  );
+
76 
+
77  //Start timer in continuous mode sourced by SMCLK
+
78  Timer_A_initContinuousModeParam initContParam = {0};
+
79  initContParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
80  initContParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
81  initContParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
82  initContParam.timerClear = TIMER_A_DO_CLEAR;
+
83  initContParam.startTimer = false;
+
84  Timer_A_initContinuousMode(TIMER_A1_BASE, &initContParam);
+
85 
+
86  //Initiaze compare mode
+
87  Timer_A_clearCaptureCompareInterrupt(TIMER_A1_BASE,
+
88  TIMER_A_CAPTURECOMPARE_REGISTER_0
+
89  );
+
90 
+
91  Timer_A_initCompareModeParam initCompParam = {0};
+
92  initCompParam.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_0;
+
93  initCompParam.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_ENABLE;
+
94  initCompParam.compareOutputMode = TIMER_A_OUTPUTMODE_OUTBITVALUE;
+
95  initCompParam.compareValue = COMPARE_VALUE;
+
96  Timer_A_initCompareMode(TIMER_A1_BASE, &initCompParam);
+
97 
+
98  Timer_A_startCounter( TIMER_A1_BASE,
+
99  TIMER_A_CONTINUOUS_MODE
+
100  );
+
101 
+
102  //Enter LPM0, enable interrupts
+
103  __bis_SR_register(LPM0_bits + GIE);
+
104 
+
105  //For debugger
+
106  __no_operation();
+
107 }
+
108 
+
109 //******************************************************************************
+
110 //
+
111 //This is the TIMER1_A3 interrupt vector service routine.
+
112 //
+
113 //******************************************************************************
+
114 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
115 #pragma vector=TIMER1_A0_VECTOR
+
116 __interrupt
+
117 #elif defined(__GNUC__)
+
118 __attribute__((interrupt(TIMER1_A0_VECTOR)))
+
119 #endif
+
120 void TIMER1_A0_ISR (void)
+
121 {
+
122  uint16_t compVal = Timer_A_getCaptureCompareCount(TIMER_A1_BASE,
+
123  TIMER_A_CAPTURECOMPARE_REGISTER_0)
+
124  + COMPARE_VALUE;
+
125 
+
126  //Toggle P1.0
+
127  GPIO_toggleOutputOnPin(
+
128  GPIO_PORT_P1,
+
129  GPIO_PIN0
+
130  );
+
131 
+
132  //Add Offset to CCR0
+
133  Timer_A_setCompareValue(TIMER_A1_BASE,
+
134  TIMER_A_CAPTURECOMPARE_REGISTER_0,
+
135  compVal
+
136  );
+
137 }
+
138 
+ + + + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html new file mode 100644 index 0000000..e650544 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html @@ -0,0 +1,179 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_a/timer_a_ex3_continousModeOperationWithTAIEInterrupt.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex3_continousModeOperationWithTAIEInterrupt.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void TIMER1_A1_ISR (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

TIMER_A, Toggle P1.0, Overflow ISR, 32kHz ACLK

+

Description: Toggle P1.0 using software and the TIMER_A overflow ISR. In this example an ISR triggers when TB overflows. Inside the ISR P1.0 is toggled. Toggle rate is exactly 0.25Hz = [32kHz/FFFFh]/2. Proper use of the TAIV interrupt vector generator is demonstrated. ACLK = TBCLK = 32kHz, MCLK = SMCLK = default DCO ~ 1.045MHz

+

+Tested On: MSP430F5529,MSP430FR5739

+ + + + + +
/ |
RST
+

| | | P1.0|-->LED

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • TIMER_A7
  • +
+ +

Definition at line 64 of file timer_a_ex3_continousModeOperationWithTAIEInterrupt.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ TIMER1_A1_ISR()

+ +
+
+ + + + + + + + +
void TIMER1_A1_ISR (void )
+
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.js new file mode 100644 index 0000000..37655fd --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r57xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMER1_A1_ISR", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html#a75b17bc1a2d3b4b8e3b7fff08b7651a8", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c_source.html new file mode 100644 index 0000000..ef6c938 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c_source.html @@ -0,0 +1,210 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_a/timer_a_ex3_continousModeOperationWithTAIEInterrupt.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex3_continousModeOperationWithTAIEInterrupt.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
59 //
+
60 //*****************************************************************************
+
61 
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  //Stop WDT
+
67  WDT_A_hold(WDT_A_BASE);
+
68 
+
69  //Set P1.0 to output direction
+
70  GPIO_setAsOutputPin(
+
71  GPIO_PORT_P1,
+
72  GPIO_PIN0
+
73  );
+
74 
+
75  //Start timer in continuous mode sourced by ACLK
+
76  Timer_A_clearTimerInterrupt(TIMER_A1_BASE);
+
77 
+
78  Timer_A_initContinuousModeParam param = {0};
+
79  param.clockSource = TIMER_A_CLOCKSOURCE_ACLK;
+
80  param.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
81  param.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_ENABLE;
+
82  param.timerClear = TIMER_A_DO_CLEAR;
+
83  param.startTimer = true;
+
84  Timer_A_initContinuousMode(TIMER_A1_BASE, &param);
+
85 
+
86  //Enter LPM0, enable interrupts
+
87  __bis_SR_register(LPM0_bits + GIE);
+
88 
+
89  //For debugger
+ +
91 }
+
92 
+
93 //******************************************************************************
+
94 //
+
95 //This is the TIMER1_A3 interrupt vector service routine.
+
96 //
+
97 //******************************************************************************
+
98 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
99 #pragma vector=TIMER1_A1_VECTOR
+
100 __interrupt
+
101 #elif defined(__GNUC__)
+
102 __attribute__((interrupt(TIMER1_A1_VECTOR)))
+
103 #endif
+
104 void TIMER1_A1_ISR (void)
+
105 {
+
106  //Any access, read or write, of the TAIV register automatically resets the
+
107  //highest "pending" interrupt flag
+
108  switch ( __even_in_range(TA1IV,14) ){
+
109  case 0: break; //No interrupt
+
110  case 2: break; //CCR1 not used
+
111  case 4: break; //CCR2 not used
+
112  case 6: break; //CCR3 not used
+
113  case 8: break; //CCR4 not used
+
114  case 10: break; //CCR5 not used
+
115  case 12: break; //CCR6 not used
+
116  case 14:
+
117  //Toggle P1.0 // overflow
+
118  GPIO_toggleOutputOnPin(
+
119  GPIO_PORT_P1,
+
120  GPIO_PIN0
+
121  );
+
122  break;
+
123  default: break;
+
124  }
+
125 }
+
126 
+ + +
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html new file mode 100644 index 0000000..8315056 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html @@ -0,0 +1,216 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_a/timer_a_ex4_pwmMultipleUpDown.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex4_pwmMultipleUpDown.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Macros

#define TIMER_PERIOD   127
 
#define DUTY_CYCLE1   32
 
#define DUTY_CYCLE2   96
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE1

+ +
+
+ + + + +
#define DUTY_CYCLE1   32
+
+ +

Definition at line 66 of file timer_a_ex4_pwmMultipleUpDown.c.

+ +
+
+ +

◆ DUTY_CYCLE2

+ +
+
+ + + + +
#define DUTY_CYCLE2   96
+
+ +

Definition at line 67 of file timer_a_ex4_pwmMultipleUpDown.c.

+ +
+
+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   127
+
+

Timer_A3, PWM TA1.1-2, Up/Down Mode, DCO SMCLK

+

Description: This program generates two PWM outputs on P2.2,3 using Timer1_A configured for up/down mode. The value in CCR0, 128, defines the PWM period/2 and the values in CCR1 and CCR2 the PWM duty cycles. Using ~1.045MHz SMCLK as TACLK, the timer period is ~233us with a 75% duty cycle on P2.2 and 25% on P2.3. SMCLK = MCLK = TACLK = default DCO ~1.045MHz.

+

+Tested On: MSP430FR5739

+ + + + + +
/ |
RST
+

| | | P1.2/TA1.1|--> CCR1 - 75% PWM | P1.3/TA1.2|--> CCR2 - 25% PWM

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 65 of file timer_a_ex4_pwmMultipleUpDown.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 69 of file timer_a_ex4_pwmMultipleUpDown.c.

+ +

References __no_operation(), DUTY_CYCLE1, DUTY_CYCLE2, and TIMER_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.js new file mode 100644 index 0000000..d44699d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c = +[ + [ "DUTY_CYCLE1", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html#abb796f001390b47f0f733ea9a08481db", null ], + [ "DUTY_CYCLE2", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html#a497fa7efc7cefe7b023b4215f48cfe2a", null ], + [ "TIMER_PERIOD", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "main", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c_source.html new file mode 100644 index 0000000..f5acb72 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c_source.html @@ -0,0 +1,203 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_a/timer_a_ex4_pwmMultipleUpDown.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex4_pwmMultipleUpDown.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*******************************************************************************
+
61 //
+
62 //*****************************************************************************
+
63 #include "driverlib.h"
+
64 
+
65 #define TIMER_PERIOD 127
+
66 #define DUTY_CYCLE1 32
+
67 #define DUTY_CYCLE2 96
+
68 
+
69 void main (void)
+
70 {
+
71  //Stop WDT
+
72  WDT_A_hold(WDT_A_BASE);
+
73 
+
74  //P1.2 and P1.3 output
+
75  //P1.2 and P1.3 options select
+
76  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
77  GPIO_PORT_P1,
+
78  GPIO_PIN2 + GPIO_PIN3,
+
79  GPIO_PRIMARY_MODULE_FUNCTION
+
80  );
+
81 
+
82  //Start Timer
+
83  Timer_A_initUpDownModeParam initUpDownParam = {0};
+
84  initUpDownParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
85  initUpDownParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
86  initUpDownParam.timerPeriod = TIMER_PERIOD;
+
87  initUpDownParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
88  initUpDownParam.captureCompareInterruptEnable_CCR0_CCIE =
+
89  TIMER_A_CCIE_CCR0_INTERRUPT_DISABLE;
+
90  initUpDownParam.timerClear = TIMER_A_DO_CLEAR;
+
91  initUpDownParam.startTimer = false;
+
92  Timer_A_initUpDownMode(TIMER_A1_BASE, &initUpDownParam);
+
93 
+
94  Timer_A_startCounter( TIMER_A1_BASE,
+
95  TIMER_A_UPDOWN_MODE
+
96  );
+
97 
+
98  //Initialze compare registers to generate PWM1
+
99  Timer_A_initCompareModeParam initComp1Param = {0};
+
100  initComp1Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
+
101  initComp1Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
102  initComp1Param.compareOutputMode = TIMER_A_OUTPUTMODE_TOGGLE_SET;
+
103  initComp1Param.compareValue = DUTY_CYCLE1;
+
104  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp1Param);
+
105 
+
106  //Initialze compare registers to generate PWM2
+
107  Timer_A_initCompareModeParam initComp2Param = {0};
+
108  initComp2Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_2;
+
109  initComp2Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
110  initComp2Param.compareOutputMode = TIMER_A_OUTPUTMODE_TOGGLE_SET;
+
111  initComp2Param.compareValue = DUTY_CYCLE2;
+
112  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp2Param);
+
113 
+
114  //Enter LPM0
+
115  __bis_SR_register(LPM0_bits);
+
116 
+
117  //For debugger
+
118  __no_operation();
+
119 }
+
120 
+
void main(void)
+
#define DUTY_CYCLE2
+
#define DUTY_CYCLE1
+
#define TIMER_PERIOD
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html new file mode 100644 index 0000000..2bc9be5 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html @@ -0,0 +1,215 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_a/timer_a_ex5_pwmMultipleUp.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex5_pwmMultipleUp.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Macros

#define TIMER_PERIOD   511
 
#define DUTY_CYCLE1   384
 
#define DUTY_CYCLE2   128
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE1

+ +
+
+ + + + +
#define DUTY_CYCLE1   384
+
+ +

Definition at line 63 of file timer_a_ex5_pwmMultipleUp.c.

+ +
+
+ +

◆ DUTY_CYCLE2

+ +
+
+ + + + +
#define DUTY_CYCLE2   128
+
+ +

Definition at line 64 of file timer_a_ex5_pwmMultipleUp.c.

+ +
+
+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   511
+
+

This program generates two PWM outputs on P1.2,P1.3 using Timer1_A configured for up mode. The value in CCR0, 512-1, defines the PWM period and the values in CCR1 and CCR2 the PWM duty cycles. Using ~1.045MHz SMCLK as TACLK, the timer period is ~500us with a 75% duty cycle on P2.2 and 25% on P2.3. ACLK = n/a, SMCLK = MCLK = TACLK = default DCO ~1.045MHz.

+

+Tested On: MSP430FR5749

+ + + + + +
/ |
RST
+

| | | P1.2/TA1.1|--> CCR1 - 75% PWM | P1.3/TA1.2|--> CCR2 - 25% PWM

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 62 of file timer_a_ex5_pwmMultipleUp.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file timer_a_ex5_pwmMultipleUp.c.

+ +

References __no_operation(), DUTY_CYCLE1, DUTY_CYCLE2, param, and TIMER_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.js new file mode 100644 index 0000000..b5a1aeb --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c = +[ + [ "DUTY_CYCLE1", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html#abb796f001390b47f0f733ea9a08481db", null ], + [ "DUTY_CYCLE2", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html#a497fa7efc7cefe7b023b4215f48cfe2a", null ], + [ "TIMER_PERIOD", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "main", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c_source.html new file mode 100644 index 0000000..aed42b3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c_source.html @@ -0,0 +1,199 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_a/timer_a_ex5_pwmMultipleUp.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex5_pwmMultipleUp.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*******************************************************************************
+
59 //*****************************************************************************
+
60 #include "driverlib.h"
+
61 
+
62 #define TIMER_PERIOD 511
+
63 #define DUTY_CYCLE1 384
+
64 #define DUTY_CYCLE2 128
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //P1.2 and P1.3 output
+
72  //P1.2 and P1.3 options select
+
73  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
74  GPIO_PORT_P1,
+
75  GPIO_PIN2 + GPIO_PIN3,
+
76  GPIO_PRIMARY_MODULE_FUNCTION
+
77  );
+
78 
+
79  //Start timer
+
80  Timer_A_initUpModeParam param = {0};
+
81  param.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
82  param.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
83  param.timerPeriod = TIMER_PERIOD;
+
84  param.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
85  param.captureCompareInterruptEnable_CCR0_CCIE =
+
86  TIMER_A_CCIE_CCR0_INTERRUPT_DISABLE;
+
87  param.timerClear = TIMER_A_DO_CLEAR;
+
88  param.startTimer = true;
+
89  Timer_A_initUpMode(TIMER_A1_BASE, &param);
+
90 
+
91  //Initialize compare mode to generate PWM1
+
92  Timer_A_initCompareModeParam initComp1Param = {0};
+
93  initComp1Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
+
94  initComp1Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
95  initComp1Param.compareOutputMode = TIMER_A_OUTPUTMODE_RESET_SET;
+
96  initComp1Param.compareValue = DUTY_CYCLE1;
+
97  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp1Param);
+
98 
+
99  //Initialize compare mode to generate PWM2
+
100  Timer_A_initCompareModeParam initComp2Param = {0};
+
101  initComp2Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_2;
+
102  initComp2Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
103  initComp2Param.compareOutputMode = TIMER_A_OUTPUTMODE_RESET_SET;
+
104  initComp2Param.compareValue = DUTY_CYCLE2;
+
105  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp2Param);
+
106 
+
107  //Enter LPM0
+
108  __bis_SR_register(LPM0_bits);
+
109 
+
110  //For debugger
+
111  __no_operation();
+
112 }
+
113 
+
void main(void)
+
MPU_initThreeSegmentsParam param
+
#define DUTY_CYCLE2
+
#define DUTY_CYCLE1
+
#define TIMER_PERIOD
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html new file mode 100644 index 0000000..6b8edee --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html @@ -0,0 +1,197 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_a/timer_a_ex6_upDownModeOperation.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex6_upDownModeOperation.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define TIMER_A_PERIOD   250
 
#define DUTY_CYCLE   250
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE

+ +
+
+ + + + +
#define DUTY_CYCLE   250
+
+ +

Definition at line 65 of file timer_a_ex6_upDownModeOperation.c.

+ +
+
+ +

◆ TIMER_A_PERIOD

+ +
+
+ + + + +
#define TIMER_A_PERIOD   250
+
+

Toggle P2.4 using hardware TA1.0 output. Timer1_A is configured for up/down mode with CCR0 defining period, TA1.0 also output on P2.4. In this example, CCR0 is loaded with 250 and TA1.0 will toggle P2.4 at TACLK/2*250. Thus the output frequency on P2.4 will be the TACLK/1000. No CPU or software resources required. As coded with TACLK = SMCLK, P2.4 output frequency is ~1.045M/1000. SMCLK = MCLK = TACLK = default DCO ~1.045MHz

+

+Tested On: MSP430FR5739

+ + + + + +
/ |
RST
+

| | | P2.4/TA1.0|--> SMCLK/1000

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file timer_a_ex6_upDownModeOperation.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 67 of file timer_a_ex6_upDownModeOperation.c.

+ +

References __no_operation(), DUTY_CYCLE, and TIMER_A_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.js new file mode 100644 index 0000000..9eed3ca --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r57xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c = +[ + [ "DUTY_CYCLE", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html#a940d0fcbbee0921e43201c554231947c", null ], + [ "TIMER_A_PERIOD", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html#ae899bfdc491d37c006b4c301d9f8e147", null ], + [ "main", "_m_s_p430_f_r57xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c_source.html new file mode 100644 index 0000000..8de4187 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c_source.html @@ -0,0 +1,195 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_a/timer_a_ex6_upDownModeOperation.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex6_upDownModeOperation.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
59 //
+
60 //*****************************************************************************
+
61 
+
62 #include "driverlib.h"
+
63 
+
64 #define TIMER_A_PERIOD 250
+
65 #define DUTY_CYCLE 250
+
66 
+
67 void main (void)
+
68 {
+
69  //Stop WDT
+
70  WDT_A_hold(WDT_A_BASE);
+
71 
+
72  //P2.4 output
+
73  //P2.4 option select
+
74  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
75  GPIO_PORT_P2,
+
76  GPIO_PIN4,
+
77  GPIO_PRIMARY_MODULE_FUNCTION
+
78  );
+
79 
+
80  //Start timer in up down mode
+
81  Timer_A_initUpDownModeParam initUpDownParam = {0};
+
82  initUpDownParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
83  initUpDownParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
84  initUpDownParam.timerPeriod = TIMER_A_PERIOD;
+
85  initUpDownParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
86  initUpDownParam.captureCompareInterruptEnable_CCR0_CCIE =
+
87  TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
88  initUpDownParam.timerClear = TIMER_A_DO_CLEAR;
+
89  initUpDownParam.startTimer = false;
+
90  Timer_A_initUpDownMode(TIMER_A1_BASE, &initUpDownParam);
+
91 
+
92  //Init compare mode
+
93  Timer_A_initCompareModeParam initComp1Param = {0};
+
94  initComp1Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_0;
+
95  initComp1Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
96  initComp1Param.compareOutputMode = TIMER_A_OUTPUTMODE_TOGGLE;
+
97  initComp1Param.compareValue = DUTY_CYCLE;
+
98  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp1Param);
+
99 
+
100  Timer_A_startCounter(
+
101  TIMER_A1_BASE,
+
102  TIMER_A_UPDOWN_MODE
+
103  );
+
104 
+
105  //Enter LPM0
+
106  __bis_SR_register(LPM0_bits);
+
107 
+
108  //For debugger
+
109  __no_operation();
+
110 }
+
111 
+
void main(void)
+ +
#define TIMER_A_PERIOD
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html new file mode 100644 index 0000000..46b38e9 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html @@ -0,0 +1,186 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_b/timer_b_ex1_continuousModeCCR0.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex1_continuousModeCCR0.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define COMPARE_VALUE   50000
 
+ + + + + +

+Functions

void main (void)
 
void TIMERB0_ISR (void)
 
+

Macro Definition Documentation

+ +

◆ COMPARE_VALUE

+ +
+
+ + + + +
#define COMPARE_VALUE   50000
+
+ +

Definition at line 53 of file timer_b_ex1_continuousModeCCR0.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 55 of file timer_b_ex1_continuousModeCCR0.c.

+ +

References __no_operation(), and COMPARE_VALUE.

+ +
+
+ +

◆ TIMERB0_ISR()

+ +
+
+ + + + + + + + +
void TIMERB0_ISR (void )
+
+ +

Definition at line 101 of file timer_b_ex1_continuousModeCCR0.c.

+ +

References COMPARE_VALUE.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.js new file mode 100644 index 0000000..f55867b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r57xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c = +[ + [ "COMPARE_VALUE", "_m_s_p430_f_r57xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html#a655c866eb3f7ee47831709b091612e63", null ], + [ "main", "_m_s_p430_f_r57xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMERB0_ISR", "_m_s_p430_f_r57xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html#a17ea7521d47a1d5aa678bc645f70737b", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c_source.html new file mode 100644 index 0000000..1cbda2e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c_source.html @@ -0,0 +1,228 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_b/timer_b_ex1_continuousModeCCR0.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex1_continuousModeCCR0.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Timer_B, Toggle P1.0, CCR0 Cont. Mode ISR, DCO SMCLK
+
34 //
+
35 // Description: Toggle P1.0 using software and TB_0 ISR. Toggles every
+
36 // 50000 SMCLK cycles. SMCLK provides clock source for TBCLK.
+
37 // During the TB_0 ISR, P1.0 is toggled and 50000 clock cycles are added to
+
38 // CCR0. TB_0 ISR is triggered every 50000 cycles. CPU is normally off and
+
39 // used only during TB_ISR.
+
40 // ACLK = n/a, MCLK = SMCLK = TBCLK = default DCO ~1.045MHz
+
41 //
+
42 // Tested On: MSP430FR5739
+
43 // ---------------
+
44 // /|\| |
+
45 // | | |
+
46 // --|RST |
+
47 // | |
+
48 // | P1.0|-->LED
+
49 //
+
50 //******************************************************************************
+
51 #include "driverlib.h"
+
52 
+
53 #define COMPARE_VALUE 50000
+
54 
+
55 void main(void)
+
56 {
+
57  //Stop WDT
+
58  WDT_A_hold(WDT_A_BASE);
+
59 
+
60  //Set P1.0 to output direction
+
61  GPIO_setAsOutputPin(
+
62  GPIO_PORT_P1,
+
63  GPIO_PIN0
+
64  );
+
65 
+
66  //Start timer in continuous mode sourced by SMCLK
+
67  Timer_B_initContinuousModeParam initContParam = {0};
+
68  initContParam.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
69  initContParam.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
70  initContParam.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_DISABLE;
+
71  initContParam.timerClear = TIMER_B_DO_CLEAR;
+
72  initContParam.startTimer = false;
+
73  Timer_B_initContinuousMode(TIMER_B0_BASE, &initContParam);
+
74 
+
75  //Initiaze compare mode
+
76  Timer_B_clearCaptureCompareInterrupt(TIMER_B0_BASE,
+
77  TIMER_B_CAPTURECOMPARE_REGISTER_0);
+
78 
+
79  Timer_B_initCompareModeParam initCompParam = {0};
+
80  initCompParam.compareRegister = TIMER_B_CAPTURECOMPARE_REGISTER_0;
+
81  initCompParam.compareInterruptEnable = TIMER_B_CAPTURECOMPARE_INTERRUPT_ENABLE;
+
82  initCompParam.compareOutputMode = TIMER_B_OUTPUTMODE_OUTBITVALUE;
+
83  initCompParam.compareValue = COMPARE_VALUE;
+
84  Timer_B_initCompareMode(TIMER_B0_BASE, &initCompParam);
+
85 
+
86  Timer_B_startCounter( TIMER_B0_BASE,
+
87  TIMER_B_CONTINUOUS_MODE
+
88  );
+
89 
+
90  __bis_SR_register(LPM0_bits + GIE); // Enter LPM0, enable interrupts
+
91  __no_operation(); // For debugger
+
92 }
+
93 
+
94 // Timer B0 interrupt service routine
+
95 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
96 #pragma vector=TIMERB0_VECTOR
+
97 __interrupt
+
98 #elif defined(__GNUC__)
+
99 __attribute__((interrupt(TIMERB0_VECTOR)))
+
100 #endif
+
101 void TIMERB0_ISR (void)
+
102 {
+
103  uint16_t compVal = Timer_B_getCaptureCompareCount(TIMER_B0_BASE,
+
104  TIMER_B_CAPTURECOMPARE_REGISTER_0)
+
105  + COMPARE_VALUE;
+
106 
+
107  GPIO_toggleOutputOnPin(
+
108  GPIO_PORT_P1,
+
109  GPIO_PIN0
+
110  );
+
111 
+
112  // Add Offset to CCR0 [Cont mode]
+
113  Timer_B_setCompareValue(TIMER_B0_BASE,
+
114  TIMER_B_CAPTURECOMPARE_REGISTER_0,
+
115  compVal
+
116  );
+
117 }
+
118 
+
void TIMERB0_ISR(void)
+
void main(void)
+
#define COMPARE_VALUE
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html new file mode 100644 index 0000000..235fe81 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html @@ -0,0 +1,161 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_b/timer_b_ex2_overflowISR.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex2_overflowISR.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void TIMERB1_ISR (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 51 of file timer_b_ex2_overflowISR.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ TIMERB1_ISR()

+ +
+
+ + + + + + + + +
void TIMERB1_ISR (void )
+
+ +

Definition at line 86 of file timer_b_ex2_overflowISR.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.js new file mode 100644 index 0000000..bd5062c --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r57xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMERB1_ISR", "_m_s_p430_f_r57xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html#a35a1821354c82e0b10bf23a612416f1e", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c_source.html new file mode 100644 index 0000000..8b00ba7 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c_source.html @@ -0,0 +1,219 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_b/timer_b_ex2_overflowISR.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex2_overflowISR.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Timer_B, Toggle P1.0, Overflow ISR, 32kHz ACLK
+
34 //
+
35 // Description: Toggle P1.0 using software and the Timer_B overflow ISR.
+
36 // In this example an ISR triggers when TB overflows. Inside the ISR P1.0
+
37 // is toggled. Toggle rate is exactly 0.25Hz = [32kHz/FFFFh]/2. Proper use of the
+
38 // TBIV interrupt vector generator is demonstrated.
+
39 // ACLK = TBCLK = 32kHz, MCLK = SMCLK = default DCO ~ 1.045MHz
+
40 //
+
41 // Tested On: MSP430FR5739
+
42 // ---------------
+
43 // /|\| |
+
44 // | | |
+
45 // --|RST |
+
46 // | |
+
47 // | P1.0|-->LED
+
48 //******************************************************************************
+
49 #include "driverlib.h"
+
50 
+
51 void main(void)
+
52 {
+
53  //Stop WDT
+
54  WDT_A_hold(WDT_A_BASE);
+
55 
+
56  //Set P1.0 to output direction
+
57  GPIO_setAsOutputPin(
+
58  GPIO_PORT_P1,
+
59  GPIO_PIN0
+
60  );
+
61  Timer_B_clearTimerInterrupt(TIMER_B0_BASE);
+
62 
+
63  Timer_B_initContinuousModeParam param = {0};
+
64  param.clockSource = TIMER_B_CLOCKSOURCE_ACLK;
+
65  param.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
66  param.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_ENABLE;
+
67  param.timerClear = TIMER_B_DO_CLEAR;
+
68  param.startTimer = false;
+
69  Timer_B_initContinuousMode(TIMER_B0_BASE, &param);
+
70 
+
71  Timer_B_startCounter( TIMER_B0_BASE,
+
72  TIMER_B_CONTINUOUS_MODE
+
73  );
+
74 
+
75  __bis_SR_register(LPM3_bits + GIE); // Enter LPM3, enable interrupts
+
76  __no_operation(); // For debugger
+
77 }
+
78 
+
79 // Timer_B7 Interrupt Vector (TBIV) handler
+
80 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
81 #pragma vector=TIMERB1_VECTOR
+
82 __interrupt
+
83 #elif defined(__GNUC__)
+
84 __attribute__((interrupt(TIMERB1_VECTOR)))
+
85 #endif
+
86 void TIMERB1_ISR(void)
+
87 {
+
88  /* Any access, read or write, of the TBIV register automatically resets the
+
89  highest "pending" interrupt flag. */
+
90  switch( __even_in_range(TBIV,14) )
+
91  {
+
92  case 0: break; // No interrupt
+
93  case 2: break; // CCR1 not used
+
94  case 4: break; // CCR2 not used
+
95  case 6: break; // CCR3 not used
+
96  case 8: break; // CCR4 not used
+
97  case 10: break; // CCR5 not used
+
98  case 12: break; // CCR6 not used
+
99  case 14: // overflow
+
100  //Toggle P1.0
+
101  GPIO_toggleOutputOnPin(
+
102  GPIO_PORT_P1,
+
103  GPIO_PIN0
+
104  );
+
105 
+
106  break;
+
107  default: break;
+
108  }
+
109 }
+
void TIMERB1_ISR(void)
+
void main(void)
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex3__pwm_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex3__pwm_8c.html new file mode 100644 index 0000000..4a0f67e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex3__pwm_8c.html @@ -0,0 +1,137 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_b/timer_b_ex3_pwm.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex3_pwm.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 58 of file timer_b_ex3_pwm.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex3__pwm_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex3__pwm_8c.js new file mode 100644 index 0000000..a209b36 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex3__pwm_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2timer__b_2timer__b__ex3__pwm_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2timer__b_2timer__b__ex3__pwm_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex3__pwm_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex3__pwm_8c_source.html new file mode 100644 index 0000000..cd64a9f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex3__pwm_8c_source.html @@ -0,0 +1,209 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_b/timer_b_ex3_pwm.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex3_pwm.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Timer_B, PWM TB1-6, Up Mode, DCO SMCLK
+
34 //
+
35 // Description: This program generates two PWM outputs on P1.4/P1.5 using
+
36 // Timer_B configured for up mode. The value in CCR0, 512-1, defines the PWM
+
37 // period and the values in CCR1-2 the PWM duty cycles. Using ~1048kHz SMCLK
+
38 // as TBCLK, the timer period is ~488us.
+
39 // ACLK = 32kHz, SMCLK = MCLK = TBCLK = default DCO ~1048kHz.
+
40 //
+
41 // Tested On: MSP430FR5739
+
42 // -----------------
+
43 // /|\| XIN|-
+
44 // | | | 32kHz
+
45 // --|RST XOUT|-
+
46 // | |
+
47 // | P1.4/TB0.1|--> CCR1 - 75% PWM
+
48 // | P1.5/TB0.2|--> CCR2 - 25% PWM
+
49 // | |
+
50 // | |
+
51 // | |
+
52 // | |
+
53 //
+
54 //******************************************************************************
+
55 
+
56 #include "driverlib.h"
+
57 
+
58 void main(void)
+
59 {
+
60  //Stop WDT
+
61  WDT_A_hold(WDT_A_BASE);
+
62 
+
63  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
64  GPIO_PORT_P1,
+
65  GPIO_PIN4 | GPIO_PIN5,
+
66  GPIO_PRIMARY_MODULE_FUNCTION
+
67  );
+
68 
+
69  //Start timer
+
70  Timer_B_initUpModeParam initUpParam = {0};
+
71  initUpParam.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
72  initUpParam.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
73  initUpParam.timerPeriod = 511;
+
74  initUpParam.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_DISABLE;
+
75  initUpParam.captureCompareInterruptEnable_CCR0_CCIE =
+
76  TIMER_B_CCIE_CCR0_INTERRUPT_DISABLE;
+
77  initUpParam.timerClear = TIMER_B_DO_CLEAR;
+
78  initUpParam.startTimer = false;
+
79  Timer_B_initUpMode(TIMER_B0_BASE, &initUpParam);
+
80 
+
81  Timer_B_startCounter(TIMER_B0_BASE,
+
82  TIMER_B_UP_MODE
+
83  );
+
84 
+
85  //Initialize compare mode to generate PWM1
+
86  Timer_B_initCompareModeParam initComp1Param = {0};
+
87  initComp1Param.compareRegister = TIMER_B_CAPTURECOMPARE_REGISTER_1;
+
88  initComp1Param.compareInterruptEnable = TIMER_B_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
89  initComp1Param.compareOutputMode = TIMER_B_OUTPUTMODE_RESET_SET;
+
90  initComp1Param.compareValue = 383;
+
91  Timer_B_initCompareMode(TIMER_B0_BASE, &initComp1Param);
+
92 
+
93  //Initialize compare mode to generate PWM2
+
94  Timer_B_initCompareModeParam initComp2Param = {0};
+
95  initComp2Param.compareRegister = TIMER_B_CAPTURECOMPARE_REGISTER_2;
+
96  initComp2Param.compareInterruptEnable = TIMER_B_CAPTURECOMPARE_INTERRUPT_ENABLE;
+
97  initComp2Param.compareOutputMode = TIMER_B_OUTPUTMODE_RESET_SET;
+
98  initComp2Param.compareValue = 128;
+
99  Timer_B_initCompareMode(TIMER_B0_BASE, &initComp2Param);
+
100 
+
101  _BIS_SR(LPM0_bits + GIE); // CPU off
+
102 }
+
void main(void)
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html new file mode 100644 index 0000000..518521f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html @@ -0,0 +1,202 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_b/timer_b_ex4_upModeOperation.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex4_upModeOperation.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define TIMER_PERIOD   50000
 
+ + + + + +

+Functions

void main (void)
 
void TIMERB0_ISR (void)
 
+

Macro Definition Documentation

+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   50000
+
+

Timer_B, Toggle P1.0, CCR0 Up Mode ISR, DCO SMCLK

+

Description: Toggle P1.0 using software and TB_0 ISR. Timer_B is configured for up mode, thus the timer overflows when TBR counts to CCR0. In this example, CCR0 is loaded with 50000. ACLK = n/a, MCLK = SMCLK = TBCLK = default DCO ~1.045MHz

+

+Tested On: MSP430F5R5739

+ + + + + +
/ |
RST
+

| | | P1.0|-->LED

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • Timer B0
  • +
+ +

Definition at line 62 of file timer_b_ex4_upModeOperation.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 64 of file timer_b_ex4_upModeOperation.c.

+ +

References __no_operation(), param, and TIMER_PERIOD.

+ +
+
+ +

◆ TIMERB0_ISR()

+ +
+
+ + + + + + + + +
void TIMERB0_ISR (void )
+
+ +

Definition at line 112 of file timer_b_ex4_upModeOperation.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.js new file mode 100644 index 0000000..ac5bdd8 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r57xx_2timer__b_2timer__b__ex4__up_mode_operation_8c = +[ + [ "TIMER_PERIOD", "_m_s_p430_f_r57xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "main", "_m_s_p430_f_r57xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMERB0_ISR", "_m_s_p430_f_r57xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html#a17ea7521d47a1d5aa678bc645f70737b", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex4__up_mode_operation_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex4__up_mode_operation_8c_source.html new file mode 100644 index 0000000..93185a1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex4__up_mode_operation_8c_source.html @@ -0,0 +1,206 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_b/timer_b_ex4_upModeOperation.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex4_upModeOperation.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
58 //*****************************************************************************
+
59 
+
60 #include "driverlib.h"
+
61 
+
62 #define TIMER_PERIOD 50000
+
63 
+
64 void main (void)
+
65 {
+
66  //Stop WDT
+
67  WDT_A_hold(WDT_A_BASE);
+
68 
+
69  //Set P1.0 to output direction
+
70  GPIO_setAsOutputPin(
+
71  GPIO_PORT_P1,
+
72  GPIO_PIN0
+
73  );
+
74 
+
75  //Start timer
+
76  Timer_B_clearTimerInterrupt(TIMER_B0_BASE);
+
77 
+
78  Timer_B_initUpModeParam param = {0};
+
79  param.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
80  param.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
81  param.timerPeriod = TIMER_PERIOD;
+
82  param.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_DISABLE;
+
83  param.captureCompareInterruptEnable_CCR0_CCIE =
+
84  TIMER_B_CAPTURECOMPARE_INTERRUPT_ENABLE;
+
85  param.timerClear = TIMER_B_DO_CLEAR;
+
86  param.startTimer = false;
+
87  Timer_B_initUpMode(TIMER_B0_BASE, &param);
+
88 
+
89  Timer_B_startCounter(
+
90  TIMER_B0_BASE,
+
91  TIMER_B_UPDOWN_MODE
+
92  );
+
93 
+
94  //Enter LPM0, enable interrupts
+
95  __bis_SR_register(LPM0_bits + GIE);
+
96 
+
97  //For debugger
+ +
99 }
+
100 
+
101 //******************************************************************************
+
102 //
+
103 //This is the Timer B0 interrupt vector service routine.
+
104 //
+
105 //******************************************************************************
+
106 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
107 #pragma vector=TIMERB0_VECTOR
+
108 __interrupt
+
109 #elif defined(__GNUC__)
+
110 __attribute__((interrupt(TIMERB0_VECTOR)))
+
111 #endif
+
112 void TIMERB0_ISR (void)
+
113 {
+
114  //Toggle P1.0 using exclusive-OR
+
115  GPIO_toggleOutputOnPin(
+
116  GPIO_PORT_P1,
+
117  GPIO_PIN0
+
118  );
+
119 }
+
120 
+
void TIMERB0_ISR(void)
+
void main(void)
+
MPU_initThreeSegmentsParam param
+
#define TIMER_PERIOD
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html new file mode 100644 index 0000000..9f2d5ca --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html @@ -0,0 +1,198 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_b/timer_b_ex5_singlePWM.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex5_singlePWM.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define TIMER_PERIOD   511
 
#define DUTY_CYCLE   383
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE

+ +
+
+ + + + +
#define DUTY_CYCLE   383
+
+ +

Definition at line 64 of file timer_b_ex5_singlePWM.c.

+ +
+
+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   511
+
+

Timer_B, PWM TB0.1, Up Mode, DCO SMCLK

+

Description: This program generates PWM outputs on P1.4 using Timer_B configured for up mode. The value , TIMER_PERIOD, defines the PWM period and the value DUTY_CYCLE the PWM duty cycle. Using ~1.045MHz SMCLK as TBCLK, the timer period is ~488us with a 75% duty cycle on P1.4 ACLK = n/a, SMCLK = MCLK = TBCLK = default DCO ~1.045MHz.

+

+Tested On: MSP430FR5739

+ + + + + +
/ |
RST
+

| | | P1.4/TB0.1|--> CCR1 - 75% PWM | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file timer_b_ex5_singlePWM.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file timer_b_ex5_singlePWM.c.

+ +

References __no_operation(), DUTY_CYCLE, param, and TIMER_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.js new file mode 100644 index 0000000..fffdb2d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r57xx_2timer__b_2timer__b__ex5__single_p_w_m_8c = +[ + [ "DUTY_CYCLE", "_m_s_p430_f_r57xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html#a940d0fcbbee0921e43201c554231947c", null ], + [ "TIMER_PERIOD", "_m_s_p430_f_r57xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "main", "_m_s_p430_f_r57xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex5__single_p_w_m_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex5__single_p_w_m_8c_source.html new file mode 100644 index 0000000..085abc8 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2timer__b_2timer__b__ex5__single_p_w_m_8c_source.html @@ -0,0 +1,178 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/timer_b/timer_b_ex5_singlePWM.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex5_singlePWM.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*******************************************************************************
+
59 //******************************************************************************
+
60 
+
61 #include "driverlib.h"
+
62 
+
63 #define TIMER_PERIOD 511
+
64 #define DUTY_CYCLE 383
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //P1.4 as PWM output
+
72  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
73  GPIO_PORT_P1,
+
74  GPIO_PIN4,
+
75  GPIO_PRIMARY_MODULE_FUNCTION
+
76  );
+
77 
+
78  //Generate PWM - Timer runs in Up mode
+
79  Timer_B_outputPWMParam param = {0};
+
80  param.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
81  param.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
82  param.timerPeriod = TIMER_PERIOD;
+
83  param.compareRegister = TIMER_B_CAPTURECOMPARE_REGISTER_1;
+
84  param.compareOutputMode = TIMER_B_OUTPUTMODE_RESET_SET;
+
85  param.dutyCycle = DUTY_CYCLE;
+
86  Timer_B_outputPWM(TIMER_B0_BASE, &param);
+
87 
+
88  //Enter LPM0
+
89  __bis_SR_register(LPM0_bits);
+
90 
+
91  //For debugger
+ +
93 }
+
void main(void)
+
MPU_initThreeSegmentsParam param
+
#define DUTY_CYCLE
+
#define TIMER_PERIOD
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2tlv_2tlv__ex1__get_device_type_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2tlv_2tlv__ex1__get_device_type_8c.html new file mode 100644 index 0000000..92f54a4 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2tlv_2tlv__ex1__get_device_type_8c.html @@ -0,0 +1,149 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/tlv/tlv_ex1_getDeviceType.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tlv_ex1_getDeviceType.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main ()
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

tlv - getDeviceType

+

+Tested on MSP430F5438A, MSP430FR5739

+

/|| | | | | –| | Device Type | | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT_A
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 58 of file tlv_ex1_getDeviceType.c.

+ +

References status.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2tlv_2tlv__ex1__get_device_type_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2tlv_2tlv__ex1__get_device_type_8c.js new file mode 100644 index 0000000..1e74f7e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2tlv_2tlv__ex1__get_device_type_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2tlv_2tlv__ex1__get_device_type_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2tlv_2tlv__ex1__get_device_type_8c.html#acdef7a1fd863a6d3770c1268cb06add3", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2tlv_2tlv__ex1__get_device_type_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2tlv_2tlv__ex1__get_device_type_8c_source.html new file mode 100644 index 0000000..e185391 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2tlv_2tlv__ex1__get_device_type_8c_source.html @@ -0,0 +1,152 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/tlv/tlv_ex1_getDeviceType.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tlv_ex1_getDeviceType.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
54 //******************************************************************************
+
55 
+
56 #include "driverlib.h"
+
57 
+
58 void main()
+
59 {
+
60  //Stop WDT
+
61  WDT_A_hold(WDT_A_BASE);
+
62 
+
63  uint16_t status = TLV_getDeviceType();
+
64 
+
65 }
+
void main()
+ +
uint16_t status
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html new file mode 100644 index 0000000..b8b4f65 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html @@ -0,0 +1,181 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/wdt_a/wdt_a_ex1_intervalSMCLK.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
wdt_a_ex1_intervalSMCLK.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void WDT_A_ISR (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

WDT - Toggle P1.0, Interval Overflow ISR, DCO SMCLK

+

Toggle P1.0 using software timed by the WDT ISR. Toggle rate is approx. 30ms = {(default DCO 1.045MHz) / 32768} based on default DCO = SMCLK clock source used in this example for the WDT. ACLK = n/a, MCLK = SMCLK = default DCO ~1.045MHz

+

+Tested On: MSP430F5529,MSP430FR5739

+ + + + + + + +
/ |
RST
P1.0 -->LED
+

| |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • WDT_A_VECTOR
  • +
+ +

Definition at line 62 of file wdt_a_ex1_intervalSMCLK.c.

+ +

References __no_operation().

+ +
+
+ +

◆ WDT_A_ISR()

+ +
+
+ + + + + + + + +
void WDT_A_ISR (void )
+
+ +

Definition at line 95 of file wdt_a_ex1_intervalSMCLK.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js new file mode 100644 index 0000000..b272c15 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "WDT_A_ISR", "_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html#afa209a204489cffc3a47f48db05b9713", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c_source.html new file mode 100644 index 0000000..839e93a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c_source.html @@ -0,0 +1,185 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/wdt_a/wdt_a_ex1_intervalSMCLK.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
wdt_a_ex1_intervalSMCLK.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
59 //******************************************************************************
+
60 #include "driverlib.h"
+
61 
+
62 void main (void)
+
63 {
+
64  //Initialize WDT module in timer interval mode,
+
65  //with SMCLK as source at an interval of 32 ms.
+
66  WDT_A_initIntervalTimer(WDT_A_BASE,
+
67  WDT_A_CLOCKSOURCE_SMCLK,
+
68  WDT_A_CLOCKDIVIDER_32K);
+
69 
+
70  WDT_A_start(WDT_A_BASE);
+
71 
+
72  //Enable Watchdog Interupt
+
73  SFR_clearInterrupt(SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT);
+
74  SFR_enableInterrupt(SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT);
+
75 
+
76  //Set P1.0 to output direction
+
77  GPIO_setAsOutputPin(
+
78  GPIO_PORT_P1,
+
79  GPIO_PIN0
+
80  );
+
81 
+
82  //Enter LPM0, enable interrupts
+
83  __bis_SR_register(LPM0_bits + GIE);
+
84  //For debugger
+ +
86 }
+
87 
+
88 //Watchdog Timer interrupt service routine
+
89 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
90 #pragma vector=WDT_VECTOR
+
91 __interrupt
+
92 #elif defined(__GNUC__)
+
93 __attribute__((interrupt(WDT_VECTOR)))
+
94 #endif
+
95 void WDT_A_ISR (void)
+
96 {
+
97  //Toggle P1.0
+
98  GPIO_toggleOutputOnPin(
+
99  GPIO_PORT_P1,
+
100  GPIO_PIN0);
+
101 }
+
102 
+
void main(void)
+
void WDT_A_ISR(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html new file mode 100644 index 0000000..2a05e46 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html @@ -0,0 +1,181 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/wdt_a/wdt_a_ex2_intervalACLK.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
wdt_a_ex2_intervalACLK.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void WDT_A_ISR (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

WDT - Toggle P1.0, Interval Overflow ISR, 32kHz ACLK

+

Toggle P1.0 using software timed by WDT ISR. Toggle rate is exactly 250ms based on 32kHz ACLK WDT clock source. In this example the WDT is configured to divide 32768 watch-crystal(2^15) by 2^13 with an ISR triggered @ 4Hz = [WDT CLK source/32768]. ACLK = REFO , MCLK = SMCLK = default DCO ~1.045MHz

+

+Tested On: MSP430F5529,MSP430FR5739

+ + + + + + + +
/ |
RST
P1.0 -->LED
+

| |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • WDT_A_VECTOR
  • +
+ +

Definition at line 63 of file wdt_a_ex2_intervalACLK.c.

+ +

References __no_operation().

+ +
+
+ +

◆ WDT_A_ISR()

+ +
+
+ + + + + + + + +
void WDT_A_ISR (void )
+
+ +

Definition at line 96 of file wdt_a_ex2_intervalACLK.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js new file mode 100644 index 0000000..86ba694 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "WDT_A_ISR", "_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html#afa209a204489cffc3a47f48db05b9713", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c_source.html new file mode 100644 index 0000000..7554bdc --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c_source.html @@ -0,0 +1,185 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/wdt_a/wdt_a_ex2_intervalACLK.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
wdt_a_ex2_intervalACLK.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Initialize WDT module in timer interval mode,
+
66  //with ACLK as source at an interval of 250 ms.
+
67  WDT_A_initIntervalTimer(WDT_A_BASE,
+
68  WDT_A_CLOCKSOURCE_ACLK,
+
69  WDT_A_CLOCKDIVIDER_8192);
+
70 
+
71  WDT_A_start(WDT_A_BASE);
+
72 
+
73  //Enable Watchdog Interupt
+
74  SFR_clearInterrupt(SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT);
+
75  SFR_enableInterrupt(SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT);
+
76 
+
77  //Set P1.0 to output direction
+
78  GPIO_setAsOutputPin(
+
79  GPIO_PORT_P1,
+
80  GPIO_PIN0
+
81  );
+
82 
+
83  //Enter LPM3, enable interrupts
+
84  __bis_SR_register(LPM3_bits + GIE);
+
85  //For debugger
+ +
87 }
+
88 
+
89 //Watchdog Timer interrupt service routine
+
90 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
91 #pragma vector=WDT_VECTOR
+
92 __interrupt
+
93 #elif defined(__GNUC__)
+
94 __attribute__((interrupt(WDT_VECTOR)))
+
95 #endif
+
96 void WDT_A_ISR (void)
+
97 {
+
98  //Toggle P1.0
+
99  GPIO_toggleOutputOnPin(
+
100  GPIO_PORT_P1,
+
101  GPIO_PIN0);
+
102 }
+
103 
+
void main(void)
+
void WDT_A_ISR(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html new file mode 100644 index 0000000..3a4d180 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html @@ -0,0 +1,159 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/wdt_a/wdt_a_ex3_watchdogACLK.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
wdt_a_ex3_watchdogACLK.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

WDT - Failsafe Clock, 10KHz VLOCLK

+

Configure WDT in watchdog to timeout sourced by ACLK. LPM3 is entered. This example will demonstrate WDT fail-safe feature by automatically selecting VLOCLK as WDT clock source if ACLK fails. Watchdog timeout will toggle on P1.0 every 3 seconds in main function. VLOCLK = 10KHZ, ACLK = 32768, MCLK = SMCLK = default DCO ~1.045MHz

+

+Tested On: MSP430F5529,MSP430FR5739

+ + + + + + + +
/ |
RST
P1.0 -->LED
+

| |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 63 of file wdt_a_ex3_watchdogACLK.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js new file mode 100644 index 0000000..bd76fa4 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c = +[ + [ "main", "_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c_source.html new file mode 100644 index 0000000..44771d7 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r57xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c_source.html @@ -0,0 +1,172 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/wdt_a/wdt_a_ex3_watchdogACLK.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
wdt_a_ex3_watchdogACLK.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Watchdog mode -> reset after expired time
+
66  //WDT is clocked by VLOCLK since ALCK is failed without initialization
+
67  //Set Watchdog Timer timeout 3s - SET BREAKPOINT HERE
+
68  WDT_A_initWatchdogTimer(WDT_A_BASE,
+
69  WDT_A_CLOCKSOURCE_ACLK,
+
70  WDT_A_CLOCKDIVIDER_32K);
+
71 
+
72  WDT_A_start(WDT_A_BASE);
+
73 
+
74  //Set P1.0 to output direction
+
75  GPIO_setAsOutputPin(
+
76  GPIO_PORT_P1,
+
77  GPIO_PIN0
+
78  );
+
79 
+
80  //Toggle P1.0
+
81  GPIO_toggleOutputOnPin(
+
82  GPIO_PORT_P1,
+
83  GPIO_PIN0
+
84  );
+
85 
+
86  //Enter LPM3
+
87  __bis_SR_register(LPM3_bits + GIE);
+
88  //For debugger
+ +
90 }
+
91 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2crc_2crc__ex1__build_signature_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2crc_2crc__ex1__build_signature_8c.html new file mode 100644 index 0000000..3a0d892 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2crc_2crc__ex1__build_signature_8c.html @@ -0,0 +1,159 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/crc/crc_ex1_buildSignature.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
crc_ex1_buildSignature.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

CRC - Build Signature and Rebuild to test.

+

The CRC is first used to build a signature using a seed and multiple data values. This signature is considered as the checksum and can be sent by a UART connection along with the data to verify the correct data has been sent. The second half of this program is used to test the CRC checksum of the data that has been created, by recreating the same checksum and comparing it to the first checksum. If the two checksum are equal, then P1.0 is set and the LED is turned on. Breakpoints can be set before the CRC_setData() function to observe the CRC register values and see the subsequent signatures before/after each data set.

+

+Tested On: MSP430FR5969

+ + + + + + + +
/ |
RST
P1.0 --> LED
+

| |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • CRC peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 68 of file crc_ex1_buildSignature.c.

+ +

References __no_operation(), GPIO_setOutputHighOnPin(), and i.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2crc_2crc__ex1__build_signature_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2crc_2crc__ex1__build_signature_8c.js new file mode 100644 index 0000000..59ed230 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2crc_2crc__ex1__build_signature_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2crc_2crc__ex1__build_signature_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2crc_2crc__ex1__build_signature_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2crc_2crc__ex1__build_signature_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2crc_2crc__ex1__build_signature_8c_source.html new file mode 100644 index 0000000..071139e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2crc_2crc__ex1__build_signature_8c_source.html @@ -0,0 +1,211 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/crc/crc_ex1_buildSignature.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
crc_ex1_buildSignature.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
65 //******************************************************************************
+
66 #include "driverlib.h"
+
67 
+
68 void main (void)
+
69 {
+
70  uint16_t crcSeed = 0xBEEF;
+
71  uint16_t data[] = {0x0123,
+
72  0x4567,
+
73  0x8910,
+
74  0x1112,
+
75  0x1314};
+
76  uint16_t crcResult;
+
77  uint8_t i;
+
78 
+
79  //Stop WDT
+
80  WDT_A_hold(WDT_A_BASE);
+
81 
+
82  //Set P1.0 as an output
+
83  GPIO_setAsOutputPin(
+
84  GPIO_PORT_P1,
+
85  GPIO_PIN0);
+
86 
+
87  /*
+
88  * Disable the GPIO power-on default high-impedance mode to activate
+
89  * previously configured port settings
+
90  */
+
91  PMM_unlockLPM5();
+
92 
+
93  //Set the CRC seed
+
94  CRC_setSeed(CRC_BASE,
+
95  crcSeed);
+
96 
+
97  for (i = 0; i < 5; i++)
+
98  {
+
99  //Add all of the values into the CRC signature
+
100  CRC_set16BitData(CRC_BASE,
+
101  data[i]);
+
102  }
+
103 
+
104  //Save the current CRC signature checksum to be compared for later
+
105  crcResult = CRC_getResult(CRC_BASE);
+
106 
+
107 
+
108  //*** Test the CRC ***//
+
109 
+
110  //Reset the CRC Signature and set the same seed
+
111  CRC_setSeed(CRC_BASE,
+
112  crcSeed);
+
113 
+
114  for (i = 0; i < 5; i++)
+
115  {
+
116  //Add all of the values into the CRC signature
+
117  CRC_set16BitData(CRC_BASE,
+
118  data[i]);
+
119  }
+
120 
+
121  //Compare the 2 CRC Resulting Signature Checksums
+
122  if (crcResult == CRC_getResult(CRC_BASE)){
+
123  //set P1.0
+ +
125  GPIO_PORT_P1,
+
126  GPIO_PIN0);
+
127  }
+
128 
+
129  //Enter LPM4, interrupts enabled
+
130  __bis_SR_register(LPM4_bits);
+
131  __no_operation();
+
132 }
+
133 
+
void main(void)
+ + +
__no_operation()
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c.html new file mode 100644 index 0000000..0235d73 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/cs/cs_ex1_DCOSetup.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cs_ex1_DCOSetup.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 48 of file cs_ex1_DCOSetup.c.

+ +

References GPIO_setOutputLowOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c.js new file mode 100644 index 0000000..cc36a87 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c_source.html new file mode 100644 index 0000000..d1684b3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2cs_2cs__ex1___d_c_o_setup_8c_source.html @@ -0,0 +1,188 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/cs/cs_ex1_DCOSetup.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
cs_ex1_DCOSetup.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR59xx Demo - Configure MCLK for 8MHz operation
+
34 //
+
35 // Description: Configure SMCLK = MCLK = 8MHz
+
36 //
+
37 // MSP430FR59x
+
38 // ---------------
+
39 // /|\| |
+
40 // | | |
+
41 // --|RST |
+
42 // | |
+
43 // | |
+
44 // | P3.4 |---> SMCLK = MCLK = 8MHz
+
45 //******************************************************************************
+
46 #include "driverlib.h"
+
47 
+
48 void main(void)
+
49 {
+
50  //Stop WDT
+
51  WDT_A_hold(WDT_A_BASE);
+
52 
+
53  //Set DCO Frequency to 8MHz
+
54  CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_6);
+
55 
+
56  //configure MCLK, SMCLK to be source by DCOCLK
+
57  CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
58  CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
59 
+
60  // output SMCLK
+ +
62  GPIO_PORT_P3,
+
63  GPIO_PIN4
+
64  );
+
65 
+
66  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
67  GPIO_PORT_P3,
+
68  GPIO_PIN4,
+
69  GPIO_TERNARY_MODULE_FUNCTION
+
70  );
+
71 
+
72  /*
+
73  * Disable the GPIO power-on default high-impedance mode to activate
+
74  * previously configured port settings
+
75  */
+
76  PMM_unlockLPM5();
+
77 
+
78  while(1);
+
79 }
+
80 
+
void main(void)
+ +
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2dma_2dma__ex1__repeated_block_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2dma_2dma__ex1__repeated_block_8c.html new file mode 100644 index 0000000..79e8307 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2dma_2dma__ex1__repeated_block_8c.html @@ -0,0 +1,151 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/dma/dma_ex1_repeatedBlock.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
dma_ex1_repeatedBlock.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

DMA - Repeated Block Transfer to-and-from RAM, Software Trigger.

+

A 16 word block from 1C00-1C1Fh is transfered to 1C20h-1C3fh using DMA0 in a burst block using software DMAREQ trigger. After each transfer, source, destination and DMA size are reset to initial software setting because DMA transfer mode 5 is used. P1.0 is toggled during DMA transfer only for demonstration purposes. ** RAM location 0x1C00 - 0x1C3F used - make sure no compiler conflict ** ACLK = REFO = 32kHz, MCLK = SMCLK = default DCO 1048576Hz

+

+Tested on MSP430FR5969

+

/|| XIN|- | | | 32kHz –|RST XOUT|- | | | P1.0|-> LED | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • DMA peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 68 of file dma_ex1_repeatedBlock.c.

+ +

References GPIO_setOutputHighOnPin(), GPIO_setOutputLowOnPin(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2dma_2dma__ex1__repeated_block_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2dma_2dma__ex1__repeated_block_8c.js new file mode 100644 index 0000000..0ebdf03 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2dma_2dma__ex1__repeated_block_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2dma_2dma__ex1__repeated_block_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2dma_2dma__ex1__repeated_block_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2dma_2dma__ex1__repeated_block_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2dma_2dma__ex1__repeated_block_8c_source.html new file mode 100644 index 0000000..1c56393 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2dma_2dma__ex1__repeated_block_8c_source.html @@ -0,0 +1,220 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/dma/dma_ex1_repeatedBlock.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
dma_ex1_repeatedBlock.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
66 //******************************************************************************
+
67 
+
68 void main (void)
+
69 {
+
70  //Stop Watchdog Timer
+
71  WDT_A_hold(WDT_A_BASE);
+
72 
+
73  //Set P1.0 to output direction
+
74  GPIO_setAsOutputPin(
+
75  GPIO_PORT_P1,
+
76  GPIO_PIN0
+
77  );
+
78 
+
79  /*
+
80  * Disable the GPIO power-on default high-impedance mode to activate
+
81  * previously configured port settings
+
82  */
+
83  PMM_unlockLPM5();
+
84 
+
85  //Initialize and Setup DMA Channel 0
+
86  /*
+
87  * Configure DMA channel 0
+
88  * Configure channel for repeated block transfers
+
89  * DMA interrupt flag will be set after every 16 transfers
+
90  * Use DMA_startTransfer() function to trigger transfers
+
91  * Transfer Word-to-Word
+
92  * Trigger upon Rising Edge of Trigger Source Signal
+
93  */
+
94 
+
95  DMA_initParam param = {0};
+
96  param.channelSelect = DMA_CHANNEL_0;
+
97  param.transferModeSelect = DMA_TRANSFER_REPEATED_BLOCK;
+
98  param.transferSize = 16;
+
99  param.triggerSourceSelect = DMA_TRIGGERSOURCE_0;
+
100  param.transferUnitSelect = DMA_SIZE_SRCWORD_DSTWORD;
+
101  param.triggerTypeSelect = DMA_TRIGGER_RISINGEDGE;
+
102  DMA_init(&param);
+
103  /*
+
104  * Configure DMA channel 0
+
105  * Use 0x1C00 as source
+
106  * Increment source address after every transfer
+
107  */
+
108  DMA_setSrcAddress(DMA_CHANNEL_0,
+
109  0x1C00,
+
110  DMA_DIRECTION_INCREMENT);
+
111  /*
+
112  * Configure DMA channel 0
+
113  * Use 0x1C20 as destination
+
114  * Increment destination address after every transfer
+
115  */
+
116  DMA_setDstAddress(DMA_CHANNEL_0,
+
117  0x1C20,
+
118  DMA_DIRECTION_INCREMENT);
+
119 
+
120  //Enable transfers on DMA channel 0
+
121  DMA_enableTransfers(DMA_CHANNEL_0);
+
122 
+
123  while (1)
+
124  {
+
125  //set P1.0
+ +
127  GPIO_PORT_P1,
+
128  GPIO_PIN0
+
129  );
+
130 
+
131  //Start block tranfer on DMA channel 0
+
132  DMA_startTransfer(DMA_CHANNEL_0);
+
133 
+
134  //Clear P1.0 LED off
+ +
136  GPIO_PORT_P1,
+
137  GPIO_PIN0
+
138  );
+
139  }
+
140 }
+
141 
+
void main(void)
+
MPU_initThreeSegmentsParam param
+ +
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html new file mode 100644 index 0000000..7e00c18 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html @@ -0,0 +1,220 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_a_spi/eusci_a_spi_ex1_master.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_a_spi_ex1_master.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCI_A0_ISR (void)
 
+ + + + + +

+Variables

uint8_t RXData = 0
 
uint8_t TXData = 0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 81 of file eusci_a_spi_ex1_master.c.

+ +

References __delay_cycles(), __no_operation(), GPIO_setOutputLowOnPin(), i, param, and TXData.

+ +
+
+ +

◆ USCI_A0_ISR()

+ +
+
+ + + + + + + + +
void USCI_A0_ISR (void )
+
+ +

Definition at line 178 of file eusci_a_spi_ex1_master.c.

+ +

References __delay_cycles(), RXData, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData = 0
+
+

USCI_A0, SPI 3-Wire Master Incremented Data This example shows how SPI master talks to SPI slave using 3-wire mode. Incrementing data is sent by the master starting at 0x01. Received data is expected to be same as the previous transmission. eUSCI RX ISR is used to handle communication with the CPU, normally in LPM0. If high, P1.0 indicates valid data reception. Because all execution after LPM0 is in ISRs, initialization waits for DCO to stabilize against SMCLK. ACLK = ~32.768kHz, MCLK = SMCLK = DCO ~ 1048kHz. BRCLK = SMCLK/2

+

Use with SPI Slave Data Echo code example. If slave is in debug mode, P1.1 slave reset signal conflicts with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.

          Tested on MSP430FR5969
+            -----------------
+       /|\ |                 |
+        |  |                 |
+

Master—+->|RST | | | | P2.0|-> Data Out (UCA0SIMO) | | | P2.1|<- Data In (UCA0SOMI) | | | P1.5|-> Serial Clock Out (UCA0CLK)

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • SPI peripheral
  • +
  • GPIO Port peripheral (for SPI pins)
  • +
  • UCA0SIMO
  • +
  • UCA0SOMI
  • +
  • UCA0CLK
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_A0_VECTOR
  • +
+ +

Definition at line 78 of file eusci_a_spi_ex1_master.c.

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 79 of file eusci_a_spi_ex1_master.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.js new file mode 100644 index 0000000..98985c0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCI_A0_ISR", "_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html#a7d5728ccc412d2d610500fa338c2d003", null ], + [ "RXData", "_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html#a597ef8ed788642728c57f66b3a21544f", null ], + [ "TXData", "_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c_source.html new file mode 100644 index 0000000..bdc3a86 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__master_8c_source.html @@ -0,0 +1,278 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_a_spi/eusci_a_spi_ex1_master.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_a_spi_ex1_master.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*****************************************************************************
+
74 //*****************************************************************************
+
75 
+
76 #include "driverlib.h"
+
77 
+
78 uint8_t RXData = 0;
+
79 uint8_t TXData = 0;
+
80 
+
81 void main(void)
+
82 {
+
83  volatile uint16_t i;
+
84 
+
85  //Stop watchdog timer
+
86  WDT_A_hold(WDT_A_BASE);
+
87 
+
88  /*
+
89  * Select Port 1
+
90  * Set Pin 0 as output
+
91  */
+
92  GPIO_setAsOutputPin(
+
93  GPIO_PORT_P1,
+
94  GPIO_PIN0
+
95  );
+
96  /*
+
97  * Select Port 1
+
98  * Set Pin 0 to output Low.
+
99  */
+ +
101  GPIO_PORT_P1,
+
102  GPIO_PIN0
+
103  );
+
104 
+
105  //Set DCO frequency to max DCO setting
+
106  CS_setDCOFreq(CS_DCORSEL_0, CS_DCOFSEL_3);
+
107  //Select DCO as the clock source for SMCLK with no frequency divider
+
108  CS_initClockSignal(CS_SMCLK, CS_DCOCLK_SELECT, CS_CLOCK_DIVIDER_1);
+
109 
+
110  /*
+
111  * Select Port 1
+
112  * Set Pin 5 to input Secondary Module Function, (UCA0CLK).
+
113  */
+
114  GPIO_setAsPeripheralModuleFunctionInputPin(
+
115  GPIO_PORT_P1,
+
116  GPIO_PIN5,
+
117  GPIO_SECONDARY_MODULE_FUNCTION
+
118  );
+
119 
+
120  /*
+
121  * Select Port 2
+
122  * Set Pin 0, 1 to input Secondary Module Function, (UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI).
+
123  */
+
124  GPIO_setAsPeripheralModuleFunctionInputPin(
+
125  GPIO_PORT_P2,
+
126  GPIO_PIN0 + GPIO_PIN1,
+
127  GPIO_SECONDARY_MODULE_FUNCTION
+
128  );
+
129 
+
130  /*
+
131  * Disable the GPIO power-on default high-impedance mode to activate
+
132  * previously configured port settings
+
133  */
+
134  PMM_unlockLPM5();
+
135 
+
136  //Initialize Master
+
137  EUSCI_A_SPI_initMasterParam param = {0};
+
138  param.selectClockSource = EUSCI_A_SPI_CLOCKSOURCE_SMCLK;
+
139  param.clockSourceFrequency = CS_getSMCLK();
+
140  param.desiredSpiClock = 500000;
+
141  param.msbFirst = EUSCI_A_SPI_MSB_FIRST;
+
142  param.clockPhase = EUSCI_A_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
+
143  param.clockPolarity = EUSCI_A_SPI_CLOCKPOLARITY_INACTIVITY_HIGH;
+
144  param.spiMode = EUSCI_A_SPI_3PIN;
+
145  EUSCI_A_SPI_initMaster(EUSCI_A0_BASE, &param);
+
146 
+
147  //Enable SPI module
+
148  EUSCI_A_SPI_enable(EUSCI_A0_BASE);
+
149 
+
150  EUSCI_A_SPI_clearInterrupt(EUSCI_A0_BASE,
+
151  EUSCI_A_SPI_RECEIVE_INTERRUPT);
+
152  // Enable USCI_A0 RX interrupt
+
153  EUSCI_A_SPI_enableInterrupt(EUSCI_A0_BASE,
+
154  EUSCI_A_SPI_RECEIVE_INTERRUPT);
+
155 
+
156  //Wait for slave to initialize
+
157  __delay_cycles(100);
+
158 
+
159  TXData = 0x1; // Holds TX data
+
160 
+
161  //USCI_A0 TX buffer ready?
+
162  while (!EUSCI_A_SPI_getInterruptStatus(EUSCI_A0_BASE,
+
163  EUSCI_A_SPI_TRANSMIT_INTERRUPT)) ;
+
164 
+
165  //Transmit Data to slave
+
166  EUSCI_A_SPI_transmitData(EUSCI_A0_BASE, TXData);
+
167 
+
168  __bis_SR_register(LPM0_bits + GIE); // CPU off, enable interrupts
+
169  __no_operation(); // Remain in LPM0
+
170 }
+
171 
+
172 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
173 #pragma vector=USCI_A0_VECTOR
+
174 __interrupt
+
175 #elif defined(__GNUC__)
+
176 __attribute__((interrupt(USCI_A0_VECTOR)))
+
177 #endif
+
178 void USCI_A0_ISR(void)
+
179 {
+
180  switch(__even_in_range(UCA0IV, USCI_SPI_UCTXIFG))
+
181  {
+
182  case USCI_SPI_UCRXIFG: // UCRXIFG
+
183  //USCI_A0 TX buffer ready?
+
184  while (!EUSCI_A_SPI_getInterruptStatus(EUSCI_A0_BASE,
+
185  EUSCI_A_SPI_TRANSMIT_INTERRUPT));
+
186 
+
187  RXData = EUSCI_A_SPI_receiveData(EUSCI_A0_BASE);
+
188 
+
189  //Increment data
+
190  TXData++;
+
191 
+
192  //Send next value
+
193  EUSCI_A_SPI_transmitData(EUSCI_A0_BASE,
+
194  TXData
+
195  );
+
196 
+
197  //Delay between transmissions for slave to process information
+
198  __delay_cycles(40);
+
199  break;
+
200  default:
+
201  break;
+
202  }
+
203 }
+
204 
+
uint8_t RXData
+
void main(void)
+
void USCI_A0_ISR(void)
+
uint8_t TXData
+
MPU_initThreeSegmentsParam param
+ + +
__no_operation()
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html new file mode 100644 index 0000000..576670a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html @@ -0,0 +1,219 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_a_spi/eusci_a_spi_ex1_slave.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_a_spi_ex1_slave.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCI_A0_ISR (void)
 
+ + + + + +

+Variables

uint8_t transmitData = 0x01
 
uint8_t receiveData = 0x00
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 77 of file eusci_a_spi_ex1_slave.c.

+ +

References param.

+ +
+
+ +

◆ USCI_A0_ISR()

+ +
+
+ + + + + + + + +
void USCI_A0_ISR (void )
+
+ +

Definition at line 160 of file eusci_a_spi_ex1_slave.c.

+ +

References receiveData, and transmitData.

+ +
+
+

Variable Documentation

+ +

◆ receiveData

+ +
+
+ + + + +
uint8_t receiveData = 0x00
+
+ +

Definition at line 75 of file eusci_a_spi_ex1_slave.c.

+ +
+
+ +

◆ transmitData

+ +
+
+ + + + +
uint8_t transmitData = 0x01
+
+

SPI slave talks to SPI master using 3-wire mode. Data is received from master and data from slave is then transmitted back to master. USCI RX ISR is used to handle communication, CPU normally in LPM4. Prior to initial data exchange, master pulses slaves RST for complete reset.

+

Use with eusci_spi_ex1_master code example. If the slave is in debug mode, the reset signal from the master will conflict with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.

+

+Tesed on MSP430FR5969

+

/|\ | | | | | Master—+->|RST | | | | P2.0|-> Data Out (UCA0SIMO) | | | P2.1|<- Data In (UCA0SOMI) | | | P1.5|<- Serial Clock Out (UCA0CLK)

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • SPI peripheral
  • +
  • GPIO Port peripheral (for SPI pins)
  • +
  • UCA0SIMO
  • +
  • UCA0SOMI
  • +
  • UCA0CLK
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_A0_VECTOR
  • +
+ +

Definition at line 75 of file eusci_a_spi_ex1_slave.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.js new file mode 100644 index 0000000..854577d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCI_A0_ISR", "_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html#a7d5728ccc412d2d610500fa338c2d003", null ], + [ "receiveData", "_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html#a216001f02f93a2c0b512c1b8724bdc60", null ], + [ "transmitData", "_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c.html#ac23b8f721ac5b7a4315ba2c3409b9e0a", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c_source.html new file mode 100644 index 0000000..b720485 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__spi_2eusci__a__spi__ex1__slave_8c_source.html @@ -0,0 +1,259 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_a_spi/eusci_a_spi_ex1_slave.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_a_spi_ex1_slave.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*****************************************************************************
+
70 //
+
71 //*****************************************************************************
+
72 
+
73 #include "driverlib.h"
+
74 
+
75 uint8_t transmitData = 0x01, receiveData = 0x00;
+
76 
+
77 void main(void)
+
78 {
+
79  //Stop watchdog timer
+
80  WDT_A_hold(WDT_A_BASE);
+
81 
+
82  // Configure Pins for LFXIN
+
83  //Set PJ.4 and PJ.5 as Primary Module Function Input.
+
84  /*
+
85 
+
86  * Select Port J
+
87  * Set Pin 4, 5 to input Primary Module Function, (LFXIN).
+
88  */
+
89  GPIO_setAsPeripheralModuleFunctionInputPin(
+
90  GPIO_PORT_PJ,
+
91  GPIO_PIN4 + GPIO_PIN5,
+
92  GPIO_PRIMARY_MODULE_FUNCTION
+
93  );
+
94 
+
95  // Configure SPI pins
+
96  // Configure Pins for UCA0CLK
+
97  //Set P1.5 as Secondary Module Function Input.
+
98  /*
+
99 
+
100  * Select Port 1
+
101  * Set Pin 5 to input Secondary Module Function, (UCA0CLK).
+
102  */
+
103  GPIO_setAsPeripheralModuleFunctionInputPin(
+
104  GPIO_PORT_P1,
+
105  GPIO_PIN5,
+
106  GPIO_SECONDARY_MODULE_FUNCTION
+
107  );
+
108  // Configure Pins for UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI
+
109  //Set P2.0, P2.1 as Secondary Module Function Input.
+
110  /*
+
111 
+
112  * Select Port 2
+
113  * Set Pin 0, 1 to input Secondary Module Function, (UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI).
+
114  */
+
115  GPIO_setAsPeripheralModuleFunctionInputPin(
+
116  GPIO_PORT_P2,
+
117  GPIO_PIN0 + GPIO_PIN1,
+
118  GPIO_SECONDARY_MODULE_FUNCTION
+
119  );
+
120 
+
121  /*
+
122  * Disable the GPIO power-on default high-impedance mode to activate
+
123  * previously configured port settings
+
124  */
+
125  PMM_unlockLPM5();
+
126 
+
127  //Initialize slave to MSB first, inactive high clock polarity and 3 wire SPI
+
128  EUSCI_A_SPI_initSlaveParam param = {0};
+
129  param.msbFirst = EUSCI_A_SPI_MSB_FIRST;
+
130  param.clockPhase = EUSCI_A_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
+
131  param.clockPolarity = EUSCI_A_SPI_CLOCKPOLARITY_INACTIVITY_HIGH;
+
132  param.spiMode = EUSCI_A_SPI_3PIN;
+
133  EUSCI_A_SPI_initSlave(EUSCI_A0_BASE, &param);
+
134 
+
135  //Enable SPI Module
+
136  EUSCI_A_SPI_enable(EUSCI_A0_BASE);
+
137 
+
138  EUSCI_A_SPI_clearInterrupt(EUSCI_A0_BASE,
+
139  EUSCI_A_SPI_RECEIVE_INTERRUPT);
+
140 
+
141  //Enable Receive interrupt
+
142  EUSCI_A_SPI_enableInterrupt(EUSCI_A0_BASE,
+
143  EUSCI_A_SPI_RECEIVE_INTERRUPT
+
144  );
+
145 
+
146  __bis_SR_register(LPM0_bits + GIE); // Enter LPM0, enable interrupts
+
147 }
+
148 
+
149 //******************************************************************************
+
150 //
+
151 //This is the USCI_A0 interrupt vector service routine.
+
152 //
+
153 //******************************************************************************
+
154 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
155 #pragma vector=USCI_A0_VECTOR
+
156 __interrupt
+
157 #elif defined(__GNUC__)
+
158 __attribute__((interrupt(USCI_A0_VECTOR)))
+
159 #endif
+
160 void USCI_A0_ISR (void)
+
161 {
+
162  switch(__even_in_range(UCA0IV, USCI_SPI_UCTXIFG))
+
163  {
+
164  case USCI_SPI_UCRXIFG: // UCRXIFG
+
165  //USCI_A0 TX buffer ready?
+
166  while (!EUSCI_A_SPI_getInterruptStatus(EUSCI_A0_BASE,
+
167  EUSCI_A_SPI_TRANSMIT_INTERRUPT
+
168  ));
+
169 
+
170  //Transmit data to master
+
171  EUSCI_A_SPI_transmitData(EUSCI_A0_BASE,
+ +
173  );
+
174 
+
175  //Receive data from master
+
176  receiveData = EUSCI_A_SPI_receiveData(EUSCI_A0_BASE);
+
177 
+
178  //Increment data to be transmitted
+
179  transmitData++;
+
180  break;
+
181  default:
+
182  break;
+
183  }
+
184 }
+
185 
+
uint8_t receiveData
+
void main(void)
+
void USCI_A0_ISR(void)
+
uint8_t transmitData
+
MPU_initThreeSegmentsParam param
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html new file mode 100644 index 0000000..1c3dfa4 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html @@ -0,0 +1,259 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_a_uart/eusci_a_uart_ex1_loopbackAdvanced.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_a_uart_ex1_loopbackAdvanced.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCI_A0_ISR (void)
 
+ + + + + + + + + +

+Variables

uint16_t i
 
uint8_t RXData = 0
 
uint8_t TXData = 0
 
uint8_t check = 0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 68 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +

References check, param, STATUS_FAIL, and TXData.

+ +
+
+ +

◆ USCI_A0_ISR()

+ +
+
+ + + + + + + + +
void USCI_A0_ISR (void )
+
+ +

Definition at line 166 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +

References check, RXData, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ check

+ +
+
+ + + + +
uint8_t check = 0
+
+ +

Definition at line 66 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +
+
+ +

◆ i

+ +
+
+ + + + +
uint16_t i
+
+

EUSCI_A0 External Loopback test using EUSCI_A_UART_init API

+

Description: This demo connects TX to RX of the MSP430 UART The example code shows proper initialization of registers and interrupts to receive and transmit data.

+

ACLK = BRCLK = 32.768kHz, MCLK = SMCLK = DCO = ~1MHz

+
 Tested on MSP430FR5969
+        -----------------
+  RST -|     P2.0/UCA0TXD|----|
+       |                 |    |
+       |                 |    |
+       |     P2.1/UCA0RXD|----|
+       |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • UART peripheral
  • +
  • GPIO Port peripheral (for UART pins)
  • +
  • UCA0TXD
  • +
  • UCA0RXD
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_A0_VECTOR.
  • +
+ +

Definition at line 64 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +
+
+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData = 0
+
+ +

Definition at line 65 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 65 of file eusci_a_uart_ex1_loopbackAdvanced.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.js new file mode 100644 index 0000000..93ad8d8 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.js @@ -0,0 +1,9 @@ +var _m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCI_A0_ISR", "_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#a7d5728ccc412d2d610500fa338c2d003", null ], + [ "check", "_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#ad47d5b159b4c95a163edac9d1b659751", null ], + [ "i", "_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#a78f7a37dba921e0b0347b960fb40bc51", null ], + [ "RXData", "_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#a597ef8ed788642728c57f66b3a21544f", null ], + [ "TXData", "_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c_source.html new file mode 100644 index 0000000..ba2adfc --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__a__uart_2eusci__a__uart__ex1__loopback_advanced_8c_source.html @@ -0,0 +1,269 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_a_uart/eusci_a_uart_ex1_loopbackAdvanced.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_a_uart_ex1_loopbackAdvanced.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 uint16_t i;
+
65 uint8_t RXData = 0, TXData = 0;
+
66 uint8_t check = 0;
+
67 
+
68 void main(void)
+
69 {
+
70  // stop watchdog
+
71  WDT_A_hold(WDT_A_BASE);
+
72 
+
73  // LFXT Setup
+
74  //Set PJ.4 and PJ.5 as Primary Module Function Input.
+
75  /*
+
76 
+
77  * Select Port J
+
78  * Set Pin 4, 5 to input Primary Module Function, LFXT.
+
79  */
+
80  GPIO_setAsPeripheralModuleFunctionInputPin(
+
81  GPIO_PORT_PJ,
+
82  GPIO_PIN4 + GPIO_PIN5,
+
83  GPIO_PRIMARY_MODULE_FUNCTION
+
84  );
+
85 
+
86  //Set DCO frequency to 1 MHz
+
87  CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_0);
+
88  //Set external clock frequency to 32.768 KHz
+
89  CS_setExternalClockSource(32768,0);
+
90  //Set ACLK=LFXT
+
91  CS_initClockSignal(CS_ACLK,CS_LFXTCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
92  //Set SMCLK = DCO with frequency divider of 1
+
93  CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
94  //Set MCLK = DCO with frequency divider of 1
+
95  CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
96  //Start XT1 with no time out
+
97  CS_turnOnLFXT(CS_LFXT_DRIVE_0);
+
98 
+
99 
+
100  // Configure UART pins
+
101  //Set P2.0 and P2.1 as Secondary Module Function Input.
+
102  /*
+
103 
+
104  * Select Port 2d
+
105  * Set Pin 0, 1 to input Secondary Module Function, (UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI).
+
106  */
+
107  GPIO_setAsPeripheralModuleFunctionInputPin(
+
108  GPIO_PORT_P2,
+
109  GPIO_PIN0 + GPIO_PIN1,
+
110  GPIO_SECONDARY_MODULE_FUNCTION
+
111  );
+
112 
+
113  /*
+
114  * Disable the GPIO power-on default high-impedance mode to activate
+
115  * previously configured port settings
+
116  */
+
117  PMM_unlockLPM5();
+
118 
+
119  // Configure UART
+
120  EUSCI_A_UART_initParam param = {0};
+
121  param.selectClockSource = EUSCI_A_UART_CLOCKSOURCE_ACLK;
+
122  param.clockPrescalar = 3;
+
123  param.firstModReg = 0;
+
124  param.secondModReg = 92;
+
125  param.parity = EUSCI_A_UART_NO_PARITY;
+
126  param.msborLsbFirst = EUSCI_A_UART_LSB_FIRST;
+
127  param.numberofStopBits = EUSCI_A_UART_ONE_STOP_BIT;
+
128  param.uartMode = EUSCI_A_UART_MODE;
+
129  param.overSampling = EUSCI_A_UART_LOW_FREQUENCY_BAUDRATE_GENERATION;
+
130 
+
131  if (STATUS_FAIL == EUSCI_A_UART_init(EUSCI_A0_BASE, &param)) {
+
132  return;
+
133  }
+
134 
+
135  EUSCI_A_UART_enable(EUSCI_A0_BASE);
+
136 
+
137  EUSCI_A_UART_clearInterrupt(EUSCI_A0_BASE,
+
138  EUSCI_A_UART_RECEIVE_INTERRUPT);
+
139 
+
140  // Enable USCI_A0 RX interrupt
+
141  EUSCI_A_UART_enableInterrupt(EUSCI_A0_BASE,
+
142  EUSCI_A_UART_RECEIVE_INTERRUPT); // Enable interrupt
+
143 
+
144  __enable_interrupt();
+
145  while (1)
+
146  {
+
147  TXData = TXData+1; // Increment TX data
+
148  // Load data onto buffer
+
149  EUSCI_A_UART_transmitData(EUSCI_A0_BASE,
+
150  TXData);
+
151  while(check != 1);
+
152  check = 0;
+
153  }
+
154 }
+
155 //******************************************************************************
+
156 //
+
157 //This is the USCI_A0 interrupt vector service routine.
+
158 //
+
159 //******************************************************************************
+
160 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
161 #pragma vector=USCI_A0_VECTOR
+
162 __interrupt
+
163 #elif defined(__GNUC__)
+
164 __attribute__((interrupt(USCI_A0_VECTOR)))
+
165 #endif
+
166 void USCI_A0_ISR(void)
+
167 {
+
168  switch(__even_in_range(UCA0IV,USCI_UART_UCTXCPTIFG))
+
169  {
+
170  case USCI_NONE: break;
+
171  case USCI_UART_UCRXIFG:
+
172  RXData = EUSCI_A_UART_receiveData(EUSCI_A0_BASE);
+
173  if(!(RXData == TXData)) // Check value
+
174  {
+
175  while(1);
+
176  }
+
177  check =1;
+
178  break;
+
179  case USCI_UART_UCTXIFG: break;
+
180  case USCI_UART_UCSTTIFG: break;
+
181  case USCI_UART_UCTXCPTIFG: break;
+
182  }
+
183 }
+ + + + + +
MPU_initThreeSegmentsParam param
+
void USCI_A0_ISR(void)
+ +
#define STATUS_FAIL
Definition: hw_memmap.h:23
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html new file mode 100644 index 0000000..3825700 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html @@ -0,0 +1,238 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex1_masterRxMultiple.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex1_masterRxMultiple.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
#define RXCOUNT   0x05
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t RXData
 
+

Macro Definition Documentation

+ +

◆ RXCOUNT

+ +
+
+ + + + +
#define RXCOUNT   0x05
+
+ +

Definition at line 75 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +
+
+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

i2c_master_rx_multi_int

+

This example shows how to configure the I2C module as a master for multi-byte reception with teh help of interrupts. The address of the slave module that the master communicating with also set in this example. This example uses the interrupt driven mode to receive data.

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR
  • +
+ +

Definition at line 69 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 99 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +

References __delay_cycles(), param, RXCOUNT, and SLAVE_ADDRESS.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 196 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +

References __bic_SR_register_on_exit(), RXCOUNT, and RXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData
+
+ +

Definition at line 98 of file eusci_b_i2c_ex1_masterRxMultiple.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.js new file mode 100644 index 0000000..94a624d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.js @@ -0,0 +1,8 @@ +var _m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c = +[ + [ "RXCOUNT", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#a70033793a4008a84a5022c8e8467c71b", null ], + [ "SLAVE_ADDRESS", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "RXData", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c.html#a597ef8ed788642728c57f66b3a21544f", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c_source.html new file mode 100644 index 0000000..68688e3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__master_rx_multiple_8c_source.html @@ -0,0 +1,345 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex1_masterRxMultiple.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex1_masterRxMultiple.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
35 //
+
55 //
+
56 //*****************************************************************************
+
57 
+
58 //*****************************************************************************
+
59 //
+
60 //Set the address for slave module. This is a 7-bit address sent in the
+
61 //following format:
+
62 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
63 //
+
64 //A zero in the "RS" position of the first byte means that the master
+
65 //transmits (sends) data to the selected slave, and a one in this position
+
66 //means that the master receives data from the slave.
+
67 //
+
68 //*****************************************************************************
+
69 #define SLAVE_ADDRESS 0x48
+
70 //*****************************************************************************
+
71 //
+
72 //Specify Expected Receive data count.
+
73 //
+
74 //*****************************************************************************
+
75 #define RXCOUNT 0x05
+
76 
+
77 
+
78 //******************************************************************************
+
79 // MSP430FR59xx Demo - USCI_B0 I2C Master RX multiple bytes from MSP430 Slave
+
80 //
+
81 // Description: This demo connects two MSP430's via the I2C bus. The master
+
82 // reads 5 bytes from the slave. This is the MASTER CODE. The data from the slave
+
83 // transmitter begins at 0 and increments with each transfer.
+
84 // The USCI_B0 RX interrupt is used to know when new data has been received.
+
85 // ACLK = n/a, MCLK = SMCLK = BRCLK = DCO = 1MHz
+
86 //
+
87 // /|\ /|\
+
88 // MSP430FR5969 10k 10k MSP430F5969
+
89 // slave | | master
+
90 // ----------------- | | -----------------
+
91 // -|XIN P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA XIN|-
+
92 // | | | | | 32kHz
+
93 // -|XOUT | | | XOUT|-
+
94 // | P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL |
+
95 // | | | P1.0|--> LED
+
96 //
+
97 //******************************************************************************
+
98 uint8_t RXData;
+
99 void main (void)
+
100 {
+
101  WDT_A_hold(WDT_A_BASE);
+
102 
+
103  //Set DCO frequency to 1MHz
+
104  CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_0);
+
105  //Set ACLK = VLO with frequency divider of 1
+
106  CS_initClockSignal(CS_ACLK,CS_VLOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
107  //Set SMCLK = DCO with frequency divider of 1
+
108  CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
109  //Set MCLK = DCO with frequency divider of 1
+
110  CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
111 
+
112  // Configure Pins for I2C
+
113  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
114  /*
+
115 
+
116  * Select Port 1
+
117  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
118  */
+
119  GPIO_setAsPeripheralModuleFunctionInputPin(
+
120  GPIO_PORT_P1,
+
121  GPIO_PIN6 + GPIO_PIN7,
+
122  GPIO_SECONDARY_MODULE_FUNCTION
+
123  );
+
124 
+
125  //Set P1.0 as an output pin.
+
126  /*
+
127 
+
128  * Select Port 1
+
129  * Set Pin 0 as output
+
130  */
+
131  GPIO_setAsOutputPin(
+
132  GPIO_PORT_P1,
+
133  GPIO_PIN0
+
134  );
+
135 
+
136  /*
+
137  * Disable the GPIO power-on default high-impedance mode to activate
+
138  * previously configured port settings
+
139  */
+
140  PMM_unlockLPM5();
+
141 
+
142  EUSCI_B_I2C_initMasterParam param = {0};
+
143  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
144  param.i2cClk = CS_getSMCLK();
+
145  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
146  param.byteCounterThreshold = RXCOUNT;
+
147  param.autoSTOPGeneration = EUSCI_B_I2C_SEND_STOP_AUTOMATICALLY_ON_BYTECOUNT_THRESHOLD;
+
148  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
149 
+
150  //Specify slave address
+
151  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
153  );
+
154 
+
155  //Set Master in receive mode
+
156  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
157  EUSCI_B_I2C_RECEIVE_MODE
+
158  );
+
159 
+
160  //Enable I2C Module to start operations
+
161  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
162 
+
163  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
164  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
165  EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT +
+
166  EUSCI_B_I2C_NAK_INTERRUPT
+
167  );
+
168 
+
169  //Enable master Receive interrupt
+
170  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
171  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
172  EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT +
+
173  EUSCI_B_I2C_NAK_INTERRUPT
+
174  );
+
175 
+
176  while (1)
+
177  {
+
178  __delay_cycles(2000);
+
179 
+
180  while (EUSCI_B_I2C_SENDING_STOP ==
+
181  EUSCI_B_I2C_masterIsStopSent(EUSCI_B0_BASE));
+
182 
+
183  EUSCI_B_I2C_masterReceiveStart(EUSCI_B0_BASE);
+
184 
+
185  // Enter LPM0 w/ interrupt
+
186  __bis_SR_register(CPUOFF+GIE);
+
187  }
+
188 }
+
189 
+
190 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
191 #pragma vector=USCI_B0_VECTOR
+
192 __interrupt
+
193 #elif defined(__GNUC__)
+
194 __attribute__((interrupt(USCI_B0_VECTOR)))
+
195 #endif
+
196 void USCIB0_ISR(void)
+
197 {
+
198  static uint8_t count = 0;
+
199  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
200  {
+
201  case USCI_NONE: // No interrupts break;
+
202  break;
+
203  case USCI_I2C_UCALIFG: // Arbitration lost
+
204  break;
+
205  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
206  EUSCI_B_I2C_masterReceiveStart(EUSCI_B0_BASE);
+
207  break;
+
208  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
209  break;
+
210  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
211  break;
+
212  case USCI_I2C_UCRXIFG3: // RXIFG3
+
213  break;
+
214  case USCI_I2C_UCTXIFG3: // TXIFG3
+
215  break;
+
216  case USCI_I2C_UCRXIFG2: // RXIFG2
+
217  break;
+
218  case USCI_I2C_UCTXIFG2: // TXIFG2
+
219  break;
+
220  case USCI_I2C_UCRXIFG1: // RXIFG1
+
221  break;
+
222  case USCI_I2C_UCTXIFG1: // TXIFG1
+
223  break;
+
224  case USCI_I2C_UCRXIFG0: // RXIFG0
+
225  // Get RX data
+
226  RXData = EUSCI_B_I2C_masterReceiveSingle(
+
227  EUSCI_B0_BASE
+
228  );
+
229  if (++count >= RXCOUNT) {
+
230  count = 0;
+
231  __bic_SR_register_on_exit(CPUOFF); // Exit LPM0
+
232  }
+
233  break; // Vector 24: RXIFG0 break;
+
234  case USCI_I2C_UCTXIFG0: // TXIFG0
+
235  break;
+
236  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
237  GPIO_toggleOutputOnPin(
+
238  GPIO_PORT_P1,
+
239  GPIO_PIN0
+
240  );
+
241  break;
+
242  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
243  break;
+
244  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
245  break;
+
246  default:
+
247  break;
+
248  }
+
249 }
+
250 
+ +
void USCIB0_ISR(void)
+ +
MPU_initThreeSegmentsParam param
+ + + +
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html new file mode 100644 index 0000000..976aad2 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html @@ -0,0 +1,228 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex1_slaveTxMultiple.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex1_slaveTxMultiple.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t TXData = 0
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

EUSCI_B0 I2C Slave TX multiple bytes to MSP430 Master

+

Description: This demo connects two MSP430's via the I2C bus. The master reads from the slave. This is the SLAVE code. The TX data begins at 0 and is incremented each time it is sent. A stop condition is used as a trigger to initialize the outgoing data. The USCI_B0 TX interrupt is used to know when to TX. Tested on MSP430FR5969

                          /|\  /|\
+                           10k  10k
+             slave         |    |        master
+       -----------------   |    |   -----------------
+     -|XIN  P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA  XIN|-
+      |                 |  |       |                 |
+     -|XOUT             |  |       |             XOUT|-
+      |     P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL     |
+      |                 |          |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 81 of file eusci_b_i2c_ex1_slaveTxMultiple.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 85 of file eusci_b_i2c_ex1_slaveTxMultiple.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 137 of file eusci_b_i2c_ex1_slaveTxMultiple.c.

+ +

References TXData.

+ +
+
+

Variable Documentation

+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 83 of file eusci_b_i2c_ex1_slaveTxMultiple.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.js new file mode 100644 index 0000000..652b2e9 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "TXData", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c_source.html new file mode 100644 index 0000000..cbd87f7 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex1__slave_tx_multiple_8c_source.html @@ -0,0 +1,257 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex1_slaveTxMultiple.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex1_slaveTxMultiple.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
68 //
+
69 //*****************************************************************************
+
70 //*****************************************************************************
+
71 //
+
72 //Set the address for slave module. This is a 7-bit address sent in the
+
73 //following format:
+
74 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
75 //
+
76 //A zero in the "RS" position of the first byte means that the master
+
77 //transmits (sends) data to the selected slave, and a one in this position
+
78 //means that the master receives data from the slave.
+
79 //
+
80 //*****************************************************************************
+
81 #define SLAVE_ADDRESS 0x48
+
82 
+
83 uint8_t TXData = 0;
+
84 
+
85 void main(void)
+
86 {
+
87  WDT_A_hold(WDT_A_BASE);
+
88 
+
89  // Configure Pins for I2C
+
90  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
91  /*
+
92 
+
93  * Select Port 1
+
94  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
95  */
+
96  GPIO_setAsPeripheralModuleFunctionInputPin(
+
97  GPIO_PORT_P1,
+
98  GPIO_PIN6 + GPIO_PIN7,
+
99  GPIO_SECONDARY_MODULE_FUNCTION
+
100  );
+
101 
+
102  /*
+
103  * Disable the GPIO power-on default high-impedance mode to activate
+
104  * previously configured port settings
+
105  */
+
106  PMM_unlockLPM5();
+
107 
+
108  EUSCI_B_I2C_initSlaveParam param = {0};
+
109  param.slaveAddress = 0x48;
+
110  param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
111  param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
112  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &param);
+
113 
+
114  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
115 
+
116  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
117  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
118  EUSCI_B_I2C_STOP_INTERRUPT
+
119  );
+
120 
+
121  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
122  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
123  EUSCI_B_I2C_STOP_INTERRUPT
+
124  );
+
125 
+
126  // Enter LPM0 w/ interrupts
+
127  __bis_SR_register(CPUOFF + GIE);
+
128  __no_operation();
+
129 }
+
130 
+
131 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
132 #pragma vector=USCI_B0_VECTOR
+
133 __interrupt
+
134 #elif defined(__GNUC__)
+
135 __attribute__((interrupt(USCI_B0_VECTOR)))
+
136 #endif
+
137 void USCIB0_ISR(void)
+
138 {
+
139  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
140  {
+
141  case USCI_NONE: // No interrupts break;
+
142  break;
+
143  case USCI_I2C_UCALIFG: // Arbitration lost
+
144  break;
+
145  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
146  break;
+
147  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
148  break;
+
149  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
150  TXData = 0;
+
151  break;
+
152  case USCI_I2C_UCRXIFG3: // RXIFG3
+
153  break;
+
154  case USCI_I2C_UCTXIFG3: // TXIFG3
+
155  break;
+
156  case USCI_I2C_UCRXIFG2: // RXIFG2
+
157  break;
+
158  case USCI_I2C_UCTXIFG2: // TXIFG2
+
159  break;
+
160  case USCI_I2C_UCRXIFG1: // RXIFG1
+
161  break;
+
162  case USCI_I2C_UCTXIFG1: // TXIFG1
+
163  break;
+
164  case USCI_I2C_UCRXIFG0: // RXIFG0
+
165  break;
+
166  case USCI_I2C_UCTXIFG0: // TXIFG0
+
167  EUSCI_B_I2C_slavePutData(EUSCI_B0_BASE,
+
168  TXData++);
+
169  break;
+
170  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
171  break;
+
172  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
173  break;
+
174  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
175  break;
+
176  default:
+
177  break;
+
178  }
+
179 }
+
void USCIB0_ISR(void)
+
void main(void)
+ +
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html new file mode 100644 index 0000000..fa6839b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html @@ -0,0 +1,204 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex2_masterRxSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex2_masterRxSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + +

+Functions

void main (void)
 
+ + + +

+Variables

uint8_t RXData
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

This example shows how to configure the I2C module as a master for single byte reception in interrupt driven mode. The address of the slave module that the master is communicating with also set in this example.

+

Description: This demo connects two MSP430's via the I2C bus. The master reads from the slave. This is the MASTER CODE. The data from the slave transmitter begins at 0 and increments with each transfer. The USCI_B0 RX interrupt is used to know when new data has been received. ACLK = n/a, MCLK = SMCLK = BRCLK = DCO = 1MHz

                          /|\  /|\
+         MSP430FR5969      10k  10k     MSP430FR5969
+             slave         |    |        master
+       -----------------   |    |   -----------------
+     -|XIN  P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA  XIN|-
+      |                 |  |       |                 | 32kHz
+     -|XOUT             |  |       |             XOUT|-
+      |     P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL     |
+      |                 |          |             P1.0|--> LED
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 82 of file eusci_b_i2c_ex2_masterRxSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 85 of file eusci_b_i2c_ex2_masterRxSingle.c.

+ +

References __delay_cycles(), param, RXData, and SLAVE_ADDRESS.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData
+
+ +

Definition at line 84 of file eusci_b_i2c_ex2_masterRxSingle.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.js new file mode 100644 index 0000000..9d3ed2d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "RXData", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c.html#a597ef8ed788642728c57f66b3a21544f", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c_source.html new file mode 100644 index 0000000..8766f72 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__master_rx_single_8c_source.html @@ -0,0 +1,251 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex2_masterRxSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex2_masterRxSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
55 
+
68 //
+
69 //*****************************************************************************
+
70 //*****************************************************************************
+
71 //
+
72 //Set the address for slave module. This is a 7-bit address sent in the
+
73 //following format:
+
74 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
75 //
+
76 //A zero in the "RS" position of the first byte means that the master
+
77 //transmits (sends) data to the selected slave, and a one in this position
+
78 //means that the master receives data from the slave.
+
79 //
+
80 //*****************************************************************************
+
81 
+
82 #define SLAVE_ADDRESS 0x48
+
83 
+
84 uint8_t RXData;
+
85 void main (void)
+
86 {
+
87  //Stop WDT
+
88  WDT_A_hold(WDT_A_BASE);
+
89 
+
90  //Set DCO frequency to 1MHz
+
91  CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_0);
+
92  //Set ACLK = VLO with frequency divider of 1
+
93  CS_initClockSignal(CS_ACLK,CS_VLOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
94  //Set SMCLK = DCO with frequency divider of 1
+
95  CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
96  //Set MCLK = DCO with frequency divider of 1
+
97  CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
98 
+
99  // Configure Pins for I2C
+
100  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
101  /*
+
102 
+
103  * Select Port 1
+
104  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
105  */
+
106  GPIO_setAsPeripheralModuleFunctionInputPin(
+
107  GPIO_PORT_P1,
+
108  GPIO_PIN6 + GPIO_PIN7,
+
109  GPIO_SECONDARY_MODULE_FUNCTION
+
110  );
+
111 
+
112  //Set P1.0 as an output pin.
+
113  /*
+
114 
+
115  * Select Port 1
+
116  * Set Pin 0 as output
+
117  */
+
118  GPIO_setAsOutputPin(
+
119  GPIO_PORT_P1,
+
120  GPIO_PIN0
+
121  );
+
122 
+
123  /*
+
124  * Disable the GPIO power-on default high-impedance mode to activate
+
125  * previously configured port settings
+
126  */
+
127  PMM_unlockLPM5();
+
128 
+
129  EUSCI_B_I2C_initMasterParam param = {0};
+
130  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
131  param.i2cClk = CS_getSMCLK();
+
132  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
133  param.byteCounterThreshold = 1;
+
134  param.autoSTOPGeneration = EUSCI_B_I2C_SEND_STOP_AUTOMATICALLY_ON_BYTECOUNT_THRESHOLD;
+
135  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
136 
+
137  //Specify slave address
+
138  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
140  );
+
141 
+
142  //Set Master in receive mode
+
143  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
144  EUSCI_B_I2C_RECEIVE_MODE
+
145  );
+
146 
+
147  //Enable I2C Module to start operations
+
148  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
149 
+
150  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
151  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
152  EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT
+
153  );
+
154 
+
155  //Enable master Receive interrupt
+
156  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
157  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
158  EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT
+
159  );
+
160 
+
161  while (1)
+
162  {
+
163  __delay_cycles(2000);
+
164 
+
165  // I2C start condition
+
166  RXData = EUSCI_B_I2C_masterReceiveSingleByte(EUSCI_B0_BASE);
+
167 
+
168  }
+
169 }
+
170 
+
171 
+
172 
+ +
void main(void)
+
MPU_initThreeSegmentsParam param
+
#define SLAVE_ADDRESS
+ +
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html new file mode 100644 index 0000000..7d350a3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html @@ -0,0 +1,227 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex2_slaveTxSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex2_slaveTxSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t TXData = 0x00
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

Description: This demo connects two MSP430's via the I2C bus. The master reads from the slave. This is the SLAVE code. The TX data begins at 0 and is incremented each time it is sent. A stop condition is used as a trigger to increment the outgoing data. The USCI_B0 TX interrupt is used to know when to TX. Tested on MSP430FR5969

                          /|\  /|\
+                           10k  10k
+             slave         |    |        master
+       -----------------   |    |   -----------------
+     -|XIN  P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA  XIN|-
+      |                 |  |       |                 |
+     -|XOUT             |  |       |             XOUT|-
+      |     P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL     |
+      |                 |          |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 78 of file eusci_b_i2c_ex2_slaveTxSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 82 of file eusci_b_i2c_ex2_slaveTxSingle.c.

+ +

References __no_operation(), param, and SLAVE_ADDRESS.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 140 of file eusci_b_i2c_ex2_slaveTxSingle.c.

+ +

References TXData.

+ +
+
+

Variable Documentation

+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0x00
+
+ +

Definition at line 80 of file eusci_b_i2c_ex2_slaveTxSingle.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.js new file mode 100644 index 0000000..c0aba07 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "TXData", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c_source.html new file mode 100644 index 0000000..9f3f3d3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex2__slave_tx_single_8c_source.html @@ -0,0 +1,265 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex2_slaveTxSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex2_slaveTxSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
66 //*****************************************************************************
+
67 //*****************************************************************************
+
68 //
+
69 //Set the address for slave module. This is a 7-bit address sent in the
+
70 //following format:
+
71 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
72 //
+
73 //A zero in the "RS" position of the first byte means that the master
+
74 //transmits (sends) data to the selected slave, and a one in this position
+
75 //means that the master receives data from the slave.
+
76 //
+
77 //*****************************************************************************
+
78 #define SLAVE_ADDRESS 0x48
+
79 
+
80 uint8_t TXData = 0x00;
+
81 
+
82 void main(void)
+
83 {
+
84  WDT_A_hold(WDT_A_BASE);
+
85 
+
86  // Configure Pins for I2C
+
87  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
88  /*
+
89 
+
90  * Select Port 1
+
91  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
92  */
+
93  GPIO_setAsPeripheralModuleFunctionInputPin(
+
94  GPIO_PORT_P1,
+
95  GPIO_PIN6 + GPIO_PIN7,
+
96  GPIO_SECONDARY_MODULE_FUNCTION
+
97  );
+
98 
+
99  /*
+
100  * Disable the GPIO power-on default high-impedance mode to activate
+
101  * previously configured port settings
+
102  */
+
103  PMM_unlockLPM5();
+
104 
+
105  // eUSCI configuration
+
106  EUSCI_B_I2C_initSlaveParam param = {0};
+
107  param.slaveAddress = SLAVE_ADDRESS;
+
108  param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
109  param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
110  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &param);
+
111 
+
112  //Enable I2C Module to start operations
+
113  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
114 
+
115  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
116  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
117  EUSCI_B_I2C_STOP_INTERRUPT
+
118  );
+
119 
+
120  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
121  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
122  EUSCI_B_I2C_STOP_INTERRUPT
+
123  );
+
124 
+
125  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
126  __no_operation();
+
127 }
+
128 
+
129 //******************************************************************************
+
130 //
+
131 //This is the USCI_B0 interrupt vector service routine.
+
132 //
+
133 //******************************************************************************
+
134 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
135 #pragma vector=USCI_B0_VECTOR
+
136 __interrupt
+
137 #elif defined(__GNUC__)
+
138 __attribute__((interrupt(USCI_B0_VECTOR)))
+
139 #endif
+
140 void USCIB0_ISR(void)
+
141 {
+
142  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
143  {
+
144  case USCI_NONE: // No interrupts break;
+
145  break;
+
146  case USCI_I2C_UCALIFG: // Arbitration lost
+
147  break;
+
148  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
149  break;
+
150  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
151  break;
+
152  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
153  TXData++;
+
154  break;
+
155  case USCI_I2C_UCRXIFG3: // RXIFG3
+
156  break;
+
157  case USCI_I2C_UCTXIFG3: // TXIFG3
+
158  break;
+
159  case USCI_I2C_UCRXIFG2: // RXIFG2
+
160  break;
+
161  case USCI_I2C_UCTXIFG2: // TXIFG2
+
162  break;
+
163  case USCI_I2C_UCRXIFG1: // RXIFG1
+
164  break;
+
165  case USCI_I2C_UCTXIFG1: // TXIFG1
+
166  break;
+
167  case USCI_I2C_UCRXIFG0: // RXIFG0
+
168  break;
+
169  case USCI_I2C_UCTXIFG0: // TXIFG0
+
170  EUSCI_B_I2C_slavePutData(EUSCI_B0_BASE,
+
171  TXData
+
172  );
+
173  break;
+
174  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
175  break;
+
176  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
177  break;
+
178  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
179  break;
+
180  default:
+
181  break;
+
182  }
+
183 }
+
184 
+
void USCIB0_ISR(void)
+
void main(void)
+ +
MPU_initThreeSegmentsParam param
+
#define SLAVE_ADDRESS
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html new file mode 100644 index 0000000..e163d47 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html @@ -0,0 +1,247 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex3_masterTxMultiple.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex3_masterTxMultiple.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + + + +

+Variables

uint8_t TXData =0
 
uint8_t TXByteCtr
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

This example shows how to configure the I2C module as a master for multi byte transmission in interrupt driven mode. The address of the slave module is set in this example.

+

Demo - EUSCI_B0 I2C Master TX multiple bytes to MSP430 Slave

+

Description: This demo connects two MSP430's via the I2C bus. The master transmits to the slave. This is the MASTER CODE. It cntinuously transmits an array of data and demonstrates how to implement an I2C master transmitter sending multiple bytes using the USCI_B0 TX interrupt. ACLK = n/a, MCLK = SMCLK = BRCLK = default DCO = ~1.045MHz

                          /|\  /|\
+          MSP430FR5969    10k  10k      MSP430FR5969
+             slave         |    |         master
+       -----------------   |    |   -----------------
+     -|XIN  P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA  XIN|-
+      |                 |  |       |                 |
+     -|XOUT             |  |       |             XOUT|-
+      |     P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL     |
+      |                 |          |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 82 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 87 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +

References __delay_cycles(), param, SLAVE_ADDRESS, TXByteCtr, and TXData.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 180 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +

References __bic_SR_register_on_exit(), TXByteCtr, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ TXByteCtr

+ +
+
+ + + + +
uint8_t TXByteCtr
+
+ +

Definition at line 85 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData =0
+
+ +

Definition at line 84 of file eusci_b_i2c_ex3_masterTxMultiple.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.js new file mode 100644 index 0000000..59d487d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.js @@ -0,0 +1,8 @@ +var _m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "TXByteCtr", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#a442fc7a9731fc8e66469e62429b32219", null ], + [ "TXData", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c_source.html new file mode 100644 index 0000000..007fc52 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__master_tx_multiple_8c_source.html @@ -0,0 +1,292 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex3_masterTxMultiple.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex3_masterTxMultiple.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
68 //
+
69 
+
70 //******************************************************************************
+
71 //*****************************************************************************
+
72 //
+
73 //Set the address for slave module. This is a 7-bit address sent in the
+
74 //following format:
+
75 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
76 //
+
77 //A zero in the "RS" position of the first byte means that the master
+
78 //transmits (sends) data to the selected slave, and a one in this position
+
79 //means that the master receives data from the slave.
+
80 //
+
81 //*****************************************************************************
+
82 #define SLAVE_ADDRESS 0x48
+
83 
+
84 uint8_t TXData =0; // Pointer to TX data
+
85 uint8_t TXByteCtr;
+
86 
+
87 void main(void)
+
88 {
+
89  WDT_A_hold(WDT_A_BASE);
+
90 
+
91  //Set DCO frequency to 1MHz
+
92  CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_0);
+
93  //Set ACLK = VLO with frequency divider of 1
+
94  CS_initClockSignal(CS_ACLK,CS_VLOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
95  //Set SMCLK = DCO with frequency divider of 1
+
96  CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
97  //Set MCLK = DCO with frequency divider of 1
+
98  CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
99 
+
100  // Configure Pins for I2C
+
101  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
102  /*
+
103 
+
104  * Select Port 1
+
105  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
106  */
+
107  GPIO_setAsPeripheralModuleFunctionInputPin(
+
108  GPIO_PORT_P1,
+
109  GPIO_PIN6 + GPIO_PIN7,
+
110  GPIO_SECONDARY_MODULE_FUNCTION
+
111  );
+
112 
+
113  /*
+
114  * Disable the GPIO power-on default high-impedance mode to activate
+
115  * previously configured port settings
+
116  */
+
117  PMM_unlockLPM5();
+
118 
+
119  EUSCI_B_I2C_initMasterParam param = {0};
+
120  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
121  param.i2cClk = CS_getSMCLK();
+
122  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
123  param.byteCounterThreshold = 0;
+
124  param.autoSTOPGeneration = EUSCI_B_I2C_NO_AUTO_STOP;
+
125  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
126 
+
127  //Specify slave address
+
128  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
130  );
+
131 
+
132  //Set Master in receive mode
+
133  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
134  EUSCI_B_I2C_TRANSMIT_MODE
+
135  );
+
136 
+
137  //Enable I2C Module to start operations
+
138  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
139 
+
140  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
141  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
142  EUSCI_B_I2C_NAK_INTERRUPT
+
143  );
+
144 
+
145  //Enable master Receive interrupt
+
146  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
147  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
148  EUSCI_B_I2C_NAK_INTERRUPT
+
149  );
+
150  while(1)
+
151  {
+
152  __delay_cycles(1000); // Delay between transmissions
+
153  TXByteCtr = 4; // Load TX byte counter
+
154  TXData = 0;
+
155 
+
156  while (EUSCI_B_I2C_SENDING_STOP == EUSCI_B_I2C_masterIsStopSent
+
157  (EUSCI_B0_BASE));
+
158 
+
159  EUSCI_B_I2C_masterSendMultiByteStart(EUSCI_B0_BASE,
+
160  TXData++);
+
161 
+
162  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
163  // Remain in LPM0 until all data
+
164  // is TX'd
+
165  // Increment data byte
+
166  }
+
167 }
+
168 
+
169 //------------------------------------------------------------------------------
+
170 // The USCIAB0TX_ISR is structured such that it can be used to transmit any
+
171 // number of bytes by pre-loading TXByteCtr with the byte count. Also, TXData
+
172 // points to the next byte to transmit.
+
173 //------------------------------------------------------------------------------
+
174 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
175 #pragma vector=USCI_B0_VECTOR
+
176 __interrupt
+
177 #elif defined(__GNUC__)
+
178 __attribute__((interrupt(USCI_B0_VECTOR)))
+
179 #endif
+
180 void USCIB0_ISR(void)
+
181 {
+
182  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
183  {
+
184  case USCI_NONE: // No interrupts break;
+
185  break;
+
186  case USCI_I2C_UCALIFG: // Arbitration lost
+
187  break;
+
188  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
189  //resend start if NACK
+
190  EUSCI_B_I2C_masterSendStart(EUSCI_B0_BASE);
+
191  break;
+
192  case USCI_I2C_UCTXIFG0: // TXIFG0
+
193  // Check TX byte counter
+
194  if (TXByteCtr)
+
195  {
+
196  EUSCI_B_I2C_masterSendMultiByteNext(EUSCI_B0_BASE, TXData++);
+
197  // Decrement TX byte counter
+
198  TXByteCtr--;
+
199  }
+
200  else
+
201  {
+
202  EUSCI_B_I2C_masterSendMultiByteStop(EUSCI_B0_BASE);
+
203  // Exit LPM0
+ +
205  }
+
206  break;
+
207  default:
+
208  break;
+
209  }
+
210 }
+
211 
+ +
void USCIB0_ISR(void)
+ + +
MPU_initThreeSegmentsParam param
+ + +
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html new file mode 100644 index 0000000..9d44808 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html @@ -0,0 +1,209 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex3_slaveRxMultiple.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex3_slaveRxMultiple.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t RXData
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+ +

Definition at line 67 of file eusci_b_i2c_ex3_slaveRxMultiple.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 71 of file eusci_b_i2c_ex3_slaveRxMultiple.c.

+ +

References __no_operation(), param, and SLAVE_ADDRESS.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 130 of file eusci_b_i2c_ex3_slaveRxMultiple.c.

+ +

References RXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData
+
+ +

Definition at line 69 of file eusci_b_i2c_ex3_slaveRxMultiple.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.js new file mode 100644 index 0000000..be89c1f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "RXData", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c.html#a597ef8ed788642728c57f66b3a21544f", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c_source.html new file mode 100644 index 0000000..844a80d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex3__slave_rx_multiple_8c_source.html @@ -0,0 +1,283 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex3_slaveRxMultiple.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex3_slaveRxMultiple.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
35 // EUSCI_B0 I2C Slave RX single bytes from MSP430 Master
+
36 //
+
37 // Description: This demo connects two MSP430's via the I2C bus. The master
+
38 // transmits to the slave. This is the slave code. The interrupt driven
+
39 // data receiption is demonstrated using the USCI_B0 RX interrupt.
+
40 //
+
41 // Tested on MSP430FR5969
+
42 //
+
43 // /|\ /|\
+
44 // 10k 10k
+
45 // slave | | master
+
46 // ----------------- | | -----------------
+
47 // -|XIN P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA XIN|-
+
48 // | | | | |
+
49 // -|XOUT | | | XOUT|-
+
50 // | P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL |
+
51 // | | | |
+
52 // | | | |
+
53 //
+
54 
+
55 //******************************************************************************
+
56 //*****************************************************************************
+
57 //
+
58 //Set the address for slave module. This is a 7-bit address sent in the
+
59 //following format:
+
60 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
61 //
+
62 //A zero in the "RS" position of the first byte means that the master
+
63 //transmits (sends) data to the selected slave, and a one in this position
+
64 //means that the master receives data from the slave.
+
65 //
+
66 //*****************************************************************************
+
67 #define SLAVE_ADDRESS 0x48
+
68 
+
69 uint8_t RXData;
+
70 
+
71 void main(void)
+
72 {
+
73  WDT_A_hold(WDT_A_BASE);
+
74 
+
75  // Configure Pins for I2C
+
76  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
77  /*
+
78 
+
79  * Select Port 1
+
80  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
81  */
+
82  GPIO_setAsPeripheralModuleFunctionInputPin(
+
83  GPIO_PORT_P1,
+
84  GPIO_PIN6 + GPIO_PIN7,
+
85  GPIO_SECONDARY_MODULE_FUNCTION
+
86  );
+
87 
+
88  /*
+
89  * Disable the GPIO power-on default high-impedance mode to activate
+
90  * previously configured port settings
+
91  */
+
92  PMM_unlockLPM5();
+
93 
+
94  // eUSCI configuration
+
95  EUSCI_B_I2C_initSlaveParam param = {0};
+
96  param.slaveAddress = SLAVE_ADDRESS;
+
97  param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
98  param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
99  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &param);
+
100 
+
101  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
102 
+
103  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
104  EUSCI_B_I2C_RECEIVE_INTERRUPT0
+
105  );
+
106 
+
107  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
108  EUSCI_B_I2C_RECEIVE_INTERRUPT0
+
109  );
+
110 
+
111  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
112  __no_operation();
+
113 }
+
114 
+
115 //------------------------------------------------------------------------------
+
116 // The USCI_B0 data ISR RX vector is used to move received data from the I2C
+
117 // master to the MSP430 memory.
+
118 //------------------------------------------------------------------------------
+
119 //------------------------------------------------------------------------------
+
120 // The USCI_B0 state ISR TX vector is used to wake up the CPU from LPM0 in order
+
121 // to process the received data in the main program. LPM0 is only exit in case
+
122 // of a (re-)start or stop condition when actual data was received.
+
123 //------------------------------------------------------------------------------
+
124 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
125 #pragma vector=USCI_B0_VECTOR
+
126 __interrupt
+
127 #elif defined(__GNUC__)
+
128 __attribute__((interrupt(USCI_B0_VECTOR)))
+
129 #endif
+
130 void USCIB0_ISR(void)
+
131 {
+
132  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
133  {
+
134  case USCI_NONE: // No interrupts break;
+
135  break;
+
136  case USCI_I2C_UCALIFG: // Arbitration lost
+
137  break;
+
138  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
139  break;
+
140  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
141  break;
+
142  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
143  break;
+
144  case USCI_I2C_UCRXIFG3: // RXIFG3
+
145  break;
+
146  case USCI_I2C_UCTXIFG3: // TXIFG3
+
147  break;
+
148  case USCI_I2C_UCRXIFG2: // RXIFG2
+
149  break;
+
150  case USCI_I2C_UCTXIFG2: // TXIFG2
+
151  break;
+
152  case USCI_I2C_UCRXIFG1: // RXIFG1
+
153  break;
+
154  case USCI_I2C_UCTXIFG1: // TXIFG1
+
155  break;
+
156  case USCI_I2C_UCRXIFG0: // RXIFG0
+
157  RXData = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
158  break;
+
159  case USCI_I2C_UCTXIFG0: // TXIFG0
+
160  break;
+
161  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
162  break;
+
163  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
164  break;
+
165  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
166  break;
+
167  default:
+
168  break;
+
169  }
+
170 }
+
171 
+ +
void USCIB0_ISR(void)
+
void main(void)
+
MPU_initThreeSegmentsParam param
+
#define SLAVE_ADDRESS
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html new file mode 100644 index 0000000..fad1d9f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html @@ -0,0 +1,205 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex4_masterTxSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex4_masterTxSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + +

+Functions

void main (void)
 
+ + + +

+Variables

uint8_t transmitData
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

This example shows how to configure the I2C module as a master for single byte transmission in interrupt mode. The address of the slave module that the master is communicating with also set in this example.

+

Demo - EUSCI_B0 I2C Master TX single bytes to MSP430 Slave

+

Description: This demo connects two MSP430's via the I2C bus. The master transmits to the slave. This is the master code. It continuously transmits 00h, 01h, ..., 0ffh and demonstrates how to implement an I2C master transmitter sending a single byte using the USCI_B0 TX interrupt. ACLK = n/a, MCLK = SMCLK = BRCLK = default DCO = ~1.045MHz

                          /|\  /|\
+          MSP430FR5969    10k  10k     MSP430FR5969
+             slave         |    |         master
+       -----------------   |    |   -----------------
+     -|XIN  P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA  XIN|-
+      |                 |  |       |                 |
+     -|XOUT             |  |       |             XOUT|-
+      |     P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL     |
+      |                 |          |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL2
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 82 of file eusci_b_i2c_ex4_masterTxSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 86 of file eusci_b_i2c_ex4_masterTxSingle.c.

+ +

References __delay_cycles(), param, SLAVE_ADDRESS, and transmitData.

+ +
+
+

Variable Documentation

+ +

◆ transmitData

+ +
+
+ + + + +
uint8_t transmitData
+
+ +

Definition at line 84 of file eusci_b_i2c_ex4_masterTxSingle.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.js new file mode 100644 index 0000000..6327f29 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "transmitData", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c.html#ac23b8f721ac5b7a4315ba2c3409b9e0a", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c_source.html new file mode 100644 index 0000000..480bc73 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__master_tx_single_8c_source.html @@ -0,0 +1,236 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex4_masterTxSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex4_masterTxSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
69 //
+
70 //*****************************************************************************
+
71 //*****************************************************************************
+
72 //
+
73 //Set the address for slave module. This is a 7-bit address sent in the
+
74 //following format:
+
75 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
76 //
+
77 //A zero in the "RS" position of the first byte means that the master
+
78 //transmits (sends) data to the selected slave, and a one in this position
+
79 //means that the master receives data from the slave.
+
80 //
+
81 //*****************************************************************************
+
82 #define SLAVE_ADDRESS 0x48
+
83 
+
84 uint8_t transmitData;
+
85 
+
86 void main (void)
+
87 {
+
88  WDT_A_hold(WDT_A_BASE);
+
89 
+
90  //Set DCO frequency to 1MHz
+
91  CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_0);
+
92  //Set ACLK = VLO with frequency divider of 1
+
93  CS_initClockSignal(CS_ACLK,CS_VLOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
94  //Set SMCLK = DCO with frequency divider of 1
+
95  CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
96  //Set MCLK = DCO with frequency divider of 1
+
97  CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
98 
+
99  // Configure Pins for I2C
+
100  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
101  /*
+
102 
+
103  * Select Port 1
+
104  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
105  */
+
106  GPIO_setAsPeripheralModuleFunctionInputPin(
+
107  GPIO_PORT_P1,
+
108  GPIO_PIN6 + GPIO_PIN7,
+
109  GPIO_SECONDARY_MODULE_FUNCTION
+
110  );
+
111 
+
112  /*
+
113  * Disable the GPIO power-on default high-impedance mode to activate
+
114  * previously configured port settings
+
115  */
+
116  PMM_unlockLPM5();
+
117 
+
118  //Initialize transmit data packet
+
119  transmitData = 0x01;
+
120 
+
121  //Initialize Master
+
122  EUSCI_B_I2C_initMasterParam param = {0};
+
123  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
124  param.i2cClk = CS_getSMCLK();
+
125  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
126  param.byteCounterThreshold = 1;
+
127  param.autoSTOPGeneration = EUSCI_B_I2C_NO_AUTO_STOP;
+
128  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
129 
+
130  //Specify slave address
+
131  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
133  );
+
134 
+
135  //Set in transmit mode
+
136  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
137  EUSCI_B_I2C_TRANSMIT_MODE
+
138  );
+
139 
+
140  //Enable I2C Module to start operations
+
141  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
142 
+
143  while (1)
+
144  {
+
145  //Send single byte data.
+
146  EUSCI_B_I2C_masterSendSingleByte(EUSCI_B0_BASE,
+ +
148  );
+
149 
+
150  //Delay until transmission completes
+
151  while (EUSCI_B_I2C_isBusBusy(EUSCI_B0_BASE)) ;
+
152 
+
153  //Delay between each transaction
+
154  __delay_cycles(50);
+
155 
+
156  //Increment transmit data counter
+
157  transmitData++;
+
158  }
+
159 }
+
void main(void)
+
uint8_t transmitData
+
MPU_initThreeSegmentsParam param
+
#define SLAVE_ADDRESS
+ +
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html new file mode 100644 index 0000000..6c34806 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html @@ -0,0 +1,230 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex4_slaveRxSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex4_slaveRxSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define SLAVE_ADDRESS   0x48
 
+ + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + +

+Variables

uint8_t RXData
 
+

Macro Definition Documentation

+ +

◆ SLAVE_ADDRESS

+ +
+
+ + + + +
#define SLAVE_ADDRESS   0x48
+
+

This example shows how to configure the I2C module as a slave for single byte reception in interrupt driven mode. The address of the slave module is set in this example. EUSCI_B0 I2C Slave RX single bytes from MSP430 Master

+

Description: This demo connects two MSP430's via the I2C bus. The master transmits to the slave. This is the slave code. The interrupt driven data receiption is demonstrated using the USCI_B0 RX interrupt.

+

Tested on MSP430FR5969

                          /|\  /|\
+                          10k  10k
+             slave         |    |         master
+       -----------------   |    |   -----------------
+     -|XIN  P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA  XIN|-
+      |                 |  |       |                 |
+     -|XOUT             |  |       |             XOUT|-
+      |     P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL     |
+      |                 |          |                 |
+      |                 |          |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • I2C peripheral
  • +
  • GPIO Port peripheral (for I2C pins)
  • +
  • SCL
  • +
  • SDA
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR.
  • +
+ +

Definition at line 83 of file eusci_b_i2c_ex4_slaveRxSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 87 of file eusci_b_i2c_ex4_slaveRxSingle.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 137 of file eusci_b_i2c_ex4_slaveRxSingle.c.

+ +

References RXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData
+
+ +

Definition at line 85 of file eusci_b_i2c_ex4_slaveRxSingle.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.js new file mode 100644 index 0000000..a15e7a4 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c = +[ + [ "SLAVE_ADDRESS", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html#ae2f0ff6faf548539a21b93a034e278e8", null ], + [ "main", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "RXData", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c.html#a597ef8ed788642728c57f66b3a21544f", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c_source.html new file mode 100644 index 0000000..08e2e8d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex4__slave_rx_single_8c_source.html @@ -0,0 +1,253 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex4_slaveRxSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex4_slaveRxSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*****************************************************************************
+
70 //
+
71 //*****************************************************************************
+
72 //*****************************************************************************
+
73 //
+
74 //Set the address for slave module. This is a 7-bit address sent in the
+
75 //following format:
+
76 //[A6:A5:A4:A3:A2:A1:A0:RS]
+
77 //
+
78 //A zero in the "RS" position of the first byte means that the master
+
79 //transmits (sends) data to the selected slave, and a one in this position
+
80 //means that the master receives data from the slave.
+
81 //
+
82 //*****************************************************************************
+
83 #define SLAVE_ADDRESS 0x48
+
84 
+
85 uint8_t RXData;
+
86 
+
87 void main(void)
+
88 {
+
89  WDT_A_hold(WDT_A_BASE);
+
90 
+
91  // Configure Pins for I2C
+
92  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
93  /*
+
94 
+
95  * Select Port 1
+
96  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
97  */
+
98  GPIO_setAsPeripheralModuleFunctionInputPin(
+
99  GPIO_PORT_P1,
+
100  GPIO_PIN6 + GPIO_PIN7,
+
101  GPIO_SECONDARY_MODULE_FUNCTION
+
102  );
+
103 
+
104  /*
+
105  * Disable the GPIO power-on default high-impedance mode to activate
+
106  * previously configured port settings
+
107  */
+
108  PMM_unlockLPM5();
+
109 
+
110  // eUSCI configuration
+
111  EUSCI_B_I2C_initSlaveParam param = {0};
+
112  param.slaveAddress = 0x48;
+
113  param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
114  param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
115  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &param);
+
116 
+
117  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
118 
+
119  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
120  EUSCI_B_I2C_RECEIVE_INTERRUPT0
+
121  );
+
122 
+
123  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
124  EUSCI_B_I2C_RECEIVE_INTERRUPT0
+
125  );
+
126 
+
127  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
128  __no_operation();
+
129 }
+
130 
+
131 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
132 #pragma vector=USCI_B0_VECTOR
+
133 __interrupt
+
134 #elif defined(__GNUC__)
+
135 __attribute__((interrupt(USCI_B0_VECTOR)))
+
136 #endif
+
137 void USCIB0_ISR(void)
+
138 {
+
139  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
140  {
+
141  case USCI_NONE: // No interrupts break;
+
142  break;
+
143  case USCI_I2C_UCALIFG: // Arbitration lost
+
144  break;
+
145  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
146  break;
+
147  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
148  break;
+
149  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
150  break;
+
151  case USCI_I2C_UCRXIFG3: // RXIFG3
+
152  break;
+
153  case USCI_I2C_UCTXIFG3: // TXIFG3
+
154  break;
+
155  case USCI_I2C_UCRXIFG2: // RXIFG2
+
156  break;
+
157  case USCI_I2C_UCTXIFG2: // TXIFG2
+
158  break;
+
159  case USCI_I2C_UCRXIFG1: // RXIFG1
+
160  break;
+
161  case USCI_I2C_UCTXIFG1: // TXIFG1
+
162  break;
+
163  case USCI_I2C_UCRXIFG0: // RXIFG0
+
164  RXData = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
165  break;
+
166  case USCI_I2C_UCTXIFG0: // TXIFG0
+
167  break;
+
168  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
169  break;
+
170  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
171  break;
+
172  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
173  break;
+
174  default:
+
175  break;
+
176  }
+
177 }
+ +
void USCIB0_ISR(void)
+
void main(void)
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html new file mode 100644 index 0000000..51fc3bc --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html @@ -0,0 +1,240 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex5_masterMultipleSlave.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex5_masterMultipleSlave.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + + + + + + + +

+Variables

uint8_t TXData [] = {0xA1,0xB1,0xC1,0xD1}
 
uint8_t SlaveAddress [] = {0x0A,0x0B,0x0C,0x0D}
 
uint8_t TXByteCtr
 
uint8_t SlaveFlag = 0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 62 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +

References __delay_cycles(), param, SlaveAddress, SlaveFlag, and TXByteCtr.

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 157 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +

References __bic_SR_register_on_exit(), SlaveFlag, TXByteCtr, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ SlaveAddress

+ +
+
+ + + + +
uint8_t SlaveAddress[] = {0x0A,0x0B,0x0C,0x0D}
+
+ +

Definition at line 58 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +
+
+ +

◆ SlaveFlag

+ +
+
+ + + + +
uint8_t SlaveFlag = 0
+
+ +

Definition at line 60 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +
+
+ +

◆ TXByteCtr

+ +
+
+ + + + +
uint8_t TXByteCtr
+
+ +

Definition at line 59 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData[] = {0xA1,0xB1,0xC1,0xD1}
+
+ +

Definition at line 57 of file eusci_b_i2c_ex5_masterMultipleSlave.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.js new file mode 100644 index 0000000..4bea1d8 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.js @@ -0,0 +1,9 @@ +var _m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "SlaveAddress", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#acab914ed25efe33c5ff39bffa442b25f", null ], + [ "SlaveFlag", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#a8400431f2b4b75fc33a2b9d755be8796", null ], + [ "TXByteCtr", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#a442fc7a9731fc8e66469e62429b32219", null ], + [ "TXData", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c.html#adb697e8622bce2ab592d2ee2395bd672", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c_source.html new file mode 100644 index 0000000..ba62a86 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__master_multiple_slave_8c_source.html @@ -0,0 +1,328 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex5_masterMultipleSlave.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex5_masterMultipleSlave.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
35 // Demo - EUSCI_B0 I2C Master TX bytes to Multiple Slaves
+
36 //
+
37 // Description: This demo connects two MSP430's via the I2C bus.
+
38 // The master transmits to 4 different I2C slave addresses 0x0A,0x0B,0x0C&0x0D.
+
39 // Each slave address has a specific related data in the array TXData[].
+
40 // At the end of four I2C transactions the slave address rolls over and begins
+
41 // again at 0x0A.
+
42 // ACLK = n/a, MCLK = SMCLK = BRCLK = default DCO = ~1.045MHz
+
43 //
+
44 // /|\ /|\
+
45 // MSP430FR5969 10k 10k MSP430FR5969
+
46 // slave | | master
+
47 // ----------------- | | -----------------
+
48 // -|XIN P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA XIN|-
+
49 // | | | | |
+
50 // -|XOUT | | | XOUT|-
+
51 // | P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL |
+
52 // | | | |
+
53 //
+
54 //******************************************************************************
+
55 
+
56 
+
57 uint8_t TXData[]= {0xA1,0xB1,0xC1,0xD1};// Pointer to TX data
+
58 uint8_t SlaveAddress[]= {0x0A,0x0B,0x0C,0x0D};
+
59 uint8_t TXByteCtr;
+
60 uint8_t SlaveFlag = 0;
+
61 
+
62 void main(void)
+
63 {
+
64  WDT_A_hold(WDT_A_BASE);
+
65 
+
66  //Set DCO frequency to 1MHz
+
67  CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_0);
+
68  //Set ACLK = VLO with frequency divider of 1
+
69  CS_initClockSignal(CS_ACLK,CS_VLOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
70  //Set SMCLK = DCO with frequency divider of 1
+
71  CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
72  //Set MCLK = DCO with frequency divider of 1
+
73  CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
74 
+
75  // Configure Pins for I2C
+
76  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
77  /*
+
78 
+
79  * Select Port 1
+
80  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
81  */
+
82  GPIO_setAsPeripheralModuleFunctionInputPin(
+
83  GPIO_PORT_P1,
+
84  GPIO_PIN6 + GPIO_PIN7,
+
85  GPIO_SECONDARY_MODULE_FUNCTION
+
86  );
+
87 
+
88  /*
+
89  * Disable the GPIO power-on default high-impedance mode to activate
+
90  * previously configured port settings
+
91  */
+
92  PMM_unlockLPM5();
+
93 
+
94  EUSCI_B_I2C_initMasterParam param = {0};
+
95  param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
+
96  param.i2cClk = CS_getSMCLK();
+
97  param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_400KBPS;
+
98  param.byteCounterThreshold = 0;
+
99  param.autoSTOPGeneration = EUSCI_B_I2C_NO_AUTO_STOP;
+
100  EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);
+
101 
+
102 
+
103  //Set Master in receive mode
+
104  EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
+
105  EUSCI_B_I2C_TRANSMIT_MODE
+
106  );
+
107  //Enable I2C Module to start operations
+
108  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
109 
+
110  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
111  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
112  EUSCI_B_I2C_NAK_INTERRUPT
+
113  );
+
114 
+
115  //Enable master Receive interrupt
+
116  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
117  EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
+
118  EUSCI_B_I2C_NAK_INTERRUPT
+
119  );
+
120 
+
121  SlaveFlag = 0;
+
122  while(1)
+
123  {
+
124  //Specify slave address
+
125  EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
+ +
127  );
+
128 
+
129 
+
130  TXByteCtr = 1; // Load TX byte counter
+
131 
+
132  while (EUSCI_B_I2C_SENDING_STOP == EUSCI_B_I2C_masterIsStopSent
+
133  (EUSCI_B0_BASE));
+
134 
+
135 
+
136  EUSCI_B_I2C_masterSendStart(EUSCI_B0_BASE);
+
137 
+
138  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
139  // Remain in LPM0 until all data is TX'd
+
140 
+
141  // Change Slave address
+
142  SlaveFlag++;
+
143  if(SlaveFlag > 3) // Roll over slave address
+
144  {
+
145  SlaveFlag = 0;
+
146  __delay_cycles(1000); // Delay between transmissions
+
147  }
+
148  }
+
149 }
+
150 
+
151 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
152 #pragma vector=USCI_B0_VECTOR
+
153 __interrupt
+
154 #elif defined(__GNUC__)
+
155 __attribute__((interrupt(USCI_B0_VECTOR)))
+
156 #endif
+
157 void USCIB0_ISR(void)
+
158 {
+
159  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
160  {
+
161  case USCI_NONE: // No interrupts break;
+
162  break;
+
163  case USCI_I2C_UCALIFG: // Arbitration lost
+
164  break;
+
165  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
166  // Resend START if NAK'd
+
167  EUSCI_B_I2C_masterSendStart(EUSCI_B0_BASE);
+
168  break;
+
169  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
170  break;
+
171  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
172  break;
+
173  case USCI_I2C_UCRXIFG3: // RXIFG3
+
174  break;
+
175  case USCI_I2C_UCTXIFG3: // TXIFG3
+
176  break;
+
177  case USCI_I2C_UCRXIFG2: // RXIFG2
+
178  break;
+
179  case USCI_I2C_UCTXIFG2: // TXIFG2
+
180  break;
+
181  case USCI_I2C_UCRXIFG1: // RXIFG1
+
182  break;
+
183  case USCI_I2C_UCTXIFG1: // TXIFG1
+
184  break;
+
185  case USCI_I2C_UCRXIFG0: // RXIFG0
+
186  break;
+
187  case USCI_I2C_UCTXIFG0: // TXIFG0
+
188  // Check TX byte counter
+
189  if (TXByteCtr)
+
190  {
+
191  EUSCI_B_I2C_masterSendMultiByteNext(EUSCI_B0_BASE,
+
192  TXData[SlaveFlag]);
+
193  // Decrement TX byte counter
+
194  TXByteCtr--;
+
195  }
+
196  else
+
197  {
+
198  EUSCI_B_I2C_masterSendMultiByteStop(EUSCI_B0_BASE);
+
199  // Exit LPM0
+ +
201  }
+
202  break;
+
203  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
204  break;
+
205  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
206  break;
+
207  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
208  break;
+
209  default:
+
210  break;
+
211  }
+
212 }
+
213 
+ + + + + + +
MPU_initThreeSegmentsParam param
+ +
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html new file mode 100644 index 0000000..c0799ae --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html @@ -0,0 +1,240 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex5_slaveMultipleSlave.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_i2c_ex5_slaveMultipleSlave.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCIB0_ISR (void)
 
+ + + + + + + + + +

+Variables

uint8_t RXData0 =0
 
uint8_t RXData1 =0
 
uint8_t RXData2 =0
 
uint8_t RXData3 =0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 60 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +

References __no_operation().

+ +
+
+ +

◆ USCIB0_ISR()

+ +
+
+ + + + + + + + +
void USCIB0_ISR (void )
+
+ +

Definition at line 140 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +

References RXData0, RXData1, RXData2, and RXData3.

+ +
+
+

Variable Documentation

+ +

◆ RXData0

+ +
+
+ + + + +
uint8_t RXData0 =0
+
+ +

Definition at line 55 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +
+
+ +

◆ RXData1

+ +
+
+ + + + +
uint8_t RXData1 =0
+
+ +

Definition at line 56 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +
+
+ +

◆ RXData2

+ +
+
+ + + + +
uint8_t RXData2 =0
+
+ +

Definition at line 57 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +
+
+ +

◆ RXData3

+ +
+
+ + + + +
uint8_t RXData3 =0
+
+ +

Definition at line 58 of file eusci_b_i2c_ex5_slaveMultipleSlave.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.js new file mode 100644 index 0000000..6aaedc5 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.js @@ -0,0 +1,9 @@ +var _m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCIB0_ISR", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#a600430c0372d4ed0b67dfd6cb63d4560", null ], + [ "RXData0", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#ad8363a0fe210b31eb7174491f478dd02", null ], + [ "RXData1", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#afd0f3a79374491b2736c8448c3b85e3a", null ], + [ "RXData2", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#ad490477b6b68af21a68dcde8035a0f61", null ], + [ "RXData3", "_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c.html#af6a6cccb6c28ae3621d22627201ff981", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c_source.html new file mode 100644 index 0000000..2453fb9 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__i2c_2eusci__b__i2c__ex5__slave_multiple_slave_8c_source.html @@ -0,0 +1,297 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_i2c/eusci_b_i2c_ex5_slaveMultipleSlave.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_i2c_ex5_slaveMultipleSlave.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
35 // MSP430FR57xx Demo - USCI_B0 I2C 4 Hardware I2C slaves
+
36 //
+
37 // Description: This demo connects two MSP430's via the I2C bus.
+
38 // This code configures the MSP430 USCI to be addressed as 4 independent I2C
+
39 // slaves. Each slave has its owm interrupt flag and data variable to store
+
40 // incoming data.
+
41 //
+
42 // Tested on MSP430FR5969
+
43 // /|\ /|\
+
44 // 10k 10k
+
45 // slave | | master
+
46 // ----------------- | | -----------------
+
47 // -|XIN P1.6/UCB0SDA|<-|----+->|P1.6/UCB0SDA XIN|-
+
48 // | | | | |
+
49 // -|XOUT | | | XOUT|-
+
50 // | P1.7/UCB0SCL|<-+------>|P1.7/UCB0SCL |
+
51 // | | | |
+
52 // | | | |
+
53 //
+
54 //******************************************************************************
+
55 uint8_t RXData0=0;
+
56 uint8_t RXData1=0;
+
57 uint8_t RXData2=0;
+
58 uint8_t RXData3=0;
+
59 
+
60 void main(void)
+
61 {
+
62 
+
63  WDT_A_hold(WDT_A_BASE);
+
64 
+
65  // Configure Pins for I2C
+
66  //Set P1.6 and P1.7 as Secondary Module Function Input.
+
67  /*
+
68 
+
69  * Select Port 1
+
70  * Set Pin 6, 7 to input Secondary Module Function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
+
71  */
+
72  GPIO_setAsPeripheralModuleFunctionInputPin(
+
73  GPIO_PORT_P1,
+
74  GPIO_PIN6 + GPIO_PIN7,
+
75  GPIO_SECONDARY_MODULE_FUNCTION
+
76  );
+
77 
+
78  /*
+
79  * Disable the GPIO power-on default high-impedance mode to activate
+
80  * previously configured port settings
+
81  */
+
82  PMM_unlockLPM5();
+
83 
+
84  // eUSCI configuration
+
85  //SLAVE0 own address is 0x0A+ enable
+
86  EUSCI_B_I2C_initSlaveParam initSlave0Param = {0};
+
87  initSlave0Param.slaveAddress = 0x0A;
+
88  initSlave0Param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET0;
+
89  initSlave0Param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
90  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &initSlave0Param);
+
91 
+
92  //SLAVE1 own address is 0x0B+ enable
+
93  EUSCI_B_I2C_initSlaveParam initSlave1Param = {0};
+
94  initSlave1Param.slaveAddress = 0x0B;
+
95  initSlave1Param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET1;
+
96  initSlave1Param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
97  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &initSlave1Param);
+
98 
+
99  //SLAVE2 own address is 0x0C+ enable
+
100  EUSCI_B_I2C_initSlaveParam initSlave2Param = {0};
+
101  initSlave2Param.slaveAddress = 0x0C;
+
102  initSlave2Param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET2;
+
103  initSlave2Param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
104  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &initSlave2Param);
+
105 
+
106  //SLAVE3 own address is 0x0D+ enable
+
107  EUSCI_B_I2C_initSlaveParam initSlave3Param = {0};
+
108  initSlave3Param.slaveAddress = 0x0D;
+
109  initSlave3Param.slaveAddressOffset = EUSCI_B_I2C_OWN_ADDRESS_OFFSET3;
+
110  initSlave3Param.slaveOwnAddressEnable = EUSCI_B_I2C_OWN_ADDRESS_ENABLE;
+
111  EUSCI_B_I2C_initSlave(EUSCI_B0_BASE, &initSlave3Param);
+
112 
+
113  EUSCI_B_I2C_enable(EUSCI_B0_BASE);
+
114 
+
115  EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
+
116  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
117  EUSCI_B_I2C_RECEIVE_INTERRUPT1 +
+
118  EUSCI_B_I2C_RECEIVE_INTERRUPT2 +
+
119  EUSCI_B_I2C_RECEIVE_INTERRUPT3
+
120  );
+
121 
+
122  //receive interrupt enable
+
123  EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
+
124  EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
+
125  EUSCI_B_I2C_RECEIVE_INTERRUPT1 +
+
126  EUSCI_B_I2C_RECEIVE_INTERRUPT2 +
+
127  EUSCI_B_I2C_RECEIVE_INTERRUPT3
+
128  );
+
129 
+
130  __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
+
131  __no_operation();
+
132 }
+
133 
+
134 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
135 #pragma vector=USCI_B0_VECTOR
+
136 __interrupt
+
137 #elif defined(__GNUC__)
+
138 __attribute__((interrupt(USCI_B0_VECTOR)))
+
139 #endif
+
140 void USCIB0_ISR(void)
+
141 {
+
142  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
+
143  {
+
144  case USCI_NONE: // No interrupts break;
+
145  break;
+
146  case USCI_I2C_UCALIFG: // Arbitration lost
+
147  break;
+
148  case USCI_I2C_UCNACKIFG: // NAK received (master only)
+
149  break;
+
150  case USCI_I2C_UCSTTIFG: // START condition detected with own address (slave mode only)
+
151  break;
+
152  case USCI_I2C_UCSTPIFG: // STOP condition detected (master & slave mode)
+
153  break;
+
154  case USCI_I2C_UCRXIFG3: // RXIFG3
+
155  RXData3 = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
156  break;
+
157  case USCI_I2C_UCTXIFG3: // TXIFG3
+
158  break;
+
159  case USCI_I2C_UCRXIFG2: // RXIFG2
+
160  RXData2 = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
161  break;
+
162  case USCI_I2C_UCTXIFG2: // TXIFG2
+
163  break;
+
164  case USCI_I2C_UCRXIFG1: // RXIFG1
+
165  RXData1 = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
166  break;
+
167  case USCI_I2C_UCTXIFG1: // TXIFG1
+
168  break;
+
169  case USCI_I2C_UCRXIFG0: // RXIFG0
+
170  RXData0 = EUSCI_B_I2C_slaveGetData(EUSCI_B0_BASE);
+
171  break;
+
172  case USCI_I2C_UCTXIFG0: // TXIFG0
+
173  break;
+
174  case USCI_I2C_UCBCNTIFG: // Byte count limit reached (UCBxTBCNT)
+
175  break;
+
176  case USCI_I2C_UCCLTOIFG: // Clock low timeout - clock held low too long
+
177  break;
+
178  case USCI_I2C_UCBIT9IFG: // Generated on 9th bit of a transmit (for debugging)
+
179  break;
+
180  default:
+
181  break;
+
182  }
+
183 }
+
184 
+ + + + + + + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html new file mode 100644 index 0000000..a158102 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html @@ -0,0 +1,220 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_spi/eusci_b_spi_ex1_master.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_spi_ex1_master.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCI_B0_ISR (void)
 
+ + + + + +

+Variables

uint8_t RXData = 0
 
uint8_t TXData = 0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 81 of file eusci_b_spi_ex1_master.c.

+ +

References __delay_cycles(), __no_operation(), GPIO_setOutputLowOnPin(), i, param, and TXData.

+ +
+
+ +

◆ USCI_B0_ISR()

+ +
+
+ + + + + + + + +
void USCI_B0_ISR (void )
+
+ +

Definition at line 178 of file eusci_b_spi_ex1_master.c.

+ +

References __delay_cycles(), RXData, and TXData.

+ +
+
+

Variable Documentation

+ +

◆ RXData

+ +
+
+ + + + +
uint8_t RXData = 0
+
+

USCI_B0, SPI 3-Wire Master Incremented Data This example shows how SPI master talks to SPI slave using 3-wire mode. Incrementing data is sent by the master starting at 0x01. Received data is expected to be same as the previous transmission. eUSCI RX ISR is used to handle communication with the CPU, normally in LPM0. If high, P1.0 indicates valid data reception. Because all execution after LPM0 is in ISRs, initialization waits for DCO to stabilize against SMCLK. ACLK = ~32.768kHz, MCLK = SMCLK = DCO ~ 1048kHz. BRCLK = SMCLK/2

+

Use with SPI Slave Data Echo code example. If slave is in debug mode, P1.1 slave reset signal conflicts with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.

        Tested on MSP430FR5969
+            -----------------
+       /|\ |                 |
+        |  |                 |
+

Master—+->|RST | | | | P1.6|-> Data Out (UCB0SIMO) | | | P1.7|<- Data In (UCB0SOMI) | | | P2.2|-> Serial Clock Out (UCB0CLK)

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • SPI peripheral
  • +
  • GPIO Port peripheral (for SPI pins)
  • +
  • UCB0SIMO
  • +
  • UCB0SOMI
  • +
  • UCB0CLK
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR
  • +
+ +

Definition at line 78 of file eusci_b_spi_ex1_master.c.

+ +
+
+ +

◆ TXData

+ +
+
+ + + + +
uint8_t TXData = 0
+
+ +

Definition at line 79 of file eusci_b_spi_ex1_master.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.js new file mode 100644 index 0000000..13096b7 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCI_B0_ISR", "_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html#abb8ec2e0335e1b8389161437129cc39a", null ], + [ "RXData", "_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html#a597ef8ed788642728c57f66b3a21544f", null ], + [ "TXData", "_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c.html#ae369b896b0180297d61764643f99ba25", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c_source.html new file mode 100644 index 0000000..20c4bc3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__master_8c_source.html @@ -0,0 +1,278 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_spi/eusci_b_spi_ex1_master.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_spi_ex1_master.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*****************************************************************************
+
74 //*****************************************************************************
+
75 
+
76 #include "driverlib.h"
+
77 
+
78 uint8_t RXData = 0;
+
79 uint8_t TXData = 0;
+
80 
+
81 void main(void)
+
82 {
+
83  volatile uint16_t i;
+
84 
+
85  //Stop watchdog timer
+
86  WDT_A_hold(WDT_A_BASE);
+
87 
+
88  /*
+
89  * Select Port 1
+
90  * Set Pin 0 as output
+
91  */
+
92  GPIO_setAsOutputPin(
+
93  GPIO_PORT_P1,
+
94  GPIO_PIN0
+
95  );
+
96  /*
+
97  * Select Port 1
+
98  * Set Pin 0 to output Low.
+
99  */
+ +
101  GPIO_PORT_P1,
+
102  GPIO_PIN0
+
103  );
+
104 
+
105  //Set DCO frequency to max DCO setting
+
106  CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_3);
+
107  //Select DCO as the clock source for SMCLK with no frequency divider
+
108  CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
109 
+
110  /*
+
111  * Select Port 2
+
112  * Set Pin 2 to input Secondary Module Function, (UCB0CLK).
+
113  */
+
114  GPIO_setAsPeripheralModuleFunctionInputPin(
+
115  GPIO_PORT_P2,
+
116  GPIO_PIN2,
+
117  GPIO_SECONDARY_MODULE_FUNCTION
+
118  );
+
119 
+
120  /*
+
121  * Select Port 1
+
122  * Set Pin 6, 7 to input Secondary Module Function, (UCB0TXD/UCB0SIMO, UCB0RXD/UCB0SOMI).
+
123  */
+
124  GPIO_setAsPeripheralModuleFunctionInputPin(
+
125  GPIO_PORT_P1,
+
126  GPIO_PIN6 + GPIO_PIN7,
+
127  GPIO_SECONDARY_MODULE_FUNCTION
+
128  );
+
129 
+
130  /*
+
131  * Disable the GPIO power-on default high-impedance mode to activate
+
132  * previously configured port settings
+
133  */
+
134  PMM_unlockLPM5();
+
135 
+
136  //Initialize Master
+
137  EUSCI_B_SPI_initMasterParam param = {0};
+
138  param.selectClockSource = EUSCI_B_SPI_CLOCKSOURCE_SMCLK;
+
139  param.clockSourceFrequency = CS_getSMCLK();
+
140  param.desiredSpiClock = 500000;
+
141  param.msbFirst = EUSCI_B_SPI_MSB_FIRST;
+
142  param.clockPhase = EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
+
143  param.clockPolarity = EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_HIGH;
+
144  param.spiMode = EUSCI_B_SPI_3PIN;
+
145  EUSCI_B_SPI_initMaster(EUSCI_B0_BASE, &param);
+
146 
+
147  //Enable SPI module
+
148  EUSCI_B_SPI_enable(EUSCI_B0_BASE);
+
149 
+
150  EUSCI_B_SPI_clearInterrupt(EUSCI_B0_BASE,
+
151  EUSCI_B_SPI_RECEIVE_INTERRUPT);
+
152  // Enable USCI_B0 RX interrupt
+
153  EUSCI_B_SPI_enableInterrupt(EUSCI_B0_BASE,
+
154  EUSCI_B_SPI_RECEIVE_INTERRUPT);
+
155 
+
156  //Wait for slave to initialize
+
157  __delay_cycles(100);
+
158 
+
159  TXData = 0x1; // Holds TX data
+
160 
+
161  //USCI_B0 TX buffer ready?
+
162  while (!EUSCI_B_SPI_getInterruptStatus(EUSCI_B0_BASE,
+
163  EUSCI_B_SPI_TRANSMIT_INTERRUPT)) ;
+
164 
+
165  //Transmit Data to slave
+
166  EUSCI_B_SPI_transmitData(EUSCI_B0_BASE, TXData);
+
167 
+
168  __bis_SR_register(LPM0_bits + GIE); // CPU off, enable interrupts
+
169  __no_operation(); // Remain in LPM0
+
170 }
+
171 
+
172 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
173 #pragma vector=USCI_B0_VECTOR
+
174 __interrupt
+
175 #elif defined(__GNUC__)
+
176 __attribute__((interrupt(USCI_B0_VECTOR)))
+
177 #endif
+
178 void USCI_B0_ISR (void)
+
179 {
+
180  switch (__even_in_range(UCB0IV, USCI_SPI_UCTXIFG))
+
181  {
+
182  case USCI_SPI_UCRXIFG: // UCRXIFG
+
183  //USCI_B0 TX buffer ready?
+
184  while (!EUSCI_B_SPI_getInterruptStatus(EUSCI_B0_BASE,
+
185  EUSCI_B_SPI_TRANSMIT_INTERRUPT));
+
186 
+
187  RXData = EUSCI_B_SPI_receiveData(EUSCI_B0_BASE);
+
188 
+
189  //Increment data
+
190  TXData++;
+
191 
+
192  //Send next value
+
193  EUSCI_B_SPI_transmitData(EUSCI_B0_BASE,
+
194  TXData
+
195  );
+
196 
+
197  //Delay between transmissions for slave to process information
+
198  __delay_cycles(40);
+
199  break;
+
200  default:
+
201  break;
+
202  }
+
203 }
+
204 
+
uint8_t RXData
+
void main(void)
+
void USCI_B0_ISR(void)
+
uint8_t TXData
+
MPU_initThreeSegmentsParam param
+ + +
__no_operation()
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html new file mode 100644 index 0000000..53fde57 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html @@ -0,0 +1,220 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_spi/eusci_b_spi_ex1_slave.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
eusci_b_spi_ex1_slave.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void USCI_B0_ISR (void)
 
+ + + + + +

+Variables

uint8_t transmitData = 0x01
 
uint8_t receiveData = 0x00
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 77 of file eusci_b_spi_ex1_slave.c.

+ +

References param.

+ +
+
+ +

◆ USCI_B0_ISR()

+ +
+
+ + + + + + + + +
void USCI_B0_ISR (void )
+
+ +

Definition at line 159 of file eusci_b_spi_ex1_slave.c.

+ +

References receiveData, and transmitData.

+ +
+
+

Variable Documentation

+ +

◆ receiveData

+ +
+
+ + + + +
uint8_t receiveData = 0x00
+
+ +

Definition at line 75 of file eusci_b_spi_ex1_slave.c.

+ +
+
+ +

◆ transmitData

+ +
+
+ + + + +
uint8_t transmitData = 0x01
+
+

SPI slave talks to SPI master using 3-wire mode. Data is received from master and data from slave is then transmitted back to master. USCI RX ISR is used to handle communication, CPU normally in LPM4. Prior to initial data exchange, master pulses slaves RST for complete reset.

+

Use with eusci_spi_ex1_master code example. If the slave is in debug mode, the reset signal from the master will conflict with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.

       Tesed on MSP430FR5969
+          -----------------
+     /|\ |                 |
+      |  |                 |
+

Master—+->|RST | | | | P1.6|-> Data Out (UCB0SIMO) | | | P1.7|<- Data In (UCB0SOMI) | | | P2.2|<- Serial Clock Out (UCB0CLK)

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • SPI peripheral
  • +
  • GPIO Port peripheral (for SPI pins)
  • +
  • UCB0SIMO
  • +
  • UCB0SOMI
  • +
  • UCB0CLK
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • USCI_B0_VECTOR
  • +
+ +

Definition at line 75 of file eusci_b_spi_ex1_slave.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.js new file mode 100644 index 0000000..9d7bca0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "USCI_B0_ISR", "_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html#abb8ec2e0335e1b8389161437129cc39a", null ], + [ "receiveData", "_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html#a216001f02f93a2c0b512c1b8724bdc60", null ], + [ "transmitData", "_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c.html#ac23b8f721ac5b7a4315ba2c3409b9e0a", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c_source.html new file mode 100644 index 0000000..8b9c8c6 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2eusci__b__spi_2eusci__b__spi__ex1__slave_8c_source.html @@ -0,0 +1,258 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/eusci_b_spi/eusci_b_spi_ex1_slave.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
eusci_b_spi_ex1_slave.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*****************************************************************************
+
70 //
+
71 //*****************************************************************************
+
72 
+
73 #include "driverlib.h"
+
74 
+
75 uint8_t transmitData = 0x01, receiveData = 0x00;
+
76 
+
77 void main(void)
+
78 {
+
79  //Stop watchdog timer
+
80  WDT_A_hold(WDT_A_BASE);
+
81 
+
82  // Configure Pins for LFXIN
+
83  //Set PJ.4 and PJ.5 as Primary Module Function Input.
+
84  /*
+
85 
+
86  * Select Port J
+
87  * Set Pin 4, 5 to input Primary Module Function, (LFXIN).
+
88  */
+
89  GPIO_setAsPeripheralModuleFunctionInputPin(
+
90  GPIO_PORT_PJ,
+
91  GPIO_PIN4 + GPIO_PIN5,
+
92  GPIO_PRIMARY_MODULE_FUNCTION
+
93  );
+
94 
+
95  // Configure SPI pins
+
96  // Configure Pins for UCB0CLK
+
97 
+
98  /*
+
99 
+
100  * Select Port 2
+
101  * Set Pin 2 to input Secondary Module Function, (UCB0CLK).
+
102  */
+
103  GPIO_setAsPeripheralModuleFunctionInputPin(
+
104  GPIO_PORT_P2,
+
105  GPIO_PIN2,
+
106  GPIO_SECONDARY_MODULE_FUNCTION
+
107  );
+
108  // Configure Pins for UCB0TXD/UCB0SIMO, UCB0RXD/UCB0SOMI
+
109  //Set P2.0, P2.1 as Secondary Module Function Input.
+
110  /*
+
111 
+
112  * Select Port 1
+
113  * Set Pin 6, 7 to input Secondary Module Function, (UCB0TXD/UCB0SIMO, UCB0RXD/UCB0SOMI).
+
114  */
+
115  GPIO_setAsPeripheralModuleFunctionInputPin(
+
116  GPIO_PORT_P1,
+
117  GPIO_PIN6 + GPIO_PIN7,
+
118  GPIO_SECONDARY_MODULE_FUNCTION
+
119  );
+
120 
+
121  /*
+
122  * Disable the GPIO power-on default high-impedance mode to activate
+
123  * previously configured port settings
+
124  */
+
125  PMM_unlockLPM5();
+
126 
+
127  //Initialize slave to MSB first, inactive high clock polarity and 3 wire SPI
+
128  EUSCI_B_SPI_initSlaveParam param = {0};
+
129  param.msbFirst = EUSCI_B_SPI_MSB_FIRST;
+
130  param.clockPhase = EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
+
131  param.clockPolarity = EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_HIGH;
+
132  param.spiMode = EUSCI_B_SPI_3PIN;
+
133  EUSCI_B_SPI_initSlave(EUSCI_B0_BASE, &param);
+
134 
+
135  //Enable SPI Module
+
136  EUSCI_B_SPI_enable(EUSCI_B0_BASE);
+
137 
+
138  EUSCI_B_SPI_clearInterrupt(EUSCI_B0_BASE,
+
139  EUSCI_B_SPI_RECEIVE_INTERRUPT);
+
140  //Enable Receive interrupt
+
141  EUSCI_B_SPI_enableInterrupt(EUSCI_B0_BASE,
+
142  EUSCI_B_SPI_RECEIVE_INTERRUPT
+
143  );
+
144 
+
145  __bis_SR_register(LPM0_bits + GIE); // Enter LPM0, enable interrupts
+
146 }
+
147 
+
148 //******************************************************************************
+
149 //
+
150 //This is the USCI_B0 interrupt vector service routine.
+
151 //
+
152 //******************************************************************************
+
153 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
154 #pragma vector=USCI_B0_VECTOR
+
155 __interrupt
+
156 #elif defined(__GNUC__)
+
157 __attribute__((interrupt(USCI_B0_VECTOR)))
+
158 #endif
+
159 void USCI_B0_ISR (void)
+
160 {
+
161  switch(__even_in_range(UCB0IV, USCI_SPI_UCTXIFG))
+
162  {
+
163  case USCI_SPI_UCRXIFG: // UCRXIFG
+
164  //USCI_B0 TX buffer ready?
+
165  while (!EUSCI_B_SPI_getInterruptStatus(EUSCI_B0_BASE,
+
166  EUSCI_B_SPI_TRANSMIT_INTERRUPT
+
167  ));
+
168 
+
169  //Transmit data to master
+
170  EUSCI_B_SPI_transmitData(EUSCI_B0_BASE,
+ +
172  );
+
173 
+
174  //Receive data from master
+
175  receiveData = EUSCI_B_SPI_receiveData(EUSCI_B0_BASE);
+
176 
+
177  //Increment data to be transmitted
+
178  transmitData++;
+
179  break;
+
180  default:
+
181  break;
+
182  }
+
183 }
+
184 
+
uint8_t receiveData
+
void main(void)
+
void USCI_B0_ISR(void)
+
uint8_t transmitData
+
MPU_initThreeSegmentsParam param
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2framctl_2framctl__ex1__write_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2framctl_2framctl__ex1__write_8c.html new file mode 100644 index 0000000..f1ca6e7 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2framctl_2framctl__ex1__write_8c.html @@ -0,0 +1,150 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/framctl/framctl_ex1_write.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
framctl_ex1_write.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

Long word writes to FRAM

+

Description: Use long word write to write to 512 byte blocks of FRAM. Toggle LEDs after every 100 writes. NOTE: Running this example for extended periods will impact the FRAM endurance. ACLK = VLO, MCLK = SMCLK = 4MHz

+

+Tested On: MSP430FR5969

+ + + + + +
/ |
RST
+

| | | | | P1.0|—> LED | P3.5|-->LED

+ +

Definition at line 64 of file framctl_ex1_write.c.

+ +

References FRAM_TEST_START.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2framctl_2framctl__ex1__write_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2framctl_2framctl__ex1__write_8c.js new file mode 100644 index 0000000..edddeb3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2framctl_2framctl__ex1__write_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2framctl_2framctl__ex1__write_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2framctl_2framctl__ex1__write_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2framctl_2framctl__ex1__write_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2framctl_2framctl__ex1__write_8c_source.html new file mode 100644 index 0000000..a01a7ad --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2framctl_2framctl__ex1__write_8c_source.html @@ -0,0 +1,209 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/framctl/framctl_ex1_write.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
framctl_ex1_write.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
51 //******************************************************************************
+
52 #include "driverlib.h"
+
53 
+
54 #if defined (__TI_COMPILER_VERSION__)
+
55 #pragma PERSISTENT(FRAM_TEST_START)
+
56 uint32_t FRAM_TEST_START =
+
57 #elif defined (__IAR_SYSTEMS_ICC__)
+
58 __persistent uint32_t FRAM_TEST_START =
+
59 #elif defined (__GNUC__)
+
60 __attribute__ ((section (".persistent"))) uint32_t FRAM_TEST_START =
+
61 #endif
+
62  0xCABA;
+
63 
+
64 void main(void) {
+
65  uint8_t count = 0;
+
66  uint32_t data = 0;
+
67 
+
68  WDT_A_hold(WDT_A_BASE); // Stop WDT
+
69 
+
70  //Set P1.0 as an output pin.
+
71  /*
+
72 
+
73  * Select Port 1
+
74  * Set Pin 0 as output
+
75  */
+
76  GPIO_setAsOutputPin(GPIO_PORT_P1, GPIO_PIN0);
+
77  //Set P3.5 as an output pin.
+
78  /*
+
79 
+
80  * Select Port 3
+
81  * Set Pin 5 as output
+
82  */
+
83  GPIO_setAsOutputPin(GPIO_PORT_P3, GPIO_PIN5);
+
84 
+
85  /*
+
86  * Disable the GPIO power-on default high-impedance mode to activate
+
87  * previously configured port settings
+
88  */
+
89  PMM_unlockLPM5();
+
90 
+
91  // Initialize dummy data
+
92  data = 0x11111111;
+
93 
+
94  while (1) {
+
95  data += 0x00010001;
+
96 
+
97  FRAMCtl_fillMemory32(data, (uint32_t *)(uintptr_t)FRAM_TEST_START, 128);
+
98  count++;
+
99  if (count > 100) {
+
100  //Toggle P1.0 output pin.
+
101  /*
+
102 
+
103  * Select Port 1
+
104  * Set Pin 0 as output
+
105  */
+
106  GPIO_toggleOutputOnPin(GPIO_PORT_P1, GPIO_PIN0);
+
107  //Toggle P3.5 output pin.
+
108  /*
+
109 
+
110  * Select Port 3
+
111  * Set Pin 5 as output
+
112  */
+
113  GPIO_toggleOutputOnPin(GPIO_PORT_P3, GPIO_PIN5);
+
114 
+
115  count = 0; //Reset counter
+
116  data = 0x11111111;
+
117  }
+
118  }
+
119 }
+
#define FRAM_TEST_START
+
void main(void)
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.html new file mode 100644 index 0000000..339adac --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/gpio/gpio_ex1_outputHi.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
gpio_ex1_outputHi.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 58 of file gpio_ex1_outputHi.c.

+ +

References __no_operation(), and GPIO_setOutputHighOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.js new file mode 100644 index 0000000..d30b12a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex1__output_hi_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex1__output_hi_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex1__output_hi_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex1__output_hi_8c_source.html new file mode 100644 index 0000000..070ee4f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex1__output_hi_8c_source.html @@ -0,0 +1,203 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/gpio/gpio_ex1_outputHi.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
gpio_ex1_outputHi.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Write a Word to Port A (Port1+Port2)
+
34 //
+
35 // Writes a Word(FFFFh) to Port A and stays in LPM4
+
36 // ACLK = 32.768kHz, MCLK = SMCLK = default DCO
+
37 //
+
38 // Tested On: MSP430FR5969
+
39 // -----------------
+
40 // /|\| |
+
41 // | | |
+
42 // --|RST PA.x|-->HI
+
43 // | |
+
44 // | |
+
45 //
+
46 //
+
47 // This example uses the following peripherals and I/O signals. You must
+
48 // review these and change as needed for your own board:
+
49 // - GPIO Port peripheral
+
50 //
+
51 // This example uses the following interrupt handlers. To use this example
+
52 // in your own application you must add these interrupt handlers to your
+
53 // vector table.
+
54 // - None.
+
55 //******************************************************************************
+
56 #include "driverlib.h"
+
57 
+
58 void main (void)
+
59 {
+
60  //Stop WDT
+
61  WDT_A_hold(WDT_A_BASE);
+
62 
+
63  //PA.x output
+
64  GPIO_setAsOutputPin(
+
65  GPIO_PORT_PA,
+
66  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3 +
+
67  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7 +
+
68  GPIO_PIN8 + GPIO_PIN9 + GPIO_PIN10 + GPIO_PIN11 +
+
69  GPIO_PIN12 + GPIO_PIN13 + GPIO_PIN14 + GPIO_PIN15
+
70  );
+
71 
+
72 
+
73  //Set all PA pins HI
+ +
75 
+
76  GPIO_PORT_PA,
+
77  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3 +
+
78  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7 +
+
79  GPIO_PIN8 + GPIO_PIN9 + GPIO_PIN10 + GPIO_PIN11 +
+
80  GPIO_PIN12 + GPIO_PIN13 + GPIO_PIN14 + GPIO_PIN15
+
81  );
+
82 
+
83  /*
+
84  * Disable the GPIO power-on default high-impedance mode to activate
+
85  * previously configured port settings
+
86  */
+
87  PMM_unlockLPM5();
+
88 
+
89  //Enter LPM4 w/interrupts enabled
+
90  __bis_SR_register(LPM4_bits + GIE);
+
91 
+
92  //For debugger
+ +
94 }
+
void main(void)
+ +
__no_operation()
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.html new file mode 100644 index 0000000..728ab30 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.html @@ -0,0 +1,161 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/gpio/gpio_ex2_inputCapture.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
gpio_ex2_inputCapture.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void Port_1 (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 64 of file gpio_ex2_inputCapture.c.

+ +

References __no_operation().

+ +
+
+ +

◆ Port_1()

+ +
+
+ + + + + + + + +
void Port_1 (void )
+
+ +

Definition at line 124 of file gpio_ex2_inputCapture.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.js new file mode 100644 index 0000000..f42cfcb --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex2__input_capture_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Port_1", "_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex2__input_capture_8c.html#a3a8f9242a81f4c686517653be5fbf412", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex2__input_capture_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex2__input_capture_8c_source.html new file mode 100644 index 0000000..3c29fbc --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex2__input_capture_8c_source.html @@ -0,0 +1,248 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/gpio/gpio_ex2_inputCapture.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
gpio_ex2_inputCapture.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Software Port Interrupt Service on P1.1 from LPM4 with
+
34 // Internal Pull-up Resistance Enabled
+
35 //
+
36 // A hi "TO" low transition on P1.1 will trigger P1_ISR which,
+
37 // toggles P1.0. P1.1 is internally enabled to pull-up. Normal mode is
+
38 // LPM4 ~ 0.1uA. LPM4 current can be measured with the LED removed, all
+
39 // unused Px.x configured as output or inputs pulled high or low. On the
+
40 // MSP430FR5969 LaunchPad, P1.1 is connected to button S1. The interrupt is
+
41 // triggered once the switch is released.
+
42 // ACLK = n/a, MCLK = SMCLK = default DCO
+
43 //
+
44 // Tested On: MSP430FR5969
+
45 // -----------------
+
46 // /|\| XIN|-
+
47 // | | |
+
48 // --|RST XOUT|-
+
49 // /|\ | |
+
50 // --o--|P1.1 P1.0|-->LED
+
51 // \|/
+
52 //
+
53 // This example uses the following peripherals and I/O signals. You must
+
54 // review these and change as needed for your own board:
+
55 // - GPIO Port peripheral
+
56 //
+
57 // This example uses the following interrupt handlers. To use this example
+
58 // in your own application you must add these interrupt handlers to your
+
59 // vector table.
+
60 // - PORT1_VECTOR
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  //Stop watchdog timer
+
67  WDT_A_hold(WDT_A_BASE);
+
68 
+
69  //Set P1.0 to output direction
+
70  GPIO_setAsOutputPin(
+
71  GPIO_PORT_P1,
+
72  GPIO_PIN0
+
73  );
+
74 
+
75  //Enable P1.1 internal resistance as pull-Up resistance
+
76  GPIO_setAsInputPinWithPullUpResistor(
+
77  GPIO_PORT_P1,
+
78  GPIO_PIN1
+
79  );
+
80 
+
81  //P1.1 Hi/Lo edge
+
82  GPIO_selectInterruptEdge(
+
83  GPIO_PORT_P1,
+
84  GPIO_PIN1,
+
85  GPIO_HIGH_TO_LOW_TRANSITION
+
86  );
+
87 
+
88  /*
+
89  * Disable the GPIO power-on default high-impedance mode to activate
+
90  * previously configured port settings
+
91  */
+
92  PMM_unlockLPM5();
+
93 
+
94  //P1.1 IFG cleared
+
95  GPIO_clearInterrupt(
+
96  GPIO_PORT_P1,
+
97  GPIO_PIN1
+
98  );
+
99 
+
100  //P1.1 interrupt enabled
+
101  GPIO_enableInterrupt(
+
102  GPIO_PORT_P1,
+
103  GPIO_PIN1
+
104  );
+
105 
+
106  //Enter LPM4 w/interrupt
+
107  __bis_SR_register(LPM4_bits + GIE);
+
108 
+
109  //For debugger
+
110  __no_operation();
+
111 }
+
112 
+
113 //******************************************************************************
+
114 //
+
115 //This is the PORT1_VECTOR interrupt vector service routine
+
116 //
+
117 //******************************************************************************
+
118 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
119 #pragma vector=PORT1_VECTOR
+
120 __interrupt
+
121 #elif defined(__GNUC__)
+
122 __attribute__((interrupt(PORT1_VECTOR)))
+
123 #endif
+
124 void Port_1 (void)
+
125 {
+
126  //P1.0 = toggle
+
127  GPIO_toggleOutputOnPin(
+
128  GPIO_PORT_P1,
+
129  GPIO_PIN0
+
130  );
+
131 
+
132 
+
133  //P1.1 IFG cleared
+
134  GPIO_clearInterrupt(
+
135  GPIO_PORT_P1,
+
136  GPIO_PIN1
+
137  );
+
138 }
+
139 
+
void Port_1(void)
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.html new file mode 100644 index 0000000..89f023e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.html @@ -0,0 +1,152 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/gpio/gpio_ex3_softwarePoll.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
gpio_ex3_softwarePoll.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

Software Poll P1.4, Set P1.0 if P1.4 = 1

+

Poll P1.4 in a loop, if hi P1.0 is set, if low, P1.0 reset. ACLK = n/a, MCLK = SMCLK = default DCO

        MSP430FR5969
+      -----------------
+  /|\|              XIN|-
+   | |                 |
+   --|RST          XOUT|-
+

/|\ | | –o–|P1.4 P1.0|-->LED |/

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None
  • +
+ +

Definition at line 59 of file gpio_ex3_softwarePoll.c.

+ +

References GPIO_setOutputHighOnPin(), and GPIO_setOutputLowOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.js new file mode 100644 index 0000000..02f53c3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex3__software_poll_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex3__software_poll_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex3__software_poll_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex3__software_poll_8c_source.html new file mode 100644 index 0000000..57be810 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex3__software_poll_8c_source.html @@ -0,0 +1,189 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/gpio/gpio_ex3_softwarePoll.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
gpio_ex3_softwarePoll.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
56 //******************************************************************************
+
57 #include "driverlib.h"
+
58 
+
59 void main (void)
+
60 {
+
61  //Stop watchdog timer
+
62  WDT_A_hold(WDT_A_BASE);
+
63 
+
64  //Set P1.0 to output direction
+
65  GPIO_setAsOutputPin(
+
66  GPIO_PORT_P1,
+
67  GPIO_PIN0
+
68  );
+
69 
+
70  //Set P1.4 to input direction
+
71  GPIO_setAsInputPin(
+
72  GPIO_PORT_P1,
+
73  GPIO_PIN4
+
74  );
+
75 
+
76  /*
+
77  * Disable the GPIO power-on default high-impedance mode to activate
+
78  * previously configured port settings
+
79  */
+
80  PMM_unlockLPM5();
+
81 
+
82  while (1)
+
83  {
+
84  //Test P1.4
+
85  if (GPIO_INPUT_PIN_HIGH == GPIO_getInputPinValue(
+
86  GPIO_PORT_P1,
+
87  GPIO_PIN4
+
88  )){
+
89  //if P1.4 set, set P1.0
+ +
91  GPIO_PORT_P1,
+
92  GPIO_PIN0
+
93  );
+
94  } else {
+
95  //else reset
+ +
97  GPIO_PORT_P1,
+
98  GPIO_PIN0
+
99  );
+
100  }
+
101  }
+
102 }
+
103 
+
void main(void)
+ +
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.html new file mode 100644 index 0000000..b76d0d0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.html @@ -0,0 +1,154 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/gpio/gpio_ex4_writeToPort1.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
gpio_ex4_writeToPort1.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

Write a byte to Port 1

+

Description: Writes a byte(0xFF) to Port 1 and stays in LPM4 mode ACLK = n/a, MCLK = SMCLK = default DCO

         MSP430FR5969
+      -----------------
+  /|\|                 |
+   | |                 |
+   --|RST              |
+     |             P1.x|-->HI
+     |                 |
+     |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 59 of file gpio_ex4_writeToPort1.c.

+ +

References __no_operation(), and GPIO_setOutputHighOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.js new file mode 100644 index 0000000..4766078 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c_source.html new file mode 100644 index 0000000..db006b4 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2gpio_2gpio__ex4__write_to_port1_8c_source.html @@ -0,0 +1,176 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/gpio/gpio_ex4_writeToPort1.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
gpio_ex4_writeToPort1.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
56 //******************************************************************************
+
57 #include "driverlib.h"
+
58 
+
59 void main (void)
+
60 {
+
61  //Stop watchdog timer
+
62  WDT_A_hold(WDT_A_BASE);
+
63 
+
64  //Set P1.x to output direction
+
65  GPIO_setAsOutputPin(
+
66  GPIO_PORT_P1,
+
67  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3 +
+
68  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7
+
69  );
+
70 
+
71  //Set all P1 pins HI
+ +
73  GPIO_PORT_P1,
+
74  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 + GPIO_PIN3 +
+
75  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN7
+
76  );
+
77 
+
78  /*
+
79  * Disable the GPIO power-on default high-impedance mode to activate
+
80  * previously configured port settings
+
81  */
+
82  PMM_unlockLPM5();
+
83 
+
84  //Enter LPM4 w/interrupt
+
85  __bis_SR_register(LPM4_bits + GIE);
+
86 
+
87  //For debugger
+ +
89 }
+
90 
+
void main(void)
+ +
__no_operation()
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c.html new file mode 100644 index 0000000..9898837 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c.html @@ -0,0 +1,224 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpu/mpu_ex1_threeSeg.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpu_ex1_threeSeg.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void SYSNMI_ISR (void)
 
+ + + + + + + +

+Variables

uint8_t SYSNMIflag = 0
 
uint16_t * ptr = 0
 
uint16_t Data =0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+
+ +

◆ SYSNMI_ISR()

+ +
+
+ + + + + + + + +
void SYSNMI_ISR (void )
+
+ +

Definition at line 121 of file mpu_ex1_threeSeg.c.

+ +

References SYSNMIflag.

+ +
+
+

Variable Documentation

+ +

◆ Data

+ +
+
+ + + + +
uint16_t Data =0
+
+ +

Definition at line 61 of file mpu_ex1_threeSeg.c.

+ +
+
+ +

◆ ptr

+ +
+
+ + + + +
uint16_t* ptr = 0
+
+ +

Definition at line 60 of file mpu_ex1_threeSeg.c.

+ +
+
+ +

◆ SYSNMIflag

+ +
+
+ + + + +
uint8_t SYSNMIflag = 0
+
+ +

Definition at line 59 of file mpu_ex1_threeSeg.c.

+ +

Referenced by main(), and SYSNMI_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c.js new file mode 100644 index 0000000..579eb01 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c.js @@ -0,0 +1,8 @@ +var _m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "SYSNMI_ISR", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c.html#ae7242476a6f3cf34dfcbb7dd3d083e07", null ], + [ "Data", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c.html#af75ea13d281210e54c4d4c09ea42b1df", null ], + [ "ptr", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c.html#a933b1d543427520898d681b8912b529e", null ], + [ "SYSNMIflag", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c.html#a8a6b6ddd62dc39aa83ff17f969d91523", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c_source.html new file mode 100644 index 0000000..2e7179b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex1__three_seg_8c_source.html @@ -0,0 +1,260 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpu/mpu_ex1_threeSeg.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpu_ex1_threeSeg.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR59x Demo - MPU Write protection violation - Interrupt notification
+
34 //
+
35 // Description: The MPU segment boundaries are defined by:
+
36 // Border 1 = 0x6000 [MPUSEGB1 = 0x0600]
+
37 // Border 2 = 0x8000 [MPUSEGB2 = 0x0800]
+
38 // Segment 1 = 0x4400 - 0x5FFF
+
39 // Segment 2 = 0x6000 - 0x7FFF
+
40 // Segment 3 = 0x8000 - 0x13FFF
+
41 // Segment 2 is write protected. Any write to an address in the segment 2 range
+
42 // causes a PUC. The LED toggles after accessing SYS NMI ISR.
+
43 //
+
44 // ACLK = n/a, MCLK = SMCLK = default DCO
+
45 //
+
46 //
+
47 // MSP430FR5969
+
48 // ---------------
+
49 // /|\| |
+
50 // | | |
+
51 // --|RST |
+
52 // | |
+
53 // | P1.0|-->LED
+
54 //
+
55 //******************************************************************************
+
56 
+
57 #include "driverlib.h"
+
58 
+
59 uint8_t SYSNMIflag = 0;
+
60 uint16_t *ptr = 0;
+
61 uint16_t Data =0;
+
62 
+
63 void main(void)
+
64 {
+
65  // Stop WDT
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  // Configure P1.0 for LED
+
69  GPIO_setAsOutputPin(
+
70  GPIO_PORT_P1,
+
71  GPIO_PIN0);
+
72 
+
73  /*
+
74  * Disable the GPIO power-on default high-impedance mode to activate
+
75  * previously configured port settings
+
76  */
+
77  PMM_unlockLPM5();
+
78 
+
79  // Configure MPU
+
80  MPU_initThreeSegmentsParam param = {0};
+
81  param.seg1boundary = 0x0600;
+
82  param.seg2boundary = 0x0800;
+
83  param.seg1accmask = MPU_READ|MPU_WRITE|MPU_EXEC;
+
84  param.seg2accmask = MPU_READ|MPU_EXEC;
+
85  param.seg3accmask = MPU_READ|MPU_WRITE|MPU_EXEC;
+
86  MPU_initThreeSegments(MPU_BASE, &param);
+
87 
+
88  MPU_disablePUCOnViolation(MPU_BASE,MPU_SECOND_SEG);
+
89 
+
90  MPU_enableNMIevent(MPU_BASE);
+
91  MPU_start(MPU_BASE);
+
92 
+
93  Data = 0x88;
+
94 
+
95  // Cause an MPU violation by writing to segment 2+
+
96  ptr = (uint16_t *)0x6002;
+
97  *ptr = Data;
+
98 
+
99  __delay_cycles(100);
+
100 
+
101  while(SYSNMIflag)
+
102  {
+
103  GPIO_toggleOutputOnPin(
+
104  GPIO_PORT_P1,
+
105  GPIO_PIN0
+
106  );
+
107  __delay_cycles(100000);
+
108  }
+
109 
+
110  // No violation - trap here
+
111  while(1);
+
112 }
+
113 
+
114 // Sys NMI vector
+
115 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
116 #pragma vector=SYSNMI_VECTOR
+
117 __interrupt
+
118 #elif defined(__GNUC__)
+
119 __attribute__((interrupt(SYSNMI_VECTOR)))
+
120 #endif
+
121 void SYSNMI_ISR(void)
+
122 {
+
123  switch(__even_in_range(SYSSNIV,0x18))
+
124  {
+
125  case 0x00: break;
+
126  case 0x02: break;
+
127  case 0x04: break;
+
128  case 0x06: break;
+
129  case 0x08: break;
+
130  case 0x0A: break;
+
131  case 0x0C: break; //MPUSEG1IFG
+
132  case 0x0E: //MPUSEG2IFG
+
133  // Clear violation interrupt flag
+
134  SYSNMIflag = 1; // Set flag
+
135  break;
+
136  case 0x10: break; // MPUSEG3IFG
+
137  case 0x12: break;
+
138  case 0x14: break;
+
139  case 0x16: break;
+
140  case 0x18: break;
+
141  default: break;
+
142  }
+
143 }
+
void main(void)
+
uint16_t * ptr
+
uint16_t Data
+
MPU_initThreeSegmentsParam param
+
MPU_start(MPU_BASE)
+
MPU_initThreeSegments(MPU_BASE, &param)
+
uint8_t SYSNMIflag
+
void SYSNMI_ISR(void)
+
MPU_disablePUCOnViolation(MPU_BASE, MPU_SECOND_SEG)
+
MPU_enableNMIevent(MPU_BASE)
+ +
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c.html new file mode 100644 index 0000000..5fe3c7b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c.html @@ -0,0 +1,224 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpu/mpu_ex2_twoSeg.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpu_ex2_twoSeg.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void SYSNMI_ISR (void)
 
+ + + + + + + +

+Variables

uint8_t SYSNMIflag = 0
 
uint16_t * ptr = 0
 
uint16_t Data =0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+
+ +

◆ SYSNMI_ISR()

+ +
+
+ + + + + + + + +
void SYSNMI_ISR (void )
+
+ +

Definition at line 113 of file mpu_ex2_twoSeg.c.

+ +

References SYSNMIflag.

+ +
+
+

Variable Documentation

+ +

◆ Data

+ +
+
+ + + + +
uint16_t Data =0
+
+ +

Definition at line 59 of file mpu_ex2_twoSeg.c.

+ +
+
+ +

◆ ptr

+ +
+
+ + + + +
uint16_t* ptr = 0
+
+ +

Definition at line 58 of file mpu_ex2_twoSeg.c.

+ +
+
+ +

◆ SYSNMIflag

+ +
+
+ + + + +
uint8_t SYSNMIflag = 0
+
+ +

Definition at line 57 of file mpu_ex2_twoSeg.c.

+ +

Referenced by main(), and SYSNMI_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c.js new file mode 100644 index 0000000..566f12f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c.js @@ -0,0 +1,8 @@ +var _m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "SYSNMI_ISR", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c.html#ae7242476a6f3cf34dfcbb7dd3d083e07", null ], + [ "Data", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c.html#af75ea13d281210e54c4d4c09ea42b1df", null ], + [ "ptr", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c.html#a933b1d543427520898d681b8912b529e", null ], + [ "SYSNMIflag", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c.html#a8a6b6ddd62dc39aa83ff17f969d91523", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c_source.html new file mode 100644 index 0000000..e954e12 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex2__two_seg_8c_source.html @@ -0,0 +1,250 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpu/mpu_ex2_twoSeg.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpu_ex2_twoSeg.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR59x Demo - MPU Write protection violation - Interrupt notification
+
34 //
+
35 // Description: The MPU segment boundaries are defined by:
+
36 // Border 1 = 0x8000 [MPUSEGB1 = 0x0800]
+
37 // Segment 1 = 0x4400 - 0x7FFF
+
38 // Segment 2 = 0x8000 - 0x13FFF
+
39 // Segment 2 is write protected. Any write to an address in the segment 2 range
+
40 // causes a PUC. The LED toggles after accessing SYS NMI ISR.
+
41 //
+
42 // ACLK = n/a, MCLK = SMCLK = default DCO
+
43 //
+
44 //
+
45 // MSP430FR5969
+
46 // ---------------
+
47 // /|\| |
+
48 // | | |
+
49 // --|RST |
+
50 // | |
+
51 // | P1.0|-->LED
+
52 //
+
53 //******************************************************************************
+
54 
+
55 #include "driverlib.h"
+
56 
+
57 uint8_t SYSNMIflag = 0;
+
58 uint16_t *ptr = 0;
+
59 uint16_t Data =0;
+
60 
+
61 void main(void)
+
62 {
+
63  // Stop WDT
+
64  WDT_A_hold(WDT_A_BASE);
+
65 
+
66  // Configure P1.0 for LED
+
67  GPIO_setAsOutputPin(
+
68  GPIO_PORT_P1,
+
69  GPIO_PIN0);
+
70 
+
71  /*
+
72  * Disable the GPIO power-on default high-impedance mode to activate
+
73  * previously configured port settings
+
74  */
+
75  PMM_unlockLPM5();
+
76 
+
77  // Configure MPU
+
78  MPU_initTwoSegments(MPU_BASE, 0x0800, MPU_READ|MPU_WRITE|MPU_EXEC, MPU_READ);
+
79 
+
80  MPU_disablePUCOnViolation(MPU_BASE,MPU_SECOND_SEG);
+
81 
+
82  MPU_enableNMIevent(MPU_BASE);
+
83  MPU_start(MPU_BASE);
+
84 
+
85  Data = 0x88;
+
86 
+
87  // Cause an MPU violation by writing to segment 2+
+
88  ptr = (uint16_t *)0x8002;
+
89  *ptr = Data;
+
90 
+
91  __delay_cycles(100);
+
92 
+
93  while(SYSNMIflag)
+
94  {
+
95  GPIO_toggleOutputOnPin(
+
96  GPIO_PORT_P1,
+
97  GPIO_PIN0
+
98  );
+
99  __delay_cycles(100000);
+
100  }
+
101 
+
102  // No violation - trap here
+
103  while(1);
+
104 }
+
105 
+
106 // Sys NMI vector
+
107 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
108 #pragma vector=SYSNMI_VECTOR
+
109 __interrupt
+
110 #elif defined(__GNUC__)
+
111 __attribute__((interrupt(SYSNMI_VECTOR)))
+
112 #endif
+
113 void SYSNMI_ISR(void)
+
114 {
+
115  switch(__even_in_range(SYSSNIV,0x18))
+
116  {
+
117  case 0x00: break;
+
118  case 0x02: break;
+
119  case 0x04: break;
+
120  case 0x06: break;
+
121  case 0x08: break;
+
122  case 0x0A: break;
+
123  case 0x0C: break; //MPUSEG1IFG
+
124  case 0x0E: //MPUSEG2IFG
+
125  // Clear violation interrupt flag
+
126  SYSNMIflag = 1; // Set flag
+
127  break;
+
128  case 0x10: break; // MPUSEG3IFG
+
129  case 0x12: break;
+
130  case 0x14: break;
+
131  case 0x16: break;
+
132  case 0x18: break;
+
133  default: break;
+
134  }
+
135 }
+
void main(void)
+
uint16_t * ptr
+
uint16_t Data
+
MPU_start(MPU_BASE)
+
uint8_t SYSNMIflag
+
void SYSNMI_ISR(void)
+
MPU_disablePUCOnViolation(MPU_BASE, MPU_SECOND_SEG)
+
MPU_enableNMIevent(MPU_BASE)
+ +
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.html new file mode 100644 index 0000000..25e5ba3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.html @@ -0,0 +1,372 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpu/mpu_ex3_systemPreInit.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpu_ex3_systemPreInit.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + +

+Functions

 MPU_initThreeSegments (MPU_BASE, &param)
 
 MPU_disablePUCOnViolation (MPU_BASE, MPU_SECOND_SEG)
 
 MPU_enableNMIevent (MPU_BASE)
 
 MPU_start (MPU_BASE)
 
void main (void)
 
+ + + + + + + + + + + + + + + +

+Variables

MPU_initThreeSegmentsParam param = {0}
 
param seg1boundary = 0x0600
 
param seg2boundary = 0x0800
 
param seg1accmask = MPU_READ|MPU_WRITE|MPU_EXEC
 
param seg2accmask = MPU_READ
 
param seg3accmask = MPU_READ|MPU_WRITE|MPU_EXEC
 
 return
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 92 of file mpu_ex3_systemPreInit.c.

+ +
+
+ +

◆ MPU_disablePUCOnViolation()

+ +
+
+ + + + + + + + + + + + + + + + + + +
MPU_disablePUCOnViolation (MPU_BASE ,
MPU_SECOND_SEG  
)
+
+ +

Referenced by main().

+ +
+
+ +

◆ MPU_enableNMIevent()

+ +
+
+ + + + + + + + +
MPU_enableNMIevent (MPU_BASE )
+
+ +

Referenced by main().

+ +
+
+ +

◆ MPU_initThreeSegments()

+ +
+
+ + + + + + + + + + + + + + + + + + +
MPU_initThreeSegments (MPU_BASE ,
param 
)
+
+ +
+
+ +

◆ MPU_start()

+ +
+
+ + + + + + + + +
MPU_start (MPU_BASE )
+
+ +
+
+

Variable Documentation

+ +

◆ param

+ +
+
+ + + + +
MPU_initThreeSegmentsParam param = {0}
+
+ +

Definition at line 72 of file mpu_ex3_systemPreInit.c.

+ +
+
+ +

◆ return

+ +
+
+ + + + +
return
+
+ +

Definition at line 89 of file mpu_ex3_systemPreInit.c.

+ +
+
+ +

◆ seg1accmask

+ +
+
+ + + + +
param seg1accmask = MPU_READ|MPU_WRITE|MPU_EXEC
+
+ +

Definition at line 75 of file mpu_ex3_systemPreInit.c.

+ +
+
+ +

◆ seg1boundary

+ +
+
+ + + + +
param seg1boundary = 0x0600
+
+ +

Definition at line 73 of file mpu_ex3_systemPreInit.c.

+ +
+
+ +

◆ seg2accmask

+ +
+
+ + + + +
param seg2accmask = MPU_READ
+
+ +

Definition at line 76 of file mpu_ex3_systemPreInit.c.

+ +
+
+ +

◆ seg2boundary

+ +
+
+ + + + +
param seg2boundary = 0x0800
+
+ +

Definition at line 74 of file mpu_ex3_systemPreInit.c.

+ +
+
+ +

◆ seg3accmask

+ +
+
+ + + + +
param seg3accmask = MPU_READ|MPU_WRITE|MPU_EXEC
+
+ +

Definition at line 77 of file mpu_ex3_systemPreInit.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.js new file mode 100644 index 0000000..26bd08e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.js @@ -0,0 +1,15 @@ +var _m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "MPU_disablePUCOnViolation", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.html#aa16a0801714cf885b71310a9e3d19790", null ], + [ "MPU_enableNMIevent", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.html#ac82a107d358f8623a1ee0f14cdeee79f", null ], + [ "MPU_initThreeSegments", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.html#af4173ddf04121ee329891bd4945e33f5", null ], + [ "MPU_start", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.html#acf9f489c8a8f5202d6aa7f9e333c258b", null ], + [ "param", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.html#a95ea9afb900e6437e2aa85f3578289b7", null ], + [ "return", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.html#a9717e7bbecb906637e86cef6da3d83c2", null ], + [ "seg1accmask", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.html#a1d86198f633b7a8ce214bc0a3d2de9f4", null ], + [ "seg1boundary", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.html#ab6b4d6a5e28b73200b2b7252584274cf", null ], + [ "seg2accmask", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.html#a6943c5f21c946a48f6e7dfb0417e7a22", null ], + [ "seg2boundary", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.html#a97322c87f0d996839137973d42296083", null ], + [ "seg3accmask", "_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c.html#ab72ed4133b34fab0cf30bb4a35b51309", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c_source.html new file mode 100644 index 0000000..de3e782 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpu_2mpu__ex3__system_pre_init_8c_source.html @@ -0,0 +1,207 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpu/mpu_ex3_systemPreInit.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpu_ex3_systemPreInit.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR59x Demo - MPU Write protection violation in the device's boot process.
+
34 // The MPU configuration code is put in the _system_pre_init() for CCS and
+
35 // __low_level_init() for IAR.
+
36 //
+
37 // Description: The MPU segment boundaries are defined by:
+
38 // Border 1 = 0x6000 [MPUSEGB1 = 0x0600]
+
39 // Border 2 = 0x8000 [MPUSEGB2 = 0x0800]
+
40 // Segment 1 = 0x4400 - 0x5FFF
+
41 // Segment 2 = 0x6000 - 0x7FFF
+
42 // Segment 3 = 0x8000 - 0x13FFF
+
43 // Segment 2 is write protected. Any write to an address in the segment 2 range
+
44 // causes a PUC.
+
45 //
+
46 // ACLK = n/a, MCLK = SMCLK = default DCO
+
47 //
+
48 //
+
49 // MSP430FR5969
+
50 // ---------------
+
51 // /|\| |
+
52 // | | |
+
53 // --|RST |
+
54 // | |
+
55 //
+
56 //******************************************************************************
+
57 
+
58 #include "driverlib.h"
+
59 
+
60 #if defined(__TI_COMPILER_VERSION__)
+
61 int _system_pre_init(void)
+
62 #elif defined(__IAR_SYSTEMS_ICC__)
+
63 int __low_level_init(void)
+
64 #elif defined(__GNUC__)
+
65 int __attribute__((naked, section(".crt_0000init"), used)) _system_pre_init(void)
+
66 #endif
+
67 {
+
68  // Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  // Configure MPU
+
72  MPU_initThreeSegmentsParam param = {0};
+
73  param.seg1boundary = 0x0600;
+
74  param.seg2boundary = 0x0800;
+
75  param.seg1accmask = MPU_READ|MPU_WRITE|MPU_EXEC;
+
76  param.seg2accmask = MPU_READ;
+
77  param.seg3accmask = MPU_READ|MPU_WRITE|MPU_EXEC;
+ +
79 
+
80  // Disable PUC on violation
+
81  MPU_disablePUCOnViolation(MPU_BASE,MPU_SECOND_SEG);
+
82 
+
83  // Enable NMI event on violation
+
84  MPU_enableNMIevent(MPU_BASE);
+
85 
+
86  // enable MPU operation
+
87  MPU_start(MPU_BASE);
+
88 
+
89  return 1;
+
90 }
+
91 
+
92 void main(void)
+
93 {
+
94 
+
95 }
+
void main(void)
+
MPU_initThreeSegmentsParam param
+
MPU_start(MPU_BASE)
+
MPU_initThreeSegments(MPU_BASE, &param)
+
MPU_disablePUCOnViolation(MPU_BASE, MPU_SECOND_SEG)
+
MPU_enableNMIevent(MPU_BASE)
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html new file mode 100644 index 0000000..003529f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex10_32bitSignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex10_32bitSignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 32x32 Signed Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RES0, RES1, RES2 and RES3.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex10_32bitSignedMultiply.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.js new file mode 100644 index 0000000..a37ec2b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c_source.html new file mode 100644 index 0000000..fc254fb --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex10__32bit_signed_multiply_8c_source.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex10_32bitSignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex10_32bitSignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop Watchdog Timer
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
69  //signed multiplication
+
70  MPY32_setOperandOne32Bit(
+
71  MPY32_MULTIPLY_SIGNED,
+
72  0x12341234);
+
73 
+
74  //Set 32-bit Operand 2 to begin the multiplication operation
+
75  MPY32_setOperandTwo32Bit(
+
76  0x56785678);
+
77 
+
78  //Wait for the result to become ready
+ + + + + +
84 
+
85  //Enter LPM4
+
86  __bis_SR_register(LPM4_bits);
+
87 
+
88  //BREAKPOINT HERE to verify the correct Result in Registers:
+
89  //Verify if values are RES0=0x0060, RES1=0x06E6, RES2=0x0CAC, RES3=0x0626
+ +
91 }
+
92 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html new file mode 100644 index 0000000..db7778e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex11_32bitSignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex11_32bitSignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 32x32 Signed Multiply Accumalate

+

Hardware multiplier is used to multiply-accumalate a set of numbers. The first calculation is automatically initiated after the second operand is loaded. A second multiply-accumulate operation is performed next. Results are stored in RES0, RES1, RES2 and RES3. SUMEXT contains the extended sign of the result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 66 of file mpy32_ex11_32bitSignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.js new file mode 100644 index 0000000..486de12 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c_source.html new file mode 100644 index 0000000..a43f181 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex11__32bit_signed_multiply_accum_8c_source.html @@ -0,0 +1,181 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex11_32bitSignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex11_32bitSignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
62 //******************************************************************************
+
63 
+
64 #include "driverlib.h"
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop Watchdog Timer
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
72  //unsigned multiplication
+
73  MPY32_setOperandOne32Bit(
+
74  MPY32_MULTIPLY_UNSIGNED,
+
75  0x12341234);
+
76  //Set 32-bit Operand 2 to begin the multiplication operation
+
77  MPY32_setOperandTwo32Bit(
+
78  0x56785678);
+
79 
+
80  //Wait for the result to become ready
+ + + + + +
86 
+
87  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
88  //signed multiplication added to the current result
+
89  MPY32_setOperandOne32Bit(
+
90  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
91  0x12341234);
+
92  //Set 32-bit Operand 2 to begin the multiplication operation
+
93  MPY32_setOperandTwo32Bit(
+
94  0x56785678);
+
95 
+
96  //Enter LPM4
+
97  __bis_SR_register(LPM4_bits);
+
98 
+
99  //BREAKPOINT HERE to verify the correct Result in Registers.
+
100  __no_operation();
+
101 }
+
102 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html new file mode 100644 index 0000000..6b10016 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex12_32bitUnsignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex12_32bitUnsignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 32x32 Unsigned Multiply Accumalate

+

Hardware multiplier is used to multiply-accumalate a set of numbers. The first calculation is automatically initiated after the second operand is loaded. A second multiply-accumulate operation is performed next. Results are stored in RES0, RES1, RES2 and RES3. SUMEXT contains the extended sign of the result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 65 of file mpy32_ex12_32bitUnsignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.js new file mode 100644 index 0000000..41eae79 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c_source.html new file mode 100644 index 0000000..c09edf3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex12__32bit_unsigned_multiply_accum_8c_source.html @@ -0,0 +1,180 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex12_32bitUnsignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex12_32bitUnsignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
62 //******************************************************************************
+
63 #include "driverlib.h"
+
64 
+
65 void main (void)
+
66 {
+
67  //Stop Watchdog Timer
+
68  WDT_A_hold(WDT_A_BASE);
+
69 
+
70  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
71  //unsigned multiplication
+
72  MPY32_setOperandOne32Bit(
+
73  MPY32_MULTIPLY_UNSIGNED,
+
74  0x12341234);
+
75  //Set 32-bit Operand 2 to begin the multiplication operation
+
76  MPY32_setOperandTwo32Bit(
+
77  0x56785678);
+
78 
+
79  //Wait for the result to become ready
+ + + + + +
85 
+
86  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
87  //unsigned multiplication added to the current result
+
88  MPY32_setOperandOne32Bit(
+
89  MPY32_MULTIPLYACCUMULATE_UNSIGNED,
+
90  0x12341234);
+
91  //Set 32-bit Operand 2 to begin the multiplication operation
+
92  MPY32_setOperandTwo32Bit(
+
93  0x56785678);
+
94 
+
95  //Enter LPM4
+
96  __bis_SR_register(LPM4_bits);
+
97  //BREAKPOINT HERE to verify the correct Result in Registers.
+
98  //0xC4C19580DCC00C0
+ +
100 }
+
101 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html new file mode 100644 index 0000000..2a7e193 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html @@ -0,0 +1,216 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex13_saturationUnderflow.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex13_saturationUnderflow.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + + + +

+Variables

uint32_t Result
 
uint16_t Result_lower16
 
uint16_t Result_upper16
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 69 of file mpy32_ex13_saturationUnderflow.c.

+ +

References __no_operation(), Result, Result_lower16, and Result_upper16.

+ +
+
+

Variable Documentation

+ +

◆ Result

+ +
+
+ + + + +
uint32_t Result
+
+

MPY - Saturation Mpode Underflow Test

+

Description: The example illustrates a special case showing underflow. Underflow occurs when adding 2 negative numbers yields a positive result. By having the saturation mode enabled, the result if rounded off to the highest negative number (0x8000.0000 for 16 bit). Results can be viewed in the debugger window.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 65 of file mpy32_ex13_saturationUnderflow.c.

+ +
+
+ +

◆ Result_lower16

+ +
+
+ + + + +
uint16_t Result_lower16
+
+ +

Definition at line 66 of file mpy32_ex13_saturationUnderflow.c.

+ +
+
+ +

◆ Result_upper16

+ +
+
+ + + + +
uint16_t Result_upper16
+
+ +

Definition at line 67 of file mpy32_ex13_saturationUnderflow.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.js new file mode 100644 index 0000000..282f1ff --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Result", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html#a393f0b6791aa78cf29746a1877494247", null ], + [ "Result_lower16", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html#a9763beb1d3667cef32e0da3789b01e13", null ], + [ "Result_upper16", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c.html#afbdc37ba5018f94d28647a31a235b701", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c_source.html new file mode 100644 index 0000000..7bb68f6 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex13__saturation_underflow_8c_source.html @@ -0,0 +1,204 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex13_saturationUnderflow.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex13_saturationUnderflow.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
62 //******************************************************************************
+
63 #include "driverlib.h"
+
64 
+
65 uint32_t Result;
+
66 uint16_t Result_lower16;
+
67 uint16_t Result_upper16;
+
68 
+
69 void main (void)
+
70 {
+
71  //Stop Watchdog Timer
+
72  WDT_A_hold(WDT_A_BASE);
+
73 
+
74 //------Pre-Multiply to setup RES0 and RES1 ------------------------
+
75 
+
76  MPY32_setOperandOne16Bit(
+
77  MPY32_MULTIPLY_UNSIGNED,
+
78  0x8000);
+
79  MPY32_setOperandTwo8Bit(
+
80  0x1);
+
81 
+
82 //------32-bit Result of a multiply operation in RES0 and RES1------
+
83 //RES1 == 0x0000
+
84 //RES0 == 0x8000
+
85 
+
86  MPY32CTL0 = MPYC; //Explicity Set MPY Carry Bit.
+
87  //Enable Saturation Mode.
+
88  MPY32_enableSaturationMode();
+
89 
+
90  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
91  //signed multiplication added to the current result
+
92  MPY32_setOperandOne16Bit(
+
93  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
94  0x8000);
+
95  //Set 16-bit Operand 2 to begin the multiplication operation
+
96  MPY32_setOperandTwo16Bit(
+
97  0x0005);
+
98 
+
99  //Wait for the result to become ready
+
100  __no_operation();
+
101  __no_operation();
+
102  __no_operation();
+
103  __no_operation();
+
104  __no_operation();
+
105 
+
106  //Read out Result
+
107  Result = MPY32_getResult();
+
108 
+
109  //Result_upper16 == 0x8000
+
110  //Result_lower16 == 0x0000
+
111 
+ +
113  Result_lower16 = (Result >> 16);
+
114 
+
115  //Disable Saturation Mode
+
116  MPY32_disableSaturationMode();
+
117 
+
118  //Enter LPM4
+
119  __bis_SR_register(LPM4_bits);
+
120  __no_operation();
+
121 }
+
122 
+ +
void main(void)
+
uint16_t Result_lower16
+
uint16_t Result_upper16
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html new file mode 100644 index 0000000..4a772ec --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html @@ -0,0 +1,216 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex14_saturationOverflow.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex14_saturationOverflow.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + + + +

+Variables

uint32_t Result
 
uint16_t Result_lower16
 
uint16_t Result_upper16
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 70 of file mpy32_ex14_saturationOverflow.c.

+ +

References __no_operation(), Result, Result_lower16, and Result_upper16.

+ +
+
+

Variable Documentation

+ +

◆ Result

+ +
+
+ + + + +
uint32_t Result
+
+

MPY - Saturation Mode Overflow Test

+

The example illustrates a special case showing overflow. The addition result of 2 positive numbers may exceed the highest positive number (0x7FFF FFFF for 32 bit result) due to overflow indicating a negative result. By having the saturation mode enabled, this result can be truncated off to this highest positive number. Results with and without saturation mode are shown.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 66 of file mpy32_ex14_saturationOverflow.c.

+ +
+
+ +

◆ Result_lower16

+ +
+
+ + + + +
uint16_t Result_lower16
+
+ +

Definition at line 67 of file mpy32_ex14_saturationOverflow.c.

+ +
+
+ +

◆ Result_upper16

+ +
+
+ + + + +
uint16_t Result_upper16
+
+ +

Definition at line 68 of file mpy32_ex14_saturationOverflow.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.js new file mode 100644 index 0000000..76a520c --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Result", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html#a393f0b6791aa78cf29746a1877494247", null ], + [ "Result_lower16", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html#a9763beb1d3667cef32e0da3789b01e13", null ], + [ "Result_upper16", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c.html#afbdc37ba5018f94d28647a31a235b701", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c_source.html new file mode 100644 index 0000000..c3207c0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex14__saturation_overflow_8c_source.html @@ -0,0 +1,210 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex14_saturationOverflow.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex14_saturationOverflow.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
63 //******************************************************************************
+
64 #include "driverlib.h"
+
65 
+
66 uint32_t Result;
+
67 uint16_t Result_lower16;
+
68 uint16_t Result_upper16;
+
69 
+
70 void main (void)
+
71 {
+
72  //Stop Watchdog Timer
+
73  WDT_A_hold(WDT_A_BASE);
+
74 
+
75 //------Pre-Multiply to setup RES0 and RES1 ------------------------
+
76 
+
77  MPY32_setOperandOne16Bit(
+
78  MPY32_MULTIPLY_UNSIGNED,
+
79  0xFFFF);
+
80  MPY32_setOperandTwo16Bit(
+
81  0x8000);
+
82  MPY32_setOperandOne16Bit(
+
83  MPY32_MULTIPLYACCUMULATE_UNSIGNED,
+
84  0x7FFD);
+
85  MPY32_setOperandTwo16Bit(
+
86  0x1);
+
87 
+
88 //------32-bit Result of a multiply operation in RES0 and RES1------
+
89 //RES1 == 0x7FFF
+
90 //RES0 == 0xFFFD
+
91 
+
92  //Enable Saturation Mode
+
93  MPY32_enableSaturationMode();
+
94 
+
95  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
96  //signed multiplication added to the current result
+
97  MPY32_setOperandOne16Bit(
+
98  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
99  0x05);
+
100 
+
101  //Set 16-bit Operand 2 to begin the multiplication operation
+
102  MPY32_setOperandTwo16Bit(
+
103  0x01);
+
104 
+
105  //Wait for the result to become ready
+
106  __no_operation();
+
107  __no_operation();
+
108  __no_operation();
+
109  __no_operation();
+
110  __no_operation();
+
111 
+
112  //Read out Result
+
113  Result = MPY32_getResult();
+
114 
+ +
116  Result_lower16 = (Result >> 16);
+
117 
+
118  //Disable Saturation Mode
+
119  MPY32_disableSaturationMode();
+
120 
+
121  //Enter LPM4
+
122  __bis_SR_register(LPM4_bits);
+
123 
+
124  //BREAKPOINT HERE to verify the correct Results:
+
125  //Result_upper16 == 0x7FFF
+
126  //Result_lower16 == 0xFFFF
+
127  __no_operation();
+
128 }
+
129 
+
uint32_t Result
+
void main(void)
+
uint16_t Result_lower16
+
uint16_t Result_upper16
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html new file mode 100644 index 0000000..f7fb7fc --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html @@ -0,0 +1,198 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex15_fractionMode.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex15_fractionMode.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + +

+Variables

uint32_t Result
 
uint16_t Result_Q15
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file mpy32_ex15_fractionMode.c.

+ +

References __no_operation(), Result, and Result_Q15.

+ +
+
+

Variable Documentation

+ +

◆ Result

+ +
+
+ + + + +
uint32_t Result
+
+

MPY - Fractional mode, Q15 multiplication

+

The example illustrates multiplication of 2 Q15 numbers in fractional mode. The result is a Q15 (15 bit) number stored in the RES1 register. It can be viewed in the debugger window.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex15_fractionMode.c.

+ +
+
+ +

◆ Result_Q15

+ +
+
+ + + + +
uint16_t Result_Q15
+
+ +

Definition at line 64 of file mpy32_ex15_fractionMode.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.js new file mode 100644 index 0000000..299d00e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Result", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html#a393f0b6791aa78cf29746a1877494247", null ], + [ "Result_Q15", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c.html#a92e9913f091bda690c6dbc95a2319102", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c_source.html new file mode 100644 index 0000000..34f2e5f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex15__fraction_mode_8c_source.html @@ -0,0 +1,181 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex15_fractionMode.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex15_fractionMode.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 uint32_t Result;
+
64 uint16_t Result_Q15;
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop Watchdog Timer
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Enable Fraction Mode
+
72  MPY32_enableFractionalMode();
+
73 
+
74  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
75  //signed multiplication
+
76  MPY32_setOperandOne16Bit(
+
77  MPY32_MULTIPLY_SIGNED,
+
78  0x7D70);
+
79  //Set 16-bit Operand 2 to begin the multiplication operation
+
80  MPY32_setOperandTwo16Bit(
+
81  0x1000);
+
82 
+
83  //Read out Result
+
84  Result = MPY32_getResult();
+
85 
+
86  Result_Q15 = (Result >> 16);
+
87  //Q15 result == 0x0FAE
+
88 
+
89  //Disable Fraction Mode
+
90  MPY32_disableFractionalMode();
+
91 
+
92  //Enter LPM4
+
93  __bis_SR_register(LPM4_bits);
+
94 
+
95  //BREAKPOINT HERE to verify the correct Result_Q15
+ +
97 }
+
98 
+
uint32_t Result
+
void main(void)
+
uint16_t Result_Q15
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html new file mode 100644 index 0000000..46bcf04 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex1_16bitUnsignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex1_16bitUnsignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 16x16 Unsigned Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RESLO and RESHI.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex1_16bitUnsignedMultiply.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.js new file mode 100644 index 0000000..3c5fd46 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c_source.html new file mode 100644 index 0000000..6980057 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex1__16bit_unsigned_multiply_8c_source.html @@ -0,0 +1,164 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex1_16bitUnsignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex1_16bitUnsignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop Watchdog Timer
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
69  //unsigned multiplication
+
70  MPY32_setOperandOne16Bit(MPY32_MULTIPLY_UNSIGNED,
+
71  0x1234);
+
72 
+
73  //Set Operand 2 to begin the multiplication operation
+
74  MPY32_setOperandTwo16Bit(0x5678);
+
75 
+
76  //Enter LPM4
+
77  __bis_SR_register(LPM4_bits);
+
78 
+
79  //BREAKPOINT HERE to verify the correct Result in Registers:
+
80  //Verify if RESLO == 0x0060 and RESHI == 0x0626
+ +
82 }
+
83 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html new file mode 100644 index 0000000..a17d3ae --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex2_8bitUnsignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex2_8bitUnsignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 8x8 Unsigned Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RESLO and RESHI.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex2_8bitUnsignedMultiply.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.js new file mode 100644 index 0000000..147a165 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c_source.html new file mode 100644 index 0000000..35aab40 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex2__8bit_unsigned_multiply_8c_source.html @@ -0,0 +1,164 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex2_8bitUnsignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex2_8bitUnsignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop Watchdog Timer
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
69  //unsigned multiplication
+
70  MPY32_setOperandOne8Bit(
+
71  MPY32_MULTIPLY_UNSIGNED,
+
72  0x12);
+
73  //Set 8- bit Operand 2 to begin the multiplication operation
+
74  MPY32_setOperandTwo8Bit(
+
75  0x56);
+
76 
+
77  //Enter LPM4
+
78  __bis_SR_register(LPM4_bits);
+
79  //BREAKPOINT HERE to verify the correct Result in Registers,
+
80  //RES0=0x060c RES1=0x0000
+ +
82 }
+
83 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html new file mode 100644 index 0000000..6dd7c93 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html @@ -0,0 +1,216 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex3_16bitSignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex3_16bitSignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + + + +

+Variables

int16_t multiplier = 0x1234
 
int16_t operand = -6578
 
int64_t Result
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 68 of file mpy32_ex3_16bitSignedMultiply.c.

+ +

References __no_operation(), multiplier, operand, and Result.

+ +
+
+

Variable Documentation

+ +

◆ multiplier

+ +
+
+ + + + +
int16_t multiplier = 0x1234
+
+

MPY - 16x16 Signed Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RESLO, RESHI and SUMEXT = FFFF if result is negative, SUMEXT = 0 otherwise. Result is also stored as Result variable.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex3_16bitSignedMultiply.c.

+ +
+
+ +

◆ operand

+ +
+
+ + + + +
int16_t operand = -6578
+
+ +

Definition at line 65 of file mpy32_ex3_16bitSignedMultiply.c.

+ +
+
+ +

◆ Result

+ +
+
+ + + + +
int64_t Result
+
+ +

Definition at line 66 of file mpy32_ex3_16bitSignedMultiply.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.js new file mode 100644 index 0000000..1ae192e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "multiplier", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html#a3b6affddfe426e29d8e6f98049e8a9f2", null ], + [ "operand", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html#a917f1d27bc92d7287c57835107470d07", null ], + [ "Result", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c.html#af5df517f0190d126def9ba83a94ef595", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c_source.html new file mode 100644 index 0000000..a562476 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex3__16bit_signed_multiply_8c_source.html @@ -0,0 +1,174 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex3_16bitSignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex3_16bitSignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 int16_t multiplier = 0x1234;
+
65 int16_t operand = -6578;
+
66 int64_t Result;
+
67 
+
68 void main (void)
+
69 {
+
70  //Stop Watchdog Timer
+
71  WDT_A_hold(WDT_A_BASE);
+
72 
+
73  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
74  //signed multiplication
+
75  MPY32_setOperandOne16Bit(
+
76  MPY32_MULTIPLY_SIGNED,
+
77  multiplier);
+
78  //Set 16-bit Operand 2 to begin the multiplication operation
+
79  MPY32_setOperandTwo16Bit(
+
80  operand);
+
81 
+
82  //Read out the result
+
83  Result = MPY32_getResult();
+
84 
+
85  //Enter LPM4
+
86  __bis_SR_register(LPM4_bits);
+
87 
+
88  //BREAKPOINT HERE to verify the correct Result
+ +
90 }
+
91 
+
int16_t multiplier
+
void main(void)
+ + + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html new file mode 100644 index 0000000..9a68a2b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex4_8bitSignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex4_8bitSignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 8x8 Signed Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RESLO, RESHI and SUMEXT = FFFF if result is negative, SUMEXT = 0 otherwise.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex4_8bitSignedMultiply.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.js new file mode 100644 index 0000000..55558f6 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c_source.html new file mode 100644 index 0000000..7b181c4 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex4__8bit_signed_multiply_8c_source.html @@ -0,0 +1,170 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex4_8bitSignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex4_8bitSignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  uint8_t value1,value2;
+
67 
+
68  //Stop Watchdog Timer
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Assign operands for signed multiplication
+
72  value1 = 0x04; //value1 == 4
+
73  value2 = 0x84; //value2 == -124
+
74 
+
75  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
76  //signed multiplication
+
77  MPY32_setOperandOne8Bit(
+
78  MPY32_MULTIPLY_SIGNED,
+
79  value1);
+
80 
+
81  //Set 8- bit Operand 2 to begin the multiplication operation
+
82  MPY32_setOperandTwo8Bit(
+
83  value2);
+
84 
+
85  //Enter LPM4
+
86  __bis_SR_register(LPM4_bits);
+
87  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
89 }
+
90 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html new file mode 100644 index 0000000..537944a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex5_16bitUnsignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex5_16bitUnsignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 16x16 Unsigned Multiply Accumulate

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. A second multiply accumulate operation is performed after that. Results are stored in RESLO and RESHI. SUMEXT contains the carry of the result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex5_16bitUnsignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.js new file mode 100644 index 0000000..d09251d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c_source.html new file mode 100644 index 0000000..697567f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex5__16bit_unsigned_multiply_accum_8c_source.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex5_16bitUnsignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex5_16bitUnsignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  //Stop Watchdog Timer
+
67  WDT_A_hold(WDT_A_BASE);
+
68 
+
69  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
70  //unsigned multiplication
+
71  MPY32_setOperandOne16Bit(
+
72  MPY32_MULTIPLY_UNSIGNED,
+
73  0x1234);
+
74  //Set 16-bit Operand 2 to begin the multiplication operation
+
75  MPY32_setOperandTwo16Bit(
+
76  0x5678);
+
77 
+
78  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
79  //unsigned multiplication added to the current result
+
80  MPY32_setOperandOne16Bit(
+
81  MPY32_MULTIPLYACCUMULATE_UNSIGNED,
+
82  0x1234);
+
83  //Set 16-bit Operand 2 to begin the multiplication operation
+
84  MPY32_setOperandTwo16Bit(
+
85  0x5678);
+
86 
+
87  //Enter LPM4
+
88  __bis_SR_register(LPM4_bits);
+
89 
+
90  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
92 }
+
93 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html new file mode 100644 index 0000000..4c897d9 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html @@ -0,0 +1,156 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex6_8bitUnsignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex6_8bitUnsignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 8x8 Unsigned Multiply Accumulate

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. A second multiply accumulate operation is performed after that. Results are stored in RESLO and RESHI. SUMEXT contains the carry of the result.

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 62 of file mpy32_ex6_8bitUnsignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.js new file mode 100644 index 0000000..c3efaba --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c_source.html new file mode 100644 index 0000000..3cf3e59 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex6__8bit_unsigned_multiply_accum_8c_source.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex6_8bitUnsignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex6_8bitUnsignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
59 //******************************************************************************
+
60 #include "driverlib.h"
+
61 
+
62 void main (void)
+
63 {
+
64  //Stop Watchdog Timer
+
65  WDT_A_hold(WDT_A_BASE);
+
66 
+
67  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
68  //unsigned multiplication
+
69  MPY32_setOperandOne8Bit(
+
70  MPY32_MULTIPLY_UNSIGNED,
+
71  0x12);
+
72  //Set 8- bit Operand 2 to begin the multiplication operation
+
73  MPY32_setOperandTwo8Bit(
+
74  0x56);
+
75 
+
76  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
77  //unsigned multiplication added to the current result
+
78  MPY32_setOperandOne8Bit(
+
79  MPY32_MULTIPLYACCUMULATE_UNSIGNED,
+
80  0x12);
+
81  //Set 8- bit Operand 2 to begin the multiplication operation
+
82  MPY32_setOperandTwo8Bit(
+
83  0x56);
+
84 
+
85  //Enter LPM4
+
86  __bis_SR_register(LPM4_bits);
+
87 
+
88  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
90 }
+
91 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html new file mode 100644 index 0000000..e47a114 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex7_16bitSignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex7_16bitSignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 16x16 Signed Multiply Accumulate

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. A second multiply-accumulate operation is performed after that. Results are stored in RESLO and RESHI. SUMEXT contains the extended sign of the result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex7_16bitSignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.js new file mode 100644 index 0000000..781dd22 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c_source.html new file mode 100644 index 0000000..2511191 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex7__16bit_signed_multiply_accum_8c_source.html @@ -0,0 +1,173 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex7_16bitSignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex7_16bitSignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  //Stop Watchdog Timer
+
67  WDT_A_hold(WDT_A_BASE);
+
68 
+
69  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
70  //unsigned multiplication
+
71  MPY32_setOperandOne16Bit(
+
72  MPY32_MULTIPLY_UNSIGNED,
+
73  0x1234);
+
74  //Set 16-bit Operand 2 to begin the multiplication operation
+
75  MPY32_setOperandTwo16Bit(
+
76  0x5678);
+
77 
+
78  //Set a 16-bit Operand into the specific Operand 1 register to specify
+
79  //signed multiplication added to the current result
+
80  MPY32_setOperandOne16Bit(
+
81  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
82  0x1234);
+
83  //Set 16-bit Operand 2 to begin the multiplication operation
+
84  MPY32_setOperandTwo16Bit(
+
85  0x5678);
+
86 
+
87  //Enter LPM4
+
88  __bis_SR_register(LPM4_bits);
+
89 
+
90  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
92 }
+
93 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html new file mode 100644 index 0000000..906d15f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html @@ -0,0 +1,157 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex8_8bitSignedMultiplyAccum.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex8_8bitSignedMultiplyAccum.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MPY - 8x8 Signed Multiply Accumulate

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. A second multiply accumulate operation is performed after that. Results are stored in RESLO and RESHI. SUMEXT contains the extended sign of result.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 64 of file mpy32_ex8_8bitSignedMultiplyAccum.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.js new file mode 100644 index 0000000..809eb76 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c_source.html new file mode 100644 index 0000000..5b7c977 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex8__8bit_signed_multiply_accum_8c_source.html @@ -0,0 +1,180 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex8_8bitSignedMultiplyAccum.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex8_8bitSignedMultiplyAccum.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
61 //******************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  uint8_t value1,value2;
+
67 
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
72  //unsigned multiplication
+
73  MPY32_setOperandOne16Bit(
+
74  MPY32_MULTIPLY_UNSIGNED,
+
75  0x1234);
+
76  //Set 8- bit Operand 2 to begin the multiplication operation
+
77  MPY32_setOperandTwo16Bit(
+
78  0x5678);
+
79 
+
80  //Load Operand Values for Signed MAC
+
81  value1 = 0x12;
+
82  value2 = 0x16;
+
83 
+
84  //Set a 8-bit Operand into the specific Operand 1 register to specify
+
85  //unsigned multiplication added to the current result
+
86  MPY32_setOperandOne8Bit(
+
87  MPY32_MULTIPLYACCUMULATE_SIGNED,
+
88  value1);
+
89 
+
90  //Set 8- bit Operand 2 to begin the multiplication operation
+
91  MPY32_setOperandTwo8Bit(
+
92  value2);
+
93 
+
94  //Enter LPM4
+
95  __bis_SR_register(LPM4_bits);
+
96 
+
97  //BREAKPOINT HERE to verify the correct Result in Registers
+ +
99 }
+
100 
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html new file mode 100644 index 0000000..e48a9a3 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html @@ -0,0 +1,180 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex9_32bitUnsignedMultiply.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
mpy32_ex9_32bitUnsignedMultiply.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + +

+Variables

uint64_t Result
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 65 of file mpy32_ex9_32bitUnsignedMultiply.c.

+ +

References __no_operation(), and Result.

+ +
+
+

Variable Documentation

+ +

◆ Result

+ +
+
+ + + + +
uint64_t Result
+
+

MPY - 32x32 Unsigned Multiply

+

Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RES0, RES1, RES2 and RES3.

+

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • MPY peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file mpy32_ex9_32bitUnsignedMultiply.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.js new file mode 100644 index 0000000..7a28eb8 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "Result", "_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c.html#a84a5e5c775453416939a34ab72557bc5", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c_source.html new file mode 100644 index 0000000..6298d7a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2mpy32_2mpy32__ex9__32bit_unsigned_multiply_8c_source.html @@ -0,0 +1,177 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/mpy32/mpy32_ex9_32bitUnsignedMultiply.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mpy32_ex9_32bitUnsignedMultiply.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 uint64_t Result;
+
64 
+
65 void main (void)
+
66 {
+
67  //Stop Watchdog Timer
+
68  WDT_A_hold(WDT_A_BASE);
+
69 
+
70  //Set a 32-bit Operand into the specific Operand 1 register to specify
+
71  //unsigned multiplication
+
72  MPY32_setOperandOne32Bit(
+
73  MPY32_MULTIPLY_UNSIGNED,
+
74  0x12341234);
+
75  //Set 32-bit Operand 2 to begin the multiplication operation
+
76  MPY32_setOperandTwo32Bit(
+
77  0x56785678);
+
78 
+
79  //Wait for the result to become ready
+ + + + + +
85 
+
86  //Read out Result
+
87  Result = MPY32_getResult();
+
88 
+
89  //Enter LPM4
+
90  __bis_SR_register(LPM4_bits);
+
91 
+
92  //BREAKPOINT HERE to verify the correct Result
+ +
94 }
+
95 
+
void main(void)
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2pmm_2pmm___reset___l_p_mx__5_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2pmm_2pmm___reset___l_p_mx__5_8c.html new file mode 100644 index 0000000..9e32836 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2pmm_2pmm___reset___l_p_mx__5_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/pmm/pmm_Reset_LPMx_5.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
pmm_Reset_LPMx_5.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2pmm_2pmm___reset___l_p_mx__5_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2pmm_2pmm___reset___l_p_mx__5_8c.js new file mode 100644 index 0000000..4c2c221 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2pmm_2pmm___reset___l_p_mx__5_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2pmm_2pmm___reset___l_p_mx__5_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2pmm_2pmm___reset___l_p_mx__5_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2pmm_2pmm___reset___l_p_mx__5_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2pmm_2pmm___reset___l_p_mx__5_8c_source.html new file mode 100644 index 0000000..a72d900 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2pmm_2pmm___reset___l_p_mx__5_8c_source.html @@ -0,0 +1,267 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/pmm/pmm_Reset_LPMx_5.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
pmm_Reset_LPMx_5.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR59xx PMM Test
+
34 // This example shows transitions between a user Reset via the reset button, a
+
35 // software triggered BOR, a previous LPMx.5 state indicator flag, and entrance
+
36 // into LPM4.5. Reading the reset interrupt flag from PMMIFG register is equivalent
+
37 // to reading from reset vector register.
+
38 //
+
39 // Upon device power on you will see the following sequence of LED's
+
40 // X = off
+
41 // O = on
+
42 //
+
43 // _0 = On indicates BOR
+
44 // _6 = On indicates Reset (from user button)
+
45 // _5 = on indicates device was previously in LPMx.5 state before the reset
+
46 // _4 = On indicates device is NOT sleeping. Off means device is in LPM4.5
+
47 //*******************************************************************************
+
48 //
+
49 // 1) Power on device:
+
50 // X0 X6 X5 O4 LED4 is on, device is running and was not in LPM4.5 mode previously.
+
51 //
+
52 // 2) Press User Reset button:
+
53 //
+
54 // X0 O6 X5 O4 Device is running and has reset due to RST pin
+
55 // O0 X6 X5 O4 Device is running and has reset due to a software BOR
+
56 // X0 X6 X5 X4 Device is now in LPM4.5
+
57 //
+
58 // 3) Press User Reset button:
+
59 // Device will restart the sequence beginning at step 2).
+
60 //
+
61 //
+
62 //********************************************************************************
+
63 #include "driverlib.h"
+
64 
+
65 void main(void)
+
66 {
+
67  //Stop WDT
+
68  WDT_A_hold(WDT_A_BASE);
+
69 
+
70  /*
+
71  * Base Address of PMM,
+
72  * By default, the pins are unlocked unless waking
+
73  * up from an LPMx.5 state in which case all GPIO
+
74  * are previously locked.
+
75  *
+
76  */
+
77  PMM_unlockLPM5();
+
78  //Set P3.4, 3.5, 3.6, 3.0 as output pins.
+
79  /*
+
80 
+
81  * Select Port 3
+
82  * Set Pin 4, 5, 6, 0 as output
+
83  */
+
84  GPIO_setAsOutputPin(
+
85  GPIO_PORT_P3,
+
86  GPIO_PIN4 + GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN0
+
87  );
+
88  //Set P3.5, 3.6, 3.0 Low.
+
89  /*
+
90 
+
91  * Select Port 3
+
92  * Set Pin 5, 6, 0 as Low
+
93  */
+ +
95  GPIO_PORT_P3,
+
96  GPIO_PIN5 + GPIO_PIN6 + GPIO_PIN0
+
97  );
+
98  //Set P3.4 as High.
+
99  /*
+
100 
+
101  * Select Port 3
+
102  * Set Pin 4 as High
+
103  */
+ +
105  GPIO_PORT_P3,
+
106  GPIO_PIN4
+
107  );
+
108 
+
109  if (PMM_getInterruptStatus(PMM_RST_INTERRUPT)) // Was this reset triggered by the Reset flag?
+
110  {
+
111  PMM_clearInterrupt(PMM_RST_INTERRUPT); // Clear reset flag
+ +
113  GPIO_PORT_P3,
+
114  GPIO_PIN6
+
115  );
+
116  __delay_cycles(1000000); // to include a visual delay.
+
117 
+
118  //Trigger a software Brown Out Reset (BOR)
+
119  /*
+
120  * Base Address of PMM,
+
121  * Forces the devices to perform a BOR.
+
122  */
+
123  PMM_trigBOR(); // Software trigger a BOR.
+
124  }
+
125 
+
126  if (PMM_getInterruptStatus(PMM_BOR_INTERRUPT)) // Was this reset triggered by the BOR flag?
+
127  {
+
128  PMM_clearInterrupt(PMM_BOR_INTERRUPT); // Clear BOR flag
+ +
130  GPIO_PORT_P3,
+
131  GPIO_PIN0
+
132  );
+
133  __delay_cycles(1000000); // to include a visual delay.
+ +
135  GPIO_PORT_P3,
+
136  GPIO_PIN4 + GPIO_PIN0
+
137  );
+
138 
+
139  //Disable Regulator
+
140  /*
+
141  * Base Address of PMM,
+
142  * Regulator is turned off when going to LPM3/4.
+
143  * System enters LPM3.5 or LPM4.5, respectively.
+
144  */
+
145  PMM_turnOffRegulator();
+
146  __bis_SR_register(LPM4_bits); // Enter LPM4.5, This automatically locks
+
147  // (if not locked already) all GPIO pins.
+
148  // and will set the LPM5 flag and set the LOCKLPM5 bit
+
149  // in the PM5CTL0 register upon wake up.
+
150  }
+
151 
+
152  while (1)
+
153  {
+
154  __no_operation(); // Don't sleep
+
155  }
+
156 }
+
void main(void)
+ +
__no_operation()
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__b_2rtc__b__ex1__calendermode_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__b_2rtc__b__ex1__calendermode_8c.html new file mode 100644 index 0000000..e29bbbe --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__b_2rtc__b__ex1__calendermode_8c.html @@ -0,0 +1,199 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/rtc_b/rtc_b_ex1_calendermode.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
rtc_b_ex1_calendermode.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void RTC_B_ISR (void)
 
+ + + +

+Variables

volatile Calendar newTime
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 69 of file rtc_b_ex1_calendermode.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ RTC_B_ISR()

+ +
+
+ + + + + + + + +
void RTC_B_ISR (void )
+
+ +

Definition at line 162 of file rtc_b_ex1_calendermode.c.

+ +

References __no_operation(), and newTime.

+ +
+
+

Variable Documentation

+ +

◆ newTime

+ +
+
+ + + + +
volatile Calendar newTime
+
+

RTC_B in Calendar mode, Interruptions every 1s, 1m, and 5th day of week at 5:00pm

+

This program demonstrates the RTC mode by triggering an interrupt every second and minute. This code toggles P1.0 every second. This code recommends an external LFXT1 crystal for RTC accuracy. Note that if XT1 is not present the code loops in an infinite loop. ACLK = LFXT1 = 32768Hz, MCLK = SMCLK = default DCO = 32 x ACLK = 1048576Hz

+

+Tested On: MSP430FR5969

+

/|\ | XIN|- | | | 32kHz —|RST XOUT|- | | | P1.0 |--> Toggles every second | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • RTC peripheral
  • +
  • CS peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • RTC_B_VECTOR
  • +
+ +

Definition at line 67 of file rtc_b_ex1_calendermode.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__b_2rtc__b__ex1__calendermode_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__b_2rtc__b__ex1__calendermode_8c.js new file mode 100644 index 0000000..cf0d79b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__b_2rtc__b__ex1__calendermode_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r5xx__6xx_2rtc__b_2rtc__b__ex1__calendermode_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2rtc__b_2rtc__b__ex1__calendermode_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "RTC_B_ISR", "_m_s_p430_f_r5xx__6xx_2rtc__b_2rtc__b__ex1__calendermode_8c.html#a775f6c4e108b72493d5ed4e2e821a4fa", null ], + [ "newTime", "_m_s_p430_f_r5xx__6xx_2rtc__b_2rtc__b__ex1__calendermode_8c.html#ac6f7bbb5bb5d80ecf8c2eb3916ee8187", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__b_2rtc__b__ex1__calendermode_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__b_2rtc__b__ex1__calendermode_8c_source.html new file mode 100644 index 0000000..1ab9e6a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__b_2rtc__b__ex1__calendermode_8c_source.html @@ -0,0 +1,271 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/rtc_b/rtc_b_ex1_calendermode.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
rtc_b_ex1_calendermode.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
64 //******************************************************************************
+
65 #include "driverlib.h"
+
66 
+
67 volatile Calendar newTime;
+
68 
+
69 void main (void)
+
70 {
+
71  Calendar currentTime;
+
72 
+
73  WDT_A_hold(WDT_A_BASE);
+
74 
+
75  //Set P1.0 to output direction
+
76  GPIO_setAsOutputPin(
+
77  GPIO_PORT_P1,
+
78  GPIO_PIN0
+
79  );
+
80 
+
81  /*
+
82  * Select Port J
+
83  * Set Pin 4, 5 to input Primary Module Function, LFXT.
+
84  */
+
85  GPIO_setAsPeripheralModuleFunctionInputPin(
+
86  GPIO_PORT_PJ,
+
87  GPIO_PIN4 + GPIO_PIN5,
+
88  GPIO_PRIMARY_MODULE_FUNCTION
+
89  );
+
90 
+
91  /*
+
92  * Disable the GPIO power-on default high-impedance mode to activate
+
93  * previously configured port settings
+
94  */
+
95  PMM_unlockLPM5();
+
96 
+
97  //Initialize LFXT1
+
98  CS_turnOnLFXT(
+
99  CS_LFXT_DRIVE_3
+
100  );
+
101 
+
102  //Setup Current Time for Calendar
+
103  currentTime.Seconds = 0x00;
+
104  currentTime.Minutes = 0x26;
+
105  currentTime.Hours = 0x13;
+
106  currentTime.DayOfWeek = 0x03;
+
107  currentTime.DayOfMonth = 0x20;
+
108  currentTime.Month = 0x07;
+
109  currentTime.Year = 0x2011;
+
110 
+
111  //Initialize Calendar Mode of RTC
+
112  /*
+
113  * Base Address of the RTC_B
+
114  * Pass in current time, intialized above
+
115  * Use BCD as Calendar Register Format
+
116  */
+
117  RTC_B_initCalendar(RTC_B_BASE,
+
118  &currentTime,
+
119  RTC_B_FORMAT_BCD);
+
120 
+
121  //Setup Calendar Alarm for 5:00pm on the 5th day of the week.
+
122  //Note: Does not specify day of the week.
+
123  RTC_B_configureCalendarAlarmParam param = {0};
+
124  param.minutesAlarm = 0x00;
+
125  param.hoursAlarm = 0x17;
+
126  param.dayOfWeekAlarm = RTC_B_ALARMCONDITION_OFF;
+
127  param.dayOfMonthAlarm = 0x05;
+
128  RTC_B_configureCalendarAlarm(RTC_B_BASE, &param);
+
129 
+
130  //Specify an interrupt to assert every minute
+
131  RTC_B_setCalendarEvent(RTC_B_BASE,
+
132  RTC_B_CALENDAREVENT_MINUTECHANGE);
+
133 
+
134  RTC_B_clearInterrupt(RTC_B_BASE,
+
135  RTC_B_CLOCK_READ_READY_INTERRUPT +
+
136  RTC_B_TIME_EVENT_INTERRUPT +
+
137  RTC_B_CLOCK_ALARM_INTERRUPT
+
138  );
+
139  //Enable interrupt for RTC Ready Status, which asserts when the RTC
+
140  //Calendar registers are ready to read.
+
141  //Also, enable interrupts for the Calendar alarm and Calendar event.
+
142  RTC_B_enableInterrupt(RTC_B_BASE,
+
143  RTC_B_CLOCK_READ_READY_INTERRUPT +
+
144  RTC_B_TIME_EVENT_INTERRUPT +
+
145  RTC_B_CLOCK_ALARM_INTERRUPT
+
146  );
+
147 
+
148  //Start RTC Clock
+
149  RTC_B_startClock(RTC_B_BASE);
+
150 
+
151  //Enter LPM3 mode with interrupts enabled
+
152  __bis_SR_register(LPM0_bits + GIE);
+
153  __no_operation();
+
154 }
+
155 
+
156 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
157 #pragma vector=RTC_VECTOR
+
158 __interrupt
+
159 #elif defined(__GNUC__)
+
160 __attribute__((interrupt(RTC_VECTOR)))
+
161 #endif
+
162 void RTC_B_ISR (void)
+
163 {
+
164  switch (__even_in_range(RTCIV,16)){
+
165  case 0: break; //No interrupts
+
166  case 2: //RTCRDYIFG
+
167  //Toggle P1.0 every second
+
168  GPIO_toggleOutputOnPin(
+
169  GPIO_PORT_P1,
+
170  GPIO_PIN0);
+
171  break;
+
172  case 4: //RTCEVIFG
+
173  //Interrupts every minute
+
174  __no_operation();
+
175 
+
176  //Read out New Time a Minute Later BREAKPOINT HERE
+
177  newTime = RTC_B_getCalendarTime(RTC_B_BASE);
+
178  break;
+
179  case 6: //RTCAIFG
+
180  //Interrupts 5:00pm on 5th day of week
+
181  __no_operation();
+
182  break;
+
183  case 8: break; //RT0PSIFG
+
184  case 10: break; //RT1PSIFG
+
185  case 12: break; //Reserved
+
186  case 14: break; //Reserved
+
187  case 16: break; //Reserved
+
188  default: break;
+
189  }
+
190 }
+
191 
+
MPU_initThreeSegmentsParam param
+
void main(void)
+
void RTC_B_ISR(void)
+
volatile Calendar newTime
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.html new file mode 100644 index 0000000..2b565fc --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.html @@ -0,0 +1,199 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/rtc_c/rtc_c_ex1_calendarmode.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
rtc_c_ex1_calendarmode.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void RTC_ISR (void)
 
+ + + +

+Variables

volatile Calendar newTime
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 70 of file rtc_c_ex1_calendarmode.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ RTC_ISR()

+ +
+
+ + + + + + + + +
void RTC_ISR (void )
+
+ +

Definition at line 154 of file rtc_c_ex1_calendarmode.c.

+ +

References __no_operation(), and newTime.

+ +
+
+

Variable Documentation

+ +

◆ newTime

+ +
+
+ + + + +
volatile Calendar newTime
+
+

RTC_C in Calendar mode, Interruptions every 1s, 1m, and 5th day of week at 5:00pm

+

This program demonstrates the RTC mode by triggering an interrupt every second and minute. This code toggles P1.0 every second. This code recommends an external LFXT1 crystal for RTC accuracy. Note that if XT1 is not present the code loops in an infinite loop. ACLK = LFXT1 = 32768Hz, MCLK = SMCLK = default DCO = 32 x ACLK = 1048576Hz

+

+Tested On: MSP430FR6989

+

/|\ | XIN|- | | | 32kHz —|RST XOUT|- | | | P1.0 |--> Toggles every second | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • RTC peripheral
  • +
  • CS peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • RTC_VECTOR
  • +
+ +

Definition at line 68 of file rtc_c_ex1_calendarmode.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.js new file mode 100644 index 0000000..9dd1367 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "RTC_ISR", "_m_s_p430_f_r5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.html#aab67b5b38d41e40c3d03447137ba8ef5", null ], + [ "newTime", "_m_s_p430_f_r5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c.html#ac6f7bbb5bb5d80ecf8c2eb3916ee8187", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c_source.html new file mode 100644 index 0000000..71a93d4 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2rtc__c_2rtc__c__ex1__calendarmode_8c_source.html @@ -0,0 +1,262 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/rtc_c/rtc_c_ex1_calendarmode.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
rtc_c_ex1_calendarmode.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
64 //******************************************************************************
+
65 
+
66 #include "driverlib.h"
+
67 
+
68 volatile Calendar newTime;
+
69 
+
70 void main (void)
+
71 {
+
72  Calendar currentTime;
+
73 
+
74  WDT_A_hold(WDT_A_BASE);
+
75 
+
76  //Set P1.0 to output direction
+
77  GPIO_setAsOutputPin(
+
78  GPIO_PORT_P1,
+
79  GPIO_PIN0
+
80  );
+
81 
+
82  /*
+
83  * Disable the GPIO power-on default high-impedance mode to activate
+
84  * previously configured port settings
+
85  */
+
86  PMM_unlockLPM5();
+
87 
+
88  // Configure PJ.4 and PJ.5 as input pins for LFXIN and LFXOUT mode
+
89  GPIO_setAsPeripheralModuleFunctionInputPin(
+
90  GPIO_PORT_PJ,
+
91  GPIO_PIN4 | GPIO_PIN5,
+
92  GPIO_PRIMARY_MODULE_FUNCTION
+
93  );
+
94 
+
95  //Initialize LFXT1
+
96  CS_turnOnLFXT(
+
97  CS_LFXT_DRIVE_3
+
98  );
+
99 
+
100  //Setup Current Time for Calendar
+
101  currentTime.Seconds = 0x00;
+
102  currentTime.Minutes = 0x26;
+
103  currentTime.Hours = 0x13;
+
104  currentTime.DayOfWeek = 0x03;
+
105  currentTime.DayOfMonth = 0x20;
+
106  currentTime.Month = 0x07;
+
107  currentTime.Year = 0x2011;
+
108 
+
109  //Initialize Calendar Mode of RTC
+
110  /*
+
111  * Base Address of the RTC_A
+
112  * Pass in current time, intialized above
+
113  * Use BCD as Calendar Register Format
+
114  */
+
115  RTC_C_initCalendar(RTC_C_BASE,
+
116  &currentTime,
+
117  RTC_C_FORMAT_BCD);
+
118 
+
119  //Setup Calendar Alarm for 5:00pm on the 5th day of the week.
+
120  //Note: Does not specify day of the week.
+
121  RTC_C_configureCalendarAlarmParam param = {0};
+
122  param.minutesAlarm = 0x00;
+
123  param.hoursAlarm = 0x17;
+
124  param.dayOfWeekAlarm = RTC_C_ALARMCONDITION_OFF;
+
125  param.dayOfMonthAlarm = 0x05;
+
126  RTC_C_configureCalendarAlarm(RTC_C_BASE, &param);
+
127 
+
128  //Specify an interrupt to assert every minute
+
129  RTC_C_setCalendarEvent(RTC_C_BASE,
+
130  RTC_C_CALENDAREVENT_MINUTECHANGE);
+
131 
+
132  //Enable interrupt for RTC Ready Status, which asserts when the RTC
+
133  //Calendar registers are ready to read.
+
134  //Also, enable interrupts for the Calendar alarm and Calendar event.
+
135  RTC_C_enableInterrupt(RTC_C_BASE,
+
136  RTCRDYIE + RTCTEVIE + RTCAIE);
+
137  RTC_C_enableInterrupt(RTC_C_BASE,
+
138  RTCRDYIFG + RTCTEVIFG + RTCAIFG);
+
139 
+
140  //Start RTC Clock
+
141  RTC_C_startClock(RTC_C_BASE);
+
142 
+
143  //Enter LPM3 mode with interrupts enabled
+
144  __bis_SR_register(LPM3_bits + GIE);
+
145  __no_operation();
+
146 }
+
147 
+
148 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
149 #pragma vector=RTC_VECTOR
+
150 __interrupt
+
151 #elif defined(__GNUC__)
+
152 __attribute__((interrupt(RTC_VECTOR)))
+
153 #endif
+
154 void RTC_ISR (void)
+
155 {
+
156  switch (__even_in_range(RTCIV, 16)) {
+
157  case RTCIV_NONE: break; //No interrupts
+
158  case RTCIV_RTCOFIFG: break; //RTCOFIFG
+
159  case RTCIV_RTCRDYIFG: //RTCRDYIFG
+
160  //Toggle P1.0 every second
+
161  GPIO_toggleOutputOnPin(
+
162  GPIO_PORT_P1,
+
163  GPIO_PIN0);
+
164  break;
+
165  case RTCIV_RTCTEVIFG: //RTCEVIFG
+
166  //Interrupts every minute
+
167  __no_operation();
+
168 
+
169  //Read out New Time a Minute Later BREAKPOINT HERE
+
170  newTime = RTC_C_getCalendarTime(RTC_C_BASE);
+
171  break;
+
172  case RTCIV_RTCAIFG: //RTCAIFG
+
173  //Interrupts 5:00pm on 5th day of week
+
174  __no_operation();
+
175  break;
+
176  case RTCIV_RT0PSIFG: break; //RT0PSIFG
+
177  case RTCIV_RT1PSIFG: break; //RT1PSIFG
+
178 
+
179  default: break;
+
180  }
+
181 }
+
182 
+
void main(void)
+
void RTC_ISR(void)
+
volatile Calendar newTime
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.html new file mode 100644 index 0000000..fcc2b54 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.html @@ -0,0 +1,198 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_a/timer_a_ex1_pwmSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex1_pwmSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define TIMER_A_PERIOD   524
 
#define DUTY_CYCLE   393
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE

+ +
+
+ + + + +
#define DUTY_CYCLE   393
+
+ +

Definition at line 64 of file timer_a_ex1_pwmSingle.c.

+ +
+
+ +

◆ TIMER_A_PERIOD

+ +
+
+ + + + +
#define TIMER_A_PERIOD   524
+
+

Timer_A3, PWM TA1.2, Up Mode, DCO SMCLK

+

Description: This program generates PWM outputs on P2.2 using Timer1_A configured for up mode. The value , TIMER_PERIOD, defines the PWM period and the value DUTY_CYCLE the PWM duty cycle. Using ~1.045MHz SMCLK as TACLK, the timer period is ~500us with a 75% duty cycle on P2.2 ACLK = n/a, SMCLK = MCLK = TACLK = default DCO ~1.045MHz.

+

+Tested On: MSP430FR5969

+ + + + + +
/ |
RST
+

| | | P1.2/TA1.1|--> CCR1 - 75% PWM | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file timer_a_ex1_pwmSingle.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 67 of file timer_a_ex1_pwmSingle.c.

+ +

References __no_operation(), DUTY_CYCLE, param, and TIMER_A_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.js new file mode 100644 index 0000000..5d78a97 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c = +[ + [ "DUTY_CYCLE", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.html#a940d0fcbbee0921e43201c554231947c", null ], + [ "TIMER_A_PERIOD", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.html#ae899bfdc491d37c006b4c301d9f8e147", null ], + [ "main", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c_source.html new file mode 100644 index 0000000..8a59cfe --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex1__pwm_single_8c_source.html @@ -0,0 +1,186 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_a/timer_a_ex1_pwmSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex1_pwmSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*******************************************************************************
+
59 //******************************************************************************
+
60 
+
61 #include "driverlib.h"
+
62 
+
63 #define TIMER_A_PERIOD 524
+
64 #define DUTY_CYCLE 393
+
65 
+
66 
+
67 void main (void)
+
68 {
+
69  //Stop WDT
+
70  WDT_A_hold(WDT_A_BASE);
+
71 
+
72  //P1.2 as PWM output
+
73  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
74  GPIO_PORT_P1,
+
75  GPIO_PIN2,
+
76  GPIO_PRIMARY_MODULE_FUNCTION
+
77  );
+
78 
+
79  /*
+
80  * Disable the GPIO power-on default high-impedance mode to activate
+
81  * previously configured port settings
+
82  */
+
83  PMM_unlockLPM5();
+
84 
+
85  //Generate PWM - Timer runs in Up-Down mode
+
86  Timer_A_outputPWMParam param = {0};
+
87  param.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
88  param.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
89  param.timerPeriod = TIMER_A_PERIOD;
+
90  param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
+
91  param.compareOutputMode = TIMER_A_OUTPUTMODE_RESET_SET;
+
92  param.dutyCycle = DUTY_CYCLE;
+
93  Timer_A_outputPWM(TIMER_A1_BASE, &param);
+
94 
+
95  //Enter LPM0
+
96  __bis_SR_register(LPM0_bits);
+
97 
+
98  //For debugger
+ +
100 }
+
101 
+
void main(void)
+
MPU_initThreeSegmentsParam param
+
#define DUTY_CYCLE
+
#define TIMER_A_PERIOD
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html new file mode 100644 index 0000000..76172e7 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html @@ -0,0 +1,204 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_a/timer_a_ex2_continousModeOperationWithCCR0Interrupt.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex2_continousModeOperationWithCCR0Interrupt.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define COMPARE_VALUE   50000
 
+ + + + + +

+Functions

void main (void)
 
void TIMER1_A0_ISR (void)
 
+

Macro Definition Documentation

+ +

◆ COMPARE_VALUE

+ +
+
+ + + + +
#define COMPARE_VALUE   50000
+
+

TIMER_A, Toggle P1.0, CCR0 Cont. Mode ISR, DCO SMCLK

+

Toggle P1.0 using software and TA_0 ISR. Toggles every 50000 SMCLK cycles. SMCLK provides clock source for TACLK. During the TA_0 ISR, P1.0 is toggled and 50000 clock cycles are added to CCR0. TA_0 ISR is triggered every 50000 cycles. CPU is normally off and used only during TA_ISR. ACLK = n/a, MCLK = SMCLK = TACLK = default DCO ~1.045MHz

+

+Tested On: MSP430FR5969

+ + + + + +
/ |
RST
+

| | | P1.0|-->LED

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • TimerA peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • Timer A0
  • +
+ +

Definition at line 64 of file timer_a_ex2_continousModeOperationWithCCR0Interrupt.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file timer_a_ex2_continousModeOperationWithCCR0Interrupt.c.

+ +

References __no_operation(), and COMPARE_VALUE.

+ +
+
+ +

◆ TIMER1_A0_ISR()

+ +
+
+ + + + + + + + +
void TIMER1_A0_ISR (void )
+
+ +

Definition at line 126 of file timer_a_ex2_continousModeOperationWithCCR0Interrupt.c.

+ +

References COMPARE_VALUE.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.js new file mode 100644 index 0000000..a9cfa98 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c = +[ + [ "COMPARE_VALUE", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html#a655c866eb3f7ee47831709b091612e63", null ], + [ "main", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMER1_A0_ISR", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c.html#a7041a18d2acb50837a4cbfb1bd386bd7", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c_source.html new file mode 100644 index 0000000..db1ceca --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex2__continous_mode_operation_with_c_c_r0_interrupt_8c_source.html @@ -0,0 +1,227 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_a/timer_a_ex2_continousModeOperationWithCCR0Interrupt.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex2_continousModeOperationWithCCR0Interrupt.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //
+
61 //*****************************************************************************
+
62 #include "driverlib.h"
+
63 
+
64 #define COMPARE_VALUE 50000
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Set P1.0 to output direction
+
72  GPIO_setAsOutputPin(
+
73  GPIO_PORT_P1,
+
74  GPIO_PIN0
+
75  );
+
76 
+
77  /*
+
78  * Disable the GPIO power-on default high-impedance mode to activate
+
79  * previously configured port settings
+
80  */
+
81  PMM_unlockLPM5();
+
82 
+
83  //Start timer in continuous mode sourced by SMCLK
+
84  Timer_A_initContinuousModeParam initContParam = {0};
+
85  initContParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
86  initContParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
87  initContParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
88  initContParam.timerClear = TIMER_A_DO_CLEAR;
+
89  initContParam.startTimer = false;
+
90  Timer_A_initContinuousMode(TIMER_A1_BASE, &initContParam);
+
91 
+
92  //Initiaze compare mode
+
93  Timer_A_clearCaptureCompareInterrupt(TIMER_A1_BASE,
+
94  TIMER_A_CAPTURECOMPARE_REGISTER_0
+
95  );
+
96 
+
97  Timer_A_initCompareModeParam initCompParam = {0};
+
98  initCompParam.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_0;
+
99  initCompParam.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_ENABLE;
+
100  initCompParam.compareOutputMode = TIMER_A_OUTPUTMODE_OUTBITVALUE;
+
101  initCompParam.compareValue = COMPARE_VALUE;
+
102  Timer_A_initCompareMode(TIMER_A1_BASE, &initCompParam);
+
103 
+
104  Timer_A_startCounter( TIMER_A1_BASE,
+
105  TIMER_A_CONTINUOUS_MODE
+
106  );
+
107 
+
108  //Enter LPM0, enable interrupts
+
109  __bis_SR_register(LPM0_bits + GIE);
+
110 
+
111  //For debugger
+
112  __no_operation();
+
113 }
+
114 
+
115 //******************************************************************************
+
116 //
+
117 //This is the TIMER1_A3 interrupt vector service routine.
+
118 //
+
119 //******************************************************************************
+
120 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
121 #pragma vector=TIMER1_A0_VECTOR
+
122 __interrupt
+
123 #elif defined(__GNUC__)
+
124 __attribute__((interrupt(TIMER1_A0_VECTOR)))
+
125 #endif
+
126 void TIMER1_A0_ISR (void)
+
127 {
+
128  uint16_t compVal = Timer_A_getCaptureCompareCount(TIMER_A1_BASE,
+
129  TIMER_A_CAPTURECOMPARE_REGISTER_0)
+
130  + COMPARE_VALUE;
+
131 
+
132  //Toggle P1.0
+
133  GPIO_toggleOutputOnPin(
+
134  GPIO_PORT_P1,
+
135  GPIO_PIN0
+
136  );
+
137 
+
138  //Add Offset to CCR0
+
139  Timer_A_setCompareValue(TIMER_A1_BASE,
+
140  TIMER_A_CAPTURECOMPARE_REGISTER_0,
+
141  compVal
+
142  );
+
143 }
+
144 
+ + + + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html new file mode 100644 index 0000000..2daeecb --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html @@ -0,0 +1,179 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_a/timer_a_ex3_continousModeOperationWithTAIEInterrupt.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex3_continousModeOperationWithTAIEInterrupt.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void TIMER1_A1_ISR (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

TIMER_A, Toggle P1.0, Overflow ISR, 32kHz ACLK

+

Description: Toggle P1.0 using software and the TIMER_A overflow ISR. In this example an ISR triggers when TB overflows. Inside the ISR P1.0 is toggled. Toggle rate is exactly 0.25Hz = [32kHz/FFFFh]/2. Proper use of the TAIV interrupt vector generator is demonstrated. ACLK = TBCLK = 32kHz, MCLK = SMCLK = default DCO ~ 1.045MHz

+

+Tested On: MSP430FR5969

+ + + + + +
/ |
RST
+

| | | P1.0|-->LED

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • TIMER_A7
  • +
+ +

Definition at line 63 of file timer_a_ex3_continousModeOperationWithTAIEInterrupt.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ TIMER1_A1_ISR()

+ +
+
+ + + + + + + + +
void TIMER1_A1_ISR (void )
+
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.js new file mode 100644 index 0000000..10a8984 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMER1_A1_ISR", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c.html#a75b17bc1a2d3b4b8e3b7fff08b7651a8", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c_source.html new file mode 100644 index 0000000..2d5f1e5 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex3__continous_mode_operation_with_t_a_i_e_interrupt_8c_source.html @@ -0,0 +1,219 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_a/timer_a_ex3_continousModeOperationWithTAIEInterrupt.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex3_continousModeOperationWithTAIEInterrupt.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
59 //
+
60 //*****************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop WDT
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set P1.0 to output direction
+
69  GPIO_setAsOutputPin(
+
70  GPIO_PORT_P1,
+
71  GPIO_PIN0
+
72  );
+
73 
+
74  /*
+
75  * Disable the GPIO power-on default high-impedance mode to activate
+
76  * previously configured port settings
+
77  */
+
78  PMM_unlockLPM5();
+
79 
+
80  //Start timer in continuous mode sourced by ACLK
+
81  Timer_A_clearTimerInterrupt(TIMER_A1_BASE);
+
82 
+
83  Timer_A_initContinuousModeParam param = {0};
+
84  param.clockSource = TIMER_A_CLOCKSOURCE_ACLK;
+
85  param.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
86  param.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_ENABLE;
+
87  param.timerClear = TIMER_A_DO_CLEAR;
+
88  param.startTimer = false;
+
89  Timer_A_initContinuousMode(TIMER_A1_BASE, &param);
+
90 
+
91  Timer_A_startCounter(TIMER_A1_BASE,
+
92  TIMER_A_CONTINUOUS_MODE
+
93  );
+
94 
+
95  //Enter LPM0, enable interrupts
+
96  __bis_SR_register(LPM0_bits + GIE);
+
97 
+
98  //For debugger
+ +
100 }
+
101 
+
102 //******************************************************************************
+
103 //
+
104 //This is the TIMER1_A3 interrupt vector service routine.
+
105 //
+
106 //******************************************************************************
+
107 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
108 #pragma vector=TIMER1_A1_VECTOR
+
109 __interrupt
+
110 #elif defined(__GNUC__)
+
111 __attribute__((interrupt(TIMER1_A1_VECTOR)))
+
112 #endif
+
113 void TIMER1_A1_ISR (void)
+
114 {
+
115  //Any access, read or write, of the TAIV register automatically resets the
+
116  //highest "pending" interrupt flag
+
117  switch ( __even_in_range(TA1IV,14) ){
+
118  case 0: break; //No interrupt
+
119  case 2: break; //CCR1 not used
+
120  case 4: break; //CCR2 not used
+
121  case 6: break; //CCR3 not used
+
122  case 8: break; //CCR4 not used
+
123  case 10: break; //CCR5 not used
+
124  case 12: break; //CCR6 not used
+
125  case 14:
+
126  //Toggle P1.0 // overflow
+
127  GPIO_toggleOutputOnPin(
+
128  GPIO_PORT_P1,
+
129  GPIO_PIN0
+
130  );
+
131  break;
+
132  default: break;
+
133  }
+
134 }
+
135 
+ + +
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html new file mode 100644 index 0000000..7880e25 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html @@ -0,0 +1,216 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_a/timer_a_ex4_pwmMultipleUpDown.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex4_pwmMultipleUpDown.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Macros

#define TIMER_PERIOD   127
 
#define DUTY_CYCLE1   32
 
#define DUTY_CYCLE2   96
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE1

+ +
+
+ + + + +
#define DUTY_CYCLE1   32
+
+ +

Definition at line 66 of file timer_a_ex4_pwmMultipleUpDown.c.

+ +
+
+ +

◆ DUTY_CYCLE2

+ +
+
+ + + + +
#define DUTY_CYCLE2   96
+
+ +

Definition at line 67 of file timer_a_ex4_pwmMultipleUpDown.c.

+ +
+
+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   127
+
+

Timer_A3, PWM TA1.1-2, Up/Down Mode, DCO SMCLK

+

Description: This program generates two PWM outputs on P2.2,3 using Timer1_A configured for up/down mode. The value in CCR0, 128, defines the PWM period/2 and the values in CCR1 and CCR2 the PWM duty cycles. Using ~1.045MHz SMCLK as TACLK, the timer period is ~233us with a 75% duty cycle on P2.2 and 25% on P2.3. SMCLK = MCLK = TACLK = default DCO ~1.045MHz.

+

+Tested On: MSP430FR5969

+ + + + + +
/ |
RST
+

| | | P1.2/TA1.1|--> CCR1 - 75% PWM | P1.3/TA1.2|--> CCR2 - 25% PWM

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 65 of file timer_a_ex4_pwmMultipleUpDown.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 69 of file timer_a_ex4_pwmMultipleUpDown.c.

+ +

References __no_operation(), DUTY_CYCLE1, DUTY_CYCLE2, and TIMER_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.js new file mode 100644 index 0000000..11a6753 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c = +[ + [ "DUTY_CYCLE1", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html#abb796f001390b47f0f733ea9a08481db", null ], + [ "DUTY_CYCLE2", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html#a497fa7efc7cefe7b023b4215f48cfe2a", null ], + [ "TIMER_PERIOD", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "main", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c_source.html new file mode 100644 index 0000000..f4d870e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex4__pwm_multiple_up_down_8c_source.html @@ -0,0 +1,209 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_a/timer_a_ex4_pwmMultipleUpDown.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex4_pwmMultipleUpDown.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*******************************************************************************
+
61 //
+
62 //*****************************************************************************
+
63 #include "driverlib.h"
+
64 
+
65 #define TIMER_PERIOD 127
+
66 #define DUTY_CYCLE1 32
+
67 #define DUTY_CYCLE2 96
+
68 
+
69 void main (void)
+
70 {
+
71  //Stop WDT
+
72  WDT_A_hold(WDT_A_BASE);
+
73 
+
74  //P1.2 and P1.3 output
+
75  //P1.2 and P1.3 options select
+
76  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
77  GPIO_PORT_P1,
+
78  GPIO_PIN2 + GPIO_PIN3,
+
79  GPIO_PRIMARY_MODULE_FUNCTION
+
80  );
+
81 
+
82  /*
+
83  * Disable the GPIO power-on default high-impedance mode to activate
+
84  * previously configured port settings
+
85  */
+
86  PMM_unlockLPM5();
+
87 
+
88  //Start Timer
+
89  Timer_A_initUpDownModeParam initUpDownParam = {0};
+
90  initUpDownParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
91  initUpDownParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
92  initUpDownParam.timerPeriod = TIMER_PERIOD;
+
93  initUpDownParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
94  initUpDownParam.captureCompareInterruptEnable_CCR0_CCIE =
+
95  TIMER_A_CCIE_CCR0_INTERRUPT_DISABLE;
+
96  initUpDownParam.timerClear = TIMER_A_DO_CLEAR;
+
97  initUpDownParam.startTimer = false;
+
98  Timer_A_initUpDownMode(TIMER_A1_BASE, &initUpDownParam);
+
99 
+
100  Timer_A_startCounter( TIMER_A1_BASE,
+
101  TIMER_A_UPDOWN_MODE
+
102  );
+
103 
+
104  //Initialze compare registers to generate PWM1
+
105  Timer_A_initCompareModeParam initComp1Param = {0};
+
106  initComp1Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
+
107  initComp1Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
108  initComp1Param.compareOutputMode = TIMER_A_OUTPUTMODE_TOGGLE_SET;
+
109  initComp1Param.compareValue = DUTY_CYCLE1;
+
110  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp1Param);
+
111 
+
112  //Initialze compare registers to generate PWM2
+
113  Timer_A_initCompareModeParam initComp2Param = {0};
+
114  initComp2Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_2;
+
115  initComp2Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
116  initComp2Param.compareOutputMode = TIMER_A_OUTPUTMODE_TOGGLE_SET;
+
117  initComp2Param.compareValue = DUTY_CYCLE2;
+
118  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp2Param);
+
119 
+
120  //Enter LPM0
+
121  __bis_SR_register(LPM0_bits);
+
122 
+
123  //For debugger
+
124  __no_operation();
+
125 }
+
126 
+
void main(void)
+
#define DUTY_CYCLE2
+
#define DUTY_CYCLE1
+
#define TIMER_PERIOD
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html new file mode 100644 index 0000000..6862a82 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html @@ -0,0 +1,215 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_a/timer_a_ex5_pwmMultipleUp.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex5_pwmMultipleUp.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Macros

#define TIMER_PERIOD   511
 
#define DUTY_CYCLE1   384
 
#define DUTY_CYCLE2   128
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE1

+ +
+
+ + + + +
#define DUTY_CYCLE1   384
+
+ +

Definition at line 63 of file timer_a_ex5_pwmMultipleUp.c.

+ +
+
+ +

◆ DUTY_CYCLE2

+ +
+
+ + + + +
#define DUTY_CYCLE2   128
+
+ +

Definition at line 64 of file timer_a_ex5_pwmMultipleUp.c.

+ +
+
+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   511
+
+

This program generates two PWM outputs on P1.2,P1.3 using Timer1_A configured for up mode. The value in CCR0, 512-1, defines the PWM period and the values in CCR1 and CCR2 the PWM duty cycles. Using ~1.045MHz SMCLK as TACLK, the timer period is ~500us with a 75% duty cycle on P2.2 and 25% on P2.3. ACLK = n/a, SMCLK = MCLK = TACLK = default DCO ~1.045MHz.

+

+Tested On: MSP430FR5969

+ + + + + +
/ |
RST
+

| | | P1.2/TA1.1|--> CCR1 - 75% PWM | P1.3/TA1.2|--> CCR2 - 25% PWM

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 62 of file timer_a_ex5_pwmMultipleUp.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file timer_a_ex5_pwmMultipleUp.c.

+ +

References __no_operation(), DUTY_CYCLE1, DUTY_CYCLE2, param, and TIMER_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.js new file mode 100644 index 0000000..5749b08 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.js @@ -0,0 +1,7 @@ +var _m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c = +[ + [ "DUTY_CYCLE1", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html#abb796f001390b47f0f733ea9a08481db", null ], + [ "DUTY_CYCLE2", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html#a497fa7efc7cefe7b023b4215f48cfe2a", null ], + [ "TIMER_PERIOD", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "main", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c_source.html new file mode 100644 index 0000000..11677be --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex5__pwm_multiple_up_8c_source.html @@ -0,0 +1,209 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_a/timer_a_ex5_pwmMultipleUp.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex5_pwmMultipleUp.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*******************************************************************************
+
59 //*****************************************************************************
+
60 #include "driverlib.h"
+
61 
+
62 #define TIMER_PERIOD 511
+
63 #define DUTY_CYCLE1 384
+
64 #define DUTY_CYCLE2 128
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //P1.2 and P1.3 output
+
72  //P1.2 and P1.3 options select
+
73  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
74  GPIO_PORT_P1,
+
75  GPIO_PIN2 + GPIO_PIN3,
+
76  GPIO_PRIMARY_MODULE_FUNCTION
+
77  );
+
78 
+
79  /*
+
80  * Disable the GPIO power-on default high-impedance mode to activate
+
81  * previously configured port settings
+
82  */
+
83  PMM_unlockLPM5();
+
84 
+
85  //Start timer
+
86  Timer_A_initUpModeParam param = {0};
+
87  param.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
88  param.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
89  param.timerPeriod = TIMER_PERIOD;
+
90  param.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
91  param.captureCompareInterruptEnable_CCR0_CCIE =
+
92  TIMER_A_CCIE_CCR0_INTERRUPT_DISABLE;
+
93  param.timerClear = TIMER_A_DO_CLEAR;
+
94  param.startTimer = false;
+
95  Timer_A_initUpMode(TIMER_A1_BASE, &param);
+
96 
+
97  Timer_A_startCounter( TIMER_A1_BASE,
+
98  TIMER_A_UP_MODE
+
99  );
+
100 
+
101  //Initialize compare mode to generate PWM1
+
102  Timer_A_initCompareModeParam initComp1Param = {0};
+
103  initComp1Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
+
104  initComp1Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
105  initComp1Param.compareOutputMode = TIMER_A_OUTPUTMODE_RESET_SET;
+
106  initComp1Param.compareValue = DUTY_CYCLE1;
+
107  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp1Param);
+
108 
+
109  //Initialize compare mode to generate PWM2
+
110  Timer_A_initCompareModeParam initComp2Param = {0};
+
111  initComp2Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_2;
+
112  initComp2Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
113  initComp2Param.compareOutputMode = TIMER_A_OUTPUTMODE_RESET_SET;
+
114  initComp2Param.compareValue = DUTY_CYCLE2;
+
115  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp2Param);
+
116 
+
117  //Enter LPM0
+
118  __bis_SR_register(LPM0_bits);
+
119 
+
120  //For debugger
+
121  __no_operation();
+
122 }
+
123 
+
void main(void)
+
MPU_initThreeSegmentsParam param
+
#define DUTY_CYCLE2
+
#define DUTY_CYCLE1
+
#define TIMER_PERIOD
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html new file mode 100644 index 0000000..ea6a094 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html @@ -0,0 +1,197 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_a/timer_a_ex6_upDownModeOperation.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_a_ex6_upDownModeOperation.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define TIMER_A_PERIOD   250
 
#define DUTY_CYCLE   250
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE

+ +
+
+ + + + +
#define DUTY_CYCLE   250
+
+ +

Definition at line 64 of file timer_a_ex6_upDownModeOperation.c.

+ +
+
+ +

◆ TIMER_A_PERIOD

+ +
+
+ + + + +
#define TIMER_A_PERIOD   250
+
+

Toggle P2.4 using hardware TA1.0 output. Timer1_A is configured for up/down mode with CCR0 defining period, TA1.0 also output on P2.4. In this example, CCR0 is loaded with 250 and TA1.0 will toggle P2.4 at TACLK/2*250. Thus the output frequency on P2.4 will be the TACLK/1000. No CPU or software resources required. As coded with TACLK = SMCLK, P2.4 output frequency is ~1.045M/1000. SMCLK = MCLK = TACLK = default DCO ~1.045MHz

+

+Tested On: MSP430FR5969

+ + + + + +
/ |
RST
+

| | | P2.4/TA1.0|--> SMCLK/1000

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file timer_a_ex6_upDownModeOperation.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file timer_a_ex6_upDownModeOperation.c.

+ +

References __no_operation(), DUTY_CYCLE, and TIMER_A_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.js new file mode 100644 index 0000000..b2ed17a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c = +[ + [ "DUTY_CYCLE", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html#a940d0fcbbee0921e43201c554231947c", null ], + [ "TIMER_A_PERIOD", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html#ae899bfdc491d37c006b4c301d9f8e147", null ], + [ "main", "_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c_source.html new file mode 100644 index 0000000..f89fbea --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__a_2timer__a__ex6__up_down_mode_operation_8c_source.html @@ -0,0 +1,200 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_a/timer_a_ex6_upDownModeOperation.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_a_ex6_upDownModeOperation.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
59 //
+
60 //*****************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 #define TIMER_A_PERIOD 250
+
64 #define DUTY_CYCLE 250
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //P2.4 output
+
72  //P2.4 option select
+
73  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
74  GPIO_PORT_P2,
+
75  GPIO_PIN4,
+
76  GPIO_PRIMARY_MODULE_FUNCTION
+
77  );
+
78 
+
79  /*
+
80  * Disable the GPIO power-on default high-impedance mode to activate
+
81  * previously configured port settings
+
82  */
+
83  PMM_unlockLPM5();
+
84 
+
85  //Start timer in up down mode
+
86  Timer_A_initUpDownModeParam initUpDownParam = {0};
+
87  initUpDownParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
88  initUpDownParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
89  initUpDownParam.timerPeriod = TIMER_A_PERIOD;
+
90  initUpDownParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
91  initUpDownParam.captureCompareInterruptEnable_CCR0_CCIE =
+
92  TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
93  initUpDownParam.timerClear = TIMER_A_DO_CLEAR;
+
94  initUpDownParam.startTimer = false;
+
95  Timer_A_initUpDownMode(TIMER_A1_BASE, &initUpDownParam);
+
96 
+
97  //Init compare mode
+
98  Timer_A_initCompareModeParam initComp1Param = {0};
+
99  initComp1Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_0;
+
100  initComp1Param.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
101  initComp1Param.compareOutputMode = TIMER_A_OUTPUTMODE_TOGGLE;
+
102  initComp1Param.compareValue = DUTY_CYCLE;
+
103  Timer_A_initCompareMode(TIMER_A1_BASE, &initComp1Param);
+
104 
+
105  Timer_A_startCounter(
+
106  TIMER_A1_BASE,
+
107  TIMER_A_UPDOWN_MODE
+
108  );
+
109 
+
110  //Enter LPM0
+
111  __bis_SR_register(LPM0_bits);
+
112 
+
113  //For debugger
+
114  __no_operation();
+
115 }
+
116 
+
void main(void)
+ +
#define TIMER_A_PERIOD
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html new file mode 100644 index 0000000..81532e8 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html @@ -0,0 +1,186 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_b/timer_b_ex1_continuousModeCCR0.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex1_continuousModeCCR0.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define COMPARE_VALUE   50000
 
+ + + + + +

+Functions

void main (void)
 
void TIMERB0_ISR (void)
 
+

Macro Definition Documentation

+ +

◆ COMPARE_VALUE

+ +
+
+ + + + +
#define COMPARE_VALUE   50000
+
+ +

Definition at line 53 of file timer_b_ex1_continuousModeCCR0.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 55 of file timer_b_ex1_continuousModeCCR0.c.

+ +

References __no_operation(), and COMPARE_VALUE.

+ +
+
+ +

◆ TIMERB0_ISR()

+ +
+
+ + + + + + + + +
void TIMERB0_ISR (void )
+
+ +

Definition at line 101 of file timer_b_ex1_continuousModeCCR0.c.

+ +

References COMPARE_VALUE.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.js new file mode 100644 index 0000000..a7021ed --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c = +[ + [ "COMPARE_VALUE", "_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html#a655c866eb3f7ee47831709b091612e63", null ], + [ "main", "_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMERB0_ISR", "_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c.html#a17ea7521d47a1d5aa678bc645f70737b", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c_source.html new file mode 100644 index 0000000..e29027f --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex1__continuous_mode_c_c_r0_8c_source.html @@ -0,0 +1,228 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_b/timer_b_ex1_continuousModeCCR0.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex1_continuousModeCCR0.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Timer_B, Toggle P1.0, CCR0 Cont. Mode ISR, DCO SMCLK
+
34 //
+
35 // Description: Toggle P1.0 using software and TB_0 ISR. Toggles every
+
36 // 50000 SMCLK cycles. SMCLK provides clock source for TBCLK.
+
37 // During the TB_0 ISR, P1.0 is toggled and 50000 clock cycles are added to
+
38 // CCR0. TB_0 ISR is triggered every 50000 cycles. CPU is normally off and
+
39 // used only during TB_ISR.
+
40 // ACLK = n/a, MCLK = SMCLK = TBCLK = default DCO ~1.045MHz
+
41 //
+
42 // Tested On: MSP430FR5969
+
43 // ---------------
+
44 // /|\| |
+
45 // | | |
+
46 // --|RST |
+
47 // | |
+
48 // | P1.0|-->LED
+
49 //
+
50 //******************************************************************************
+
51 #include "driverlib.h"
+
52 
+
53 #define COMPARE_VALUE 50000
+
54 
+
55 void main(void)
+
56 {
+
57  //Stop WDT
+
58  WDT_A_hold(WDT_A_BASE);
+
59 
+
60  //Set P1.0 to output direction
+
61  GPIO_setAsOutputPin(
+
62  GPIO_PORT_P1,
+
63  GPIO_PIN0
+
64  );
+
65 
+
66  //Start timer in continuous mode sourced by SMCLK
+
67  Timer_B_initContinuousModeParam initContParam = {0};
+
68  initContParam.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
69  initContParam.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
70  initContParam.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_DISABLE;
+
71  initContParam.timerClear = TIMER_B_DO_CLEAR;
+
72  initContParam.startTimer = false;
+
73  Timer_B_initContinuousMode(TIMER_B0_BASE, &initContParam);
+
74 
+
75  //Initiaze compare mode
+
76  Timer_B_clearCaptureCompareInterrupt(TIMER_B0_BASE,
+
77  TIMER_B_CAPTURECOMPARE_REGISTER_0);
+
78 
+
79  Timer_B_initCompareModeParam initCompParam = {0};
+
80  initCompParam.compareRegister = TIMER_B_CAPTURECOMPARE_REGISTER_0;
+
81  initCompParam.compareInterruptEnable = TIMER_B_CAPTURECOMPARE_INTERRUPT_ENABLE;
+
82  initCompParam.compareOutputMode = TIMER_B_OUTPUTMODE_OUTBITVALUE;
+
83  initCompParam.compareValue = COMPARE_VALUE;
+
84  Timer_B_initCompareMode(TIMER_B0_BASE, &initCompParam);
+
85 
+
86  Timer_B_startCounter( TIMER_B0_BASE,
+
87  TIMER_B_CONTINUOUS_MODE
+
88  );
+
89 
+
90  __bis_SR_register(LPM0_bits + GIE); // Enter LPM0, enable interrupts
+
91  __no_operation(); // For debugger
+
92 }
+
93 
+
94 // Timer B0 interrupt service routine
+
95 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
96 #pragma vector=TIMERB0_VECTOR
+
97 __interrupt
+
98 #elif defined(__GNUC__)
+
99 __attribute__((interrupt(TIMERB0_VECTOR)))
+
100 #endif
+
101 void TIMERB0_ISR (void)
+
102 {
+
103  uint16_t compVal = Timer_B_getCaptureCompareCount(TIMER_B0_BASE,
+
104  TIMER_B_CAPTURECOMPARE_REGISTER_0)
+
105  + COMPARE_VALUE;
+
106 
+
107  GPIO_toggleOutputOnPin(
+
108  GPIO_PORT_P1,
+
109  GPIO_PIN0
+
110  );
+
111 
+
112  // Add Offset to CCR0 [Cont mode]
+
113  Timer_B_setCompareValue(TIMER_B0_BASE,
+
114  TIMER_B_CAPTURECOMPARE_REGISTER_0,
+
115  compVal
+
116  );
+
117 }
+
118 
+
void TIMERB0_ISR(void)
+
void main(void)
+
#define COMPARE_VALUE
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html new file mode 100644 index 0000000..0b135a0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html @@ -0,0 +1,161 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_b/timer_b_ex2_overflowISR.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex2_overflowISR.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void TIMERB1_ISR (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 51 of file timer_b_ex2_overflowISR.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ TIMERB1_ISR()

+ +
+
+ + + + + + + + +
void TIMERB1_ISR (void )
+
+ +

Definition at line 86 of file timer_b_ex2_overflowISR.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.js new file mode 100644 index 0000000..7062e88 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMERB1_ISR", "_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c.html#a35a1821354c82e0b10bf23a612416f1e", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c_source.html new file mode 100644 index 0000000..dc97daf --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex2__overflow_i_s_r_8c_source.html @@ -0,0 +1,218 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_b/timer_b_ex2_overflowISR.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex2_overflowISR.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Timer_B, Toggle P1.0, Overflow ISR, 32kHz ACLK
+
34 //
+
35 // Description: Toggle P1.0 using software and the Timer_B overflow ISR.
+
36 // In this example an ISR triggers when TB overflows. Inside the ISR P1.0
+
37 // is toggled. Toggle rate is exactly 0.25Hz = [32kHz/FFFFh]/2. Proper use of the
+
38 // TBIV interrupt vector generator is demonstrated.
+
39 // ACLK = TBCLK = 32kHz, MCLK = SMCLK = default DCO ~ 1.045MHz
+
40 //
+
41 // Tested On: MSP430FR5969
+
42 // ---------------
+
43 // /|\| |
+
44 // | | |
+
45 // --|RST |
+
46 // | |
+
47 // | P1.0|-->LED
+
48 //******************************************************************************
+
49 #include "driverlib.h"
+
50 
+
51 void main(void)
+
52 {
+
53  //Stop WDT
+
54  WDT_A_hold(WDT_A_BASE);
+
55 
+
56  //Set P1.0 to output direction
+
57  GPIO_setAsOutputPin(
+
58  GPIO_PORT_P1,
+
59  GPIO_PIN0
+
60  );
+
61  Timer_B_clearTimerInterrupt(TIMER_B0_BASE);
+
62 
+
63  Timer_B_initContinuousModeParam param = {0};
+
64  param.clockSource = TIMER_B_CLOCKSOURCE_ACLK;
+
65  param.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
66  param.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_ENABLE;
+
67  param.timerClear = TIMER_B_DO_CLEAR;
+
68  param.startTimer = false;
+
69  Timer_B_initContinuousMode(TIMER_B0_BASE, &param);
+
70 
+
71  Timer_B_startCounter( TIMER_B0_BASE,
+
72  TIMER_B_CONTINUOUS_MODE
+
73  );
+
74 
+
75  __bis_SR_register(LPM3_bits + GIE); // Enter LPM3, enable interrupts
+
76  __no_operation(); // For debugger
+
77 }
+
78 
+
79 // Timer_B7 Interrupt Vector (TBIV) handler
+
80 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
81 #pragma vector=TIMERB1_VECTOR
+
82 __interrupt
+
83 #elif defined(__GNUC__)
+
84 __attribute__((interrupt(TIMERB1_VECTOR)))
+
85 #endif
+
86 void TIMERB1_ISR(void)
+
87 {
+
88  /* Any access, read or write, of the TBIV register automatically resets the
+
89  highest "pending" interrupt flag. */
+
90  switch( __even_in_range(TBIV,14) )
+
91  {
+
92  case 0: break; // No interrupt
+
93  case 2: break; // CCR1 not used
+
94  case 4: break; // CCR2 not used
+
95  case 6: break; // CCR3 not used
+
96  case 8: break; // CCR4 not used
+
97  case 10: break; // CCR5 not used
+
98  case 12: break; // CCR6 not used
+
99  case 14: // overflow
+
100  //Toggle P1.0
+
101  GPIO_toggleOutputOnPin(
+
102  GPIO_PORT_P1,
+
103  GPIO_PIN0
+
104  );
+
105  break;
+
106  default: break;
+
107  }
+
108 }
+
void TIMERB1_ISR(void)
+
void main(void)
+
MPU_initThreeSegmentsParam param
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.html new file mode 100644 index 0000000..2dedddc --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_b/timer_b_ex3_pwm.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex3_pwm.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 57 of file timer_b_ex3_pwm.c.

+ +

References param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.js new file mode 100644 index 0000000..723b79e --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c_source.html new file mode 100644 index 0000000..6a16d96 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex3__pwm_8c_source.html @@ -0,0 +1,211 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_b/timer_b_ex3_pwm.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex3_pwm.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // Timer_B, PWM TB1-6, Up Mode, DCO SMCLK
+
34 //
+
35 // Description: This program generates two PWM outputs on P2.6/P2.2 using
+
36 // Timer_B configured for up mode. The value in CCR0, 512-1, defines the PWM
+
37 // period and the values in CCR1-2 the PWM duty cycles. Using ~1048kHz SMCLK
+
38 // as TBCLK, the timer period is ~488us.
+
39 // ACLK = 32kHz, SMCLK = MCLK = TBCLK = default DCO ~1048kHz.
+
40 //
+
41 // Tested On: MSP430FR5969
+
42 // -----------------
+
43 // /|\| XIN|-
+
44 // | | | 32kHz
+
45 // --|RST XOUT|-
+
46 // | |
+
47 // | P2.6/TB0.1|--> CCR1 - 75% PWM
+
48 // | P2.2/TB0.2|--> CCR2 - 25% PWM
+
49 // | |
+
50 // | |
+
51 // | |
+
52 // | |
+
53 //
+
54 //******************************************************************************
+
55 #include "driverlib.h"
+
56 
+
57 void main(void)
+
58 {
+
59  //Stop WDT
+
60  WDT_A_hold(WDT_A_BASE);
+
61 
+
62  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
63  GPIO_PORT_P2,
+
64  GPIO_PIN6 | GPIO_PIN2,
+
65  GPIO_PRIMARY_MODULE_FUNCTION
+
66  );
+
67 
+
68  /*
+
69  * Disable the GPIO power-on default high-impedance mode to activate
+
70  * previously configured port settings
+
71  */
+
72  PMM_unlockLPM5();
+
73 
+
74  //Start timer
+
75  Timer_B_initUpModeParam param = {0};
+
76  param.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
77  param.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
78  param.timerPeriod = 511;
+
79  param.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_DISABLE;
+
80  param.captureCompareInterruptEnable_CCR0_CCIE =
+
81  TIMER_B_CCIE_CCR0_INTERRUPT_DISABLE;
+
82  param.timerClear = TIMER_B_DO_CLEAR;
+
83  param.startTimer = true;
+
84  Timer_B_initUpMode(TIMER_B0_BASE, &param);
+
85 
+
86  //Initialize compare mode to generate PWM1
+
87  Timer_B_initCompareModeParam param1 = {0};
+
88  param1.compareRegister = TIMER_B_CAPTURECOMPARE_REGISTER_1;
+
89  param1.compareInterruptEnable = TIMER_B_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
90  param1.compareOutputMode = TIMER_B_OUTPUTMODE_RESET_SET;
+
91  param1.compareValue = 383;
+
92  Timer_B_initCompareMode(TIMER_B0_BASE, &param1);
+
93 
+
94  //Initialize compare mode to generate PWM2
+
95  Timer_B_initCompareModeParam param2 = {0};
+
96  param2.compareRegister = TIMER_B_CAPTURECOMPARE_REGISTER_2;
+
97  param2.compareInterruptEnable = TIMER_B_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
98  param2.compareOutputMode = TIMER_B_OUTPUTMODE_RESET_SET;
+
99  param2.compareValue = 128;
+
100  Timer_B_initCompareMode(TIMER_B0_BASE, &param2);
+
101 
+
102  _BIS_SR(LPM0_bits + GIE); // CPU off
+
103 }
+
void main(void)
+
MPU_initThreeSegmentsParam param
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html new file mode 100644 index 0000000..607445d --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html @@ -0,0 +1,202 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_b/timer_b_ex4_upModeOperation.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex4_upModeOperation.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define TIMER_PERIOD   50000
 
+ + + + + +

+Functions

void main (void)
 
void TIMERB0_ISR (void)
 
+

Macro Definition Documentation

+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   50000
+
+

Timer_B, Toggle P1.0, CCR0 Up Mode ISR, DCO SMCLK

+

Description: Toggle P1.0 using software and TB_0 ISR. Timer_B is configured for up mode, thus the timer overflows when TBR counts to CCR0. In this example, CCR0 is loaded with 50000. ACLK = n/a, MCLK = SMCLK = TBCLK = default DCO ~1.045MHz

+

+Tested On: MSP430FR5969

+ + + + + +
/ |
RST
+

| | | P1.0|-->LED

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • Timer B0
  • +
+ +

Definition at line 61 of file timer_b_ex4_upModeOperation.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 63 of file timer_b_ex4_upModeOperation.c.

+ +

References __no_operation(), param, and TIMER_PERIOD.

+ +
+
+ +

◆ TIMERB0_ISR()

+ +
+
+ + + + + + + + +
void TIMERB0_ISR (void )
+
+ +

Definition at line 112 of file timer_b_ex4_upModeOperation.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.js new file mode 100644 index 0000000..5af4824 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c = +[ + [ "TIMER_PERIOD", "_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "main", "_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMERB0_ISR", "_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c.html#a17ea7521d47a1d5aa678bc645f70737b", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c_source.html new file mode 100644 index 0000000..9e21779 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex4__up_mode_operation_8c_source.html @@ -0,0 +1,206 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_b/timer_b_ex4_upModeOperation.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex4_upModeOperation.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
58 //*****************************************************************************
+
59 #include "driverlib.h"
+
60 
+
61 #define TIMER_PERIOD 50000
+
62 
+
63 void main (void)
+
64 {
+
65  //Stop WDT
+
66  WDT_A_hold(WDT_A_BASE);
+
67 
+
68  //Set P1.0 to output direction
+
69  GPIO_setAsOutputPin(
+
70  GPIO_PORT_P1,
+
71  GPIO_PIN0
+
72  );
+
73 
+
74  /*
+
75  * Disable the GPIO power-on default high-impedance mode to activate
+
76  * previously configured port settings
+
77  */
+
78  PMM_unlockLPM5();
+
79 
+
80  //Start timer
+
81  Timer_B_clearTimerInterrupt(TIMER_B0_BASE);
+
82 
+
83  Timer_B_initUpModeParam param = {0};
+
84  param.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
85  param.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
86  param.timerPeriod = TIMER_PERIOD;
+
87  param.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_DISABLE;
+
88  param.captureCompareInterruptEnable_CCR0_CCIE =
+
89  TIMER_B_CAPTURECOMPARE_INTERRUPT_ENABLE;
+
90  param.timerClear = TIMER_B_DO_CLEAR;
+
91  param.startTimer = true;
+
92  Timer_B_initUpMode(TIMER_B0_BASE, &param);
+
93 
+
94  //Enter LPM0, enable interrupts
+
95  __bis_SR_register(LPM0_bits + GIE);
+
96 
+
97  //For debugger
+ +
99 }
+
100 
+
101 //******************************************************************************
+
102 //
+
103 //This is the Timer B0 interrupt vector service routine.
+
104 //
+
105 //******************************************************************************
+
106 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
107 #pragma vector=TIMERB0_VECTOR
+
108 __interrupt
+
109 #elif defined(__GNUC__)
+
110 __attribute__((interrupt(TIMERB0_VECTOR)))
+
111 #endif
+
112 void TIMERB0_ISR (void)
+
113 {
+
114  //Toggle P1.0 using exclusive-OR
+
115  GPIO_toggleOutputOnPin(
+
116  GPIO_PORT_P1,
+
117  GPIO_PIN0
+
118  );
+
119 }
+
120 
+
void TIMERB0_ISR(void)
+
void main(void)
+
MPU_initThreeSegmentsParam param
+
#define TIMER_PERIOD
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html new file mode 100644 index 0000000..97579c9 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html @@ -0,0 +1,198 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_b/timer_b_ex5_singlePWM.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
timer_b_ex5_singlePWM.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define TIMER_PERIOD   511
 
#define DUTY_CYCLE   383
 
+ + + +

+Functions

void main (void)
 
+

Macro Definition Documentation

+ +

◆ DUTY_CYCLE

+ +
+
+ + + + +
#define DUTY_CYCLE   383
+
+ +

Definition at line 64 of file timer_b_ex5_singlePWM.c.

+ +
+
+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   511
+
+

Timer_B, PWM TB0.1, Up Mode, DCO SMCLK

+

Description: This program generates PWM outputs on P2.6 using Timer_B configured for up mode. The value , TIMER_PERIOD, defines the PWM period and the value DUTY_CYCLE the PWM duty cycle. Using ~1.045MHz SMCLK as TBCLK, the timer period is ~488us with a 75% duty cycle on P2.6 ACLK = n/a, SMCLK = MCLK = TBCLK = default DCO ~1.045MHz.

+

+Tested On: MSP430FR5969

+ + + + + +
/ |
RST
+

| | | P2.6/TB0.1|--> CCR1 - 75% PWM | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • Timer peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 63 of file timer_b_ex5_singlePWM.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 66 of file timer_b_ex5_singlePWM.c.

+ +

References __no_operation(), DUTY_CYCLE, param, and TIMER_PERIOD.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.js new file mode 100644 index 0000000..23db8e8 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.js @@ -0,0 +1,6 @@ +var _m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c = +[ + [ "DUTY_CYCLE", "_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html#a940d0fcbbee0921e43201c554231947c", null ], + [ "TIMER_PERIOD", "_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "main", "_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c_source.html new file mode 100644 index 0000000..e7ea0f1 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2timer__b_2timer__b__ex5__single_p_w_m_8c_source.html @@ -0,0 +1,184 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/timer_b/timer_b_ex5_singlePWM.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
timer_b_ex5_singlePWM.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //*******************************************************************************
+
59 //******************************************************************************
+
60 
+
61 #include "driverlib.h"
+
62 
+
63 #define TIMER_PERIOD 511
+
64 #define DUTY_CYCLE 383
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //P2.6 as PWM output
+
72  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
73  GPIO_PORT_P2,
+
74  GPIO_PIN6,
+
75  GPIO_PRIMARY_MODULE_FUNCTION
+
76  );
+
77 
+
78  /*
+
79  * Disable the GPIO power-on default high-impedance mode to activate
+
80  * previously configured port settings
+
81  */
+
82  PMM_unlockLPM5();
+
83 
+
84  //Generate PWM - Timer runs in Up mode
+
85  Timer_B_outputPWMParam param = {0};
+
86  param.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
87  param.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
88  param.timerPeriod = TIMER_PERIOD;
+
89  param.compareRegister = TIMER_B_CAPTURECOMPARE_REGISTER_1;
+
90  param.compareOutputMode = TIMER_B_OUTPUTMODE_RESET_SET;
+
91  param.dutyCycle = DUTY_CYCLE;
+
92  Timer_B_outputPWM(TIMER_B0_BASE, &param);
+
93 
+
94  //Enter LPM0
+
95  __bis_SR_register(LPM0_bits);
+
96 
+
97  //For debugger
+ +
99 }
+
void main(void)
+
MPU_initThreeSegmentsParam param
+
#define DUTY_CYCLE
+
#define TIMER_PERIOD
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.html new file mode 100644 index 0000000..8d54bb0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.html @@ -0,0 +1,149 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/tlv/tlv_ex1_getDeviceType.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tlv_ex1_getDeviceType.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main ()
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

tlv - getDeviceType

+

+Tested on MSP430F5438A, MSP430FR5739

+

/|| | | | | –| | Device Type | | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT_A
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 58 of file tlv_ex1_getDeviceType.c.

+ +

References status.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.js new file mode 100644 index 0000000..ad5ed5b --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c.html#acdef7a1fd863a6d3770c1268cb06add3", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c_source.html new file mode 100644 index 0000000..2d18d73 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex1__get_device_type_8c_source.html @@ -0,0 +1,152 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/tlv/tlv_ex1_getDeviceType.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tlv_ex1_getDeviceType.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
54 //******************************************************************************
+
55 
+
56 #include "driverlib.h"
+
57 
+
58 void main()
+
59 {
+
60  //Stop WDT
+
61  WDT_A_hold(WDT_A_BASE);
+
62 
+
63  uint16_t status = TLV_getDeviceType();
+
64 
+
65 }
+
void main()
+ +
uint16_t status
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html new file mode 100644 index 0000000..1bc10b2 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html @@ -0,0 +1,773 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/tlv/tlv_ex2_readTLVDescriptors.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tlv_ex2_readTLVDescriptors.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + +

+Functions

void readDieRecord (void)
 
void readADCCAL (void)
 
void readREFCAL (void)
 
void readPeripheral (void)
 
void main (void)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Variables

struct s_TLV_Die_Record * pDIEREC
 
uint8_t bDieRecord_bytes
 
uint16_t temp
 
uint32_t WaferID
 
uint16_t DieX
 
uint16_t DieY
 
uint16_t TestRes
 
struct s_TLV_ADC_Cal_Data * pADCCAL
 
uint8_t bADCCAL_bytes
 
uint16_t ADCGain
 
uint16_t ADCOffset
 
uint16_t ADC_15V_Ref_30C
 
uint16_t ADC_15V_Ref_85C
 
uint16_t ADC_20V_Ref_30C
 
uint16_t ADC_20V_Ref_85C
 
uint16_t ADC_25V_Ref_30C
 
uint16_t ADC_25V_Ref_85C
 
struct s_TLV_REF_Cal_Data * pREFCAL
 
uint8_t bREFCAL_bytes
 
uint16_t REF_15V
 
uint16_t REF_20V
 
uint16_t REF_25V
 
struct s_Peripheral_Memory_Data * pPeriph
 
uint8_t bPeriph_bytes
 
uint16_t Memory_1
 
uint16_t Memory_2
 
uint16_t Memory_3
 
uint16_t Memory_4
 
uint16_t PMM_Exist
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 90 of file tlv_ex2_readTLVDescriptors.c.

+ +

References readADCCAL(), readDieRecord(), readPeripheral(), and readREFCAL().

+ +
+
+ +

◆ readADCCAL()

+ +
+
+ + + + + + + + +
void readADCCAL (void )
+
+
+ +

◆ readDieRecord()

+ +
+
+ + + + + + + + +
void readDieRecord (void )
+
+ +

Definition at line 112 of file tlv_ex2_readTLVDescriptors.c.

+ +

References bDieRecord_bytes, DieX, DieY, pDIEREC, TestRes, and WaferID.

+ +
+
+ +

◆ readPeripheral()

+ +
+
+ + + + + + + + +
void readPeripheral (void )
+
+ +

Definition at line 193 of file tlv_ex2_readTLVDescriptors.c.

+ +

References bPeriph_bytes, Memory_1, Memory_2, Memory_3, Memory_4, PMM_Exist, and pPeriph.

+ +
+
+ +

◆ readREFCAL()

+ +
+
+ + + + + + + + +
void readREFCAL (void )
+
+ +

Definition at line 162 of file tlv_ex2_readTLVDescriptors.c.

+ +

References bREFCAL_bytes, pREFCAL, REF_15V, REF_20V, and REF_25V.

+ +
+
+

Variable Documentation

+ +

◆ ADC_15V_Ref_30C

+ +
+
+ + + + +
uint16_t ADC_15V_Ref_30C
+
+ +

Definition at line 71 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ ADC_15V_Ref_85C

+ +
+
+ + + + +
uint16_t ADC_15V_Ref_85C
+
+ +

Definition at line 71 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ ADC_20V_Ref_30C

+ +
+
+ + + + +
uint16_t ADC_20V_Ref_30C
+
+ +

Definition at line 71 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ ADC_20V_Ref_85C

+ +
+
+ + + + +
uint16_t ADC_20V_Ref_85C
+
+ +

Definition at line 72 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ ADC_25V_Ref_30C

+ +
+
+ + + + +
uint16_t ADC_25V_Ref_30C
+
+ +

Definition at line 72 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ ADC_25V_Ref_85C

+ +
+
+ + + + +
uint16_t ADC_25V_Ref_85C
+
+ +

Definition at line 72 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ ADCGain

+ +
+
+ + + + +
uint16_t ADCGain
+
+ +

Definition at line 70 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ ADCOffset

+ +
+
+ + + + +
uint16_t ADCOffset
+
+ +

Definition at line 70 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ bADCCAL_bytes

+ +
+
+ + + + +
uint8_t bADCCAL_bytes
+
+ +

Definition at line 69 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ bDieRecord_bytes

+ +
+
+ + + + +
uint8_t bDieRecord_bytes
+
+ +

Definition at line 62 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ bPeriph_bytes

+ +
+
+ + + + +
uint8_t bPeriph_bytes
+
+ +

Definition at line 81 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ bREFCAL_bytes

+ +
+
+ + + + +
uint8_t bREFCAL_bytes
+
+ +

Definition at line 76 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ DieX

+ +
+
+ + + + +
uint16_t DieX
+
+ +

Definition at line 65 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ DieY

+ +
+
+ + + + +
uint16_t DieY
+
+ +

Definition at line 65 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ Memory_1

+ +
+
+ + + + +
uint16_t Memory_1
+
+ +

Definition at line 82 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ Memory_2

+ +
+
+ + + + +
uint16_t Memory_2
+
+ +

Definition at line 82 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ Memory_3

+ +
+
+ + + + +
uint16_t Memory_3
+
+ +

Definition at line 82 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ Memory_4

+ +
+
+ + + + +
uint16_t Memory_4
+
+ +

Definition at line 82 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ pADCCAL

+ +
+
+ + + + +
struct s_TLV_ADC_Cal_Data* pADCCAL
+
+ +

Definition at line 68 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ pDIEREC

+ +
+
+ + + + +
struct s_TLV_Die_Record* pDIEREC
+
+

The contents of TLV device descriptors are read out using the TLV functions and then stored into local variables.

+

ACLK = n/a, MCLK = SMCLK = default DCO ~ 1.045MHz

+

+Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969

+

/|| XIN|- | | | –|RST XOUT|- | | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 61 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ PMM_Exist

+ +
+
+ + + + +
uint16_t PMM_Exist
+
+ +

Definition at line 83 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ pPeriph

+ +
+
+ + + + +
struct s_Peripheral_Memory_Data* pPeriph
+
+ +

Definition at line 80 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ pREFCAL

+ +
+
+ + + + +
struct s_TLV_REF_Cal_Data* pREFCAL
+
+ +

Definition at line 75 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ REF_15V

+ +
+
+ + + + +
uint16_t REF_15V
+
+ +

Definition at line 77 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ REF_20V

+ +
+
+ + + + +
uint16_t REF_20V
+
+ +

Definition at line 77 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ REF_25V

+ +
+
+ + + + +
uint16_t REF_25V
+
+ +

Definition at line 77 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ temp

+ +
+
+ + + + +
uint16_t temp
+
+ +

Definition at line 63 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ TestRes

+ +
+
+ + + + +
uint16_t TestRes
+
+ +

Definition at line 65 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+ +

◆ WaferID

+ +
+
+ + + + +
uint32_t WaferID
+
+ +

Definition at line 64 of file tlv_ex2_readTLVDescriptors.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.js new file mode 100644 index 0000000..fd7c787 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.js @@ -0,0 +1,37 @@ +var _m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "readADCCAL", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a49ec1ea965f4f96de6db5c4154349057", null ], + [ "readDieRecord", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a277b8de8228358f448f822ff06c1081d", null ], + [ "readPeripheral", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#ac133c16cc912dc9f57b8914d00bc0d40", null ], + [ "readREFCAL", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a96df953f49934af6a5627ce43a954ed0", null ], + [ "ADC_15V_Ref_30C", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#ad6496c498893826b78ccb83d98b6cf5a", null ], + [ "ADC_15V_Ref_85C", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#ab492e99cef6a159e96936b87160b2ed5", null ], + [ "ADC_20V_Ref_30C", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a35805d0f0c3ff649e674e6f8735f4697", null ], + [ "ADC_20V_Ref_85C", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a1b719fcb0e6399dac4fd90fdfb5a99d5", null ], + [ "ADC_25V_Ref_30C", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a56e6d1447dc2ca65a389b9781e0f1103", null ], + [ "ADC_25V_Ref_85C", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#ac8f3f1a9ad8c8814e5393227dd70e17b", null ], + [ "ADCGain", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a8dbe076fac2ca320f671e90da4fb4fd9", null ], + [ "ADCOffset", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#aa7cc130e903b7f8e1953466ff0290659", null ], + [ "bADCCAL_bytes", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a7aa9b3eed291511084e0e5393a688b12", null ], + [ "bDieRecord_bytes", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#ad86e261749772b629d805d20a771946e", null ], + [ "bPeriph_bytes", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a3330341d33215c552991fd47572e9cab", null ], + [ "bREFCAL_bytes", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#ab7240ddb5ea92d5135e32c5050de2ff1", null ], + [ "DieX", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a38c050191d2a20c9e471012609dc5fd6", null ], + [ "DieY", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#af5d5fbe727514605b6b339ee5336642b", null ], + [ "Memory_1", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a9a7d13cffdc7ca481310247ecbc8503d", null ], + [ "Memory_2", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a6cbc2699c151d4b1e17f74e1b640af3f", null ], + [ "Memory_3", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a9cec42edb0853f07e8ae719f4c688a21", null ], + [ "Memory_4", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#aadba76baaf79f2caffba458fc1a218a5", null ], + [ "pADCCAL", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#ad13c61e61e372f4c0a9d101695015fd1", null ], + [ "pDIEREC", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a90053704e55062d84fb0c5334e03c6f9", null ], + [ "PMM_Exist", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#aa3041214d28fd9b144fa40fd9d2ebd38", null ], + [ "pPeriph", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a9622441232ea724691fda7a569a558bc", null ], + [ "pREFCAL", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#af0c72d4f2c2746c13c1a15805727ed8a", null ], + [ "REF_15V", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#af27f0fffd135427c637272fa6e3e79ed", null ], + [ "REF_20V", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a99a2e86d37a080aae2c408cdfe784670", null ], + [ "REF_25V", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a89ad7c6cc666021cd62cb5cfc2d35fab", null ], + [ "temp", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a36142ddde297ed1d5577c81230997301", null ], + [ "TestRes", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#a8cff184e50949393c92c035bcf85b461", null ], + [ "WaferID", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c.html#ac60a79f85dcf288b613ac10382fc2c74", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c_source.html new file mode 100644 index 0000000..ef7f234 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex2__read_t_l_v_descriptors_8c_source.html @@ -0,0 +1,326 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/tlv/tlv_ex2_readTLVDescriptors.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tlv_ex2_readTLVDescriptors.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
56 //*****************************************************************************
+
57 
+
58 #include "driverlib.h"
+
59 
+
60 // Die Record Variables
+
61 struct s_TLV_Die_Record * pDIEREC;
+ +
63 uint16_t temp;
+
64 uint32_t WaferID;
+
65 uint16_t DieX, DieY, TestRes;
+
66 
+
67 // ADC Variables
+
68 struct s_TLV_ADC_Cal_Data * pADCCAL;
+
69 uint8_t bADCCAL_bytes;
+
70 uint16_t ADCGain, ADCOffset;
+ + +
73 
+
74 // REF Variables
+
75 struct s_TLV_REF_Cal_Data * pREFCAL;
+
76 uint8_t bREFCAL_bytes;
+
77 uint16_t REF_15V, REF_20V, REF_25V;
+
78 
+
79 // Peripheral Variables
+
80 struct s_Peripheral_Memory_Data * pPeriph;
+
81 uint8_t bPeriph_bytes;
+ +
83 uint16_t PMM_Exist;
+
84 
+
85 void readDieRecord(void);
+
86 void readADCCAL(void);
+
87 void readREFCAL(void);
+
88 void readPeripheral(void);
+
89 
+
90 void main(void)
+
91 {
+
92  //Stop WDT
+
93  WDT_A_hold(WDT_A_BASE);
+
94 
+
95  readDieRecord();
+
96  readADCCAL();
+
97  readREFCAL();
+ +
99 
+
100  // Place breakpoint here
+
101  while(1);
+
102 }
+
103 
+
104 //******************************************************************************
+
105 //
+
106 // This function will search the TLV block for the Die Record tag and store the
+
107 // address of the first data in the block in the reference pointer passed as an
+
108 // argument. The data is then saved to local variables.
+
109 //
+
110 //******************************************************************************
+
111 
+
112 void readDieRecord(void)
+
113 {
+
114  // Read Die Record Values
+
115  TLV_getInfo(TLV_TAG_DIERECORD,
+
116  0,
+ +
118  (uint16_t **)&pDIEREC
+
119  );
+
120 
+
121  WaferID = pDIEREC->wafer_id;
+
122  DieX = pDIEREC->die_x_position;
+
123  DieY = pDIEREC->die_y_position;
+
124  TestRes = pDIEREC->test_results;
+
125 }
+
126 
+
127 //******************************************************************************
+
128 //
+
129 // This function will search the TLV block for the ADC CAL tag and store the
+
130 // address of the first data in the block in the reference pointer passed as an
+
131 // argument. The data is then saved to local variables.
+
132 //
+
133 //******************************************************************************
+
134 
+
135 void readADCCAL(void)
+
136 {
+
137  // Read ADC12 Calibration Values
+
138  TLV_getInfo(TLV_TAG_ADCCAL,
+
139  0,
+
140  &bADCCAL_bytes,
+
141  (uint16_t **)&pADCCAL
+
142  );
+
143 
+
144  ADCGain = pADCCAL->adc_gain_factor;
+
145  ADCOffset = pADCCAL->adc_offset;
+
146  ADC_15V_Ref_30C = pADCCAL->adc_ref15_30_temp;
+
147  ADC_15V_Ref_85C = pADCCAL->adc_ref15_85_temp;
+
148  ADC_20V_Ref_30C = pADCCAL->adc_ref20_30_temp;
+
149  ADC_20V_Ref_85C = pADCCAL->adc_ref20_85_temp;
+
150  ADC_25V_Ref_30C = pADCCAL->adc_ref25_30_temp;
+
151  ADC_25V_Ref_85C = pADCCAL->adc_ref25_85_temp;
+
152 }
+
153 
+
154 //******************************************************************************
+
155 //
+
156 // This function will search the TLV block for the REF CAL tag and store the
+
157 // address of the first data in the block in the reference pointer passed as an
+
158 // argument. The data is then saved to local variables.
+
159 //
+
160 //******************************************************************************
+
161 
+
162 void readREFCAL(void)
+
163 {
+
164  // Read REF Calibration Values
+
165  TLV_getInfo(TLV_TAG_REFCAL,
+
166  0,
+
167  &bREFCAL_bytes,
+
168  (uint16_t **)&pREFCAL
+
169  );
+
170 
+
171  REF_15V = pREFCAL->ref_ref15;
+
172  REF_20V = pREFCAL->ref_ref20;
+
173  REF_25V = pREFCAL->ref_ref25;
+
174 }
+
175 
+
176 //******************************************************************************
+
177 //
+
178 // The function checks for the existence of memory blocks in a device.
+
179 // This is followed by checking if the PMM module exists and is defined in the
+
180 // peripheral descriptor section.
+
181 //
+
182 // The function TLV_getInfo searches the TLV block for the Peripheral tag and
+
183 // stores the address of the first data in the block in the reference pointer
+
184 // passed as an argument. The data is then saved to local variables.
+
185 //
+
186 // The function Get_TLV_peripheral returns a non-zero value indicating the PMM
+
187 // peripheral exists TLV_getPeripheral the current device. This same procedure can be
+
188 // replicated for any peripheral that is listed in the device datasheet. The
+
189 // tag code that corresponds to each peripheral can be found in tlv.h
+
190 
+
191 //******************************************************************************
+
192 
+
193 void readPeripheral(void)
+
194 {
+
195  // Read Peripheral Memory Descriptors
+
196  TLV_getInfo(TLV_TAG_PDTAG,
+
197  0,
+
198  &bPeriph_bytes,
+
199  (uint16_t **)&pPeriph
+
200  );
+
201 
+
202  Memory_1 = pPeriph->memory_1;
+
203  Memory_2 = pPeriph->memory_2;
+
204  Memory_3 = pPeriph->memory_3;
+
205  Memory_4 = pPeriph->memory_4;
+
206 
+
207  // Read PMM Descriptor to Show its Availability
+
208  PMM_Exist = TLV_getPeripheral(TLV_PID_PMM, 0);
+
209 }
+
uint16_t ADC_20V_Ref_85C
+
void readDieRecord(void)
+
uint8_t bPeriph_bytes
+
uint16_t ADC_20V_Ref_30C
+
uint16_t temp
+
uint16_t DieX
+
void readADCCAL(void)
+
uint16_t ADC_25V_Ref_30C
+
void main(void)
+
uint16_t Memory_2
+
uint8_t bADCCAL_bytes
+
uint16_t REF_25V
+
uint16_t TestRes
+
uint16_t ADCGain
+
struct s_TLV_Die_Record * pDIEREC
+
struct s_Peripheral_Memory_Data * pPeriph
+
void readREFCAL(void)
+
uint16_t REF_20V
+
uint16_t Memory_1
+
uint16_t Memory_3
+
uint16_t PMM_Exist
+
uint16_t ADCOffset
+
uint16_t Memory_4
+
uint16_t ADC_15V_Ref_85C
+
uint8_t bREFCAL_bytes
+
void readPeripheral(void)
+
uint32_t WaferID
+
uint16_t ADC_25V_Ref_85C
+
struct s_TLV_ADC_Cal_Data * pADCCAL
+
uint16_t ADC_15V_Ref_30C
+
uint8_t bDieRecord_bytes
+
struct s_TLV_REF_Cal_Data * pREFCAL
+
uint16_t REF_15V
+
uint16_t DieY
+ +
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html new file mode 100644 index 0000000..659b3af --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html @@ -0,0 +1,336 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/tlv/tlv_ex3_calibrateTempSensor.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tlv_ex3_calibrateTempSensor.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Functions

void calibrateADC (void)
 
void main (void)
 
void ADC12ISR (void)
 
+ + + + + + + + + + + + + + + +

+Variables

uint16_t temp
 
volatile float DegF
 
volatile float DegC
 
float mref
 
float nref
 
uint8_t bADCCAL_bytes
 
struct s_TLV_ADC_Cal_Data * pADCCAL
 
+

Function Documentation

+ +

◆ ADC12ISR()

+ +
+
+ + + + + + + + +
void ADC12ISR (void )
+
+ +

Definition at line 215 of file tlv_ex3_calibrateTempSensor.c.

+ +

References __bic_SR_register_on_exit(), and temp.

+ +
+
+ +

◆ calibrateADC()

+ +
+
+ + + + + + + + +
void calibrateADC (void )
+
+ +

Definition at line 127 of file tlv_ex3_calibrateTempSensor.c.

+ +

References bADCCAL_bytes, mref, nref, and pADCCAL.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 93 of file tlv_ex3_calibrateTempSensor.c.

+ +

References __no_operation(), calibrateADC(), DegC, DegF, mref, nref, and temp.

+ +
+
+

Variable Documentation

+ +

◆ bADCCAL_bytes

+ +
+
+ + + + +
uint8_t bADCCAL_bytes
+
+ +

Definition at line 78 of file tlv_ex3_calibrateTempSensor.c.

+ +
+
+ +

◆ DegC

+ +
+
+ + + + +
volatile float DegC
+
+ +

Definition at line 76 of file tlv_ex3_calibrateTempSensor.c.

+ +
+
+ +

◆ DegF

+ +
+
+ + + + +
volatile float DegF
+
+ +

Definition at line 75 of file tlv_ex3_calibrateTempSensor.c.

+ +
+
+ +

◆ mref

+ +
+
+ + + + +
float mref
+
+ +

Definition at line 77 of file tlv_ex3_calibrateTempSensor.c.

+ +
+
+ +

◆ nref

+ +
+
+ + + + +
float nref
+
+ +

Definition at line 77 of file tlv_ex3_calibrateTempSensor.c.

+ +
+
+ +

◆ pADCCAL

+ +
+
+ + + + +
struct s_TLV_ADC_Cal_Data* pADCCAL
+
+ +

Definition at line 79 of file tlv_ex3_calibrateTempSensor.c.

+ +
+
+ +

◆ temp

+ +
+
+ + + + +
uint16_t temp
+
+

TLV - Sample Calibrated A30 Internal Temp Sensor as Input, AVcc Ref

+

After initialization, the the calibration constants for the unit are read in through the TLV. A single sample is made on A30 with reference to internal 1.2V Vref. Software sets ADC12SC to start sample and conversion - ADC12SC automatically cleared at EOC. ADC12 internal oscillator times sample and conversion. In Mainloop MSP430 waits in LPM4 to save power until ADC12 conversion complete, ADC12_B_ISR will force exit from any LPMx in Mainloop on reti.

+

The results of the temperature sense can be viewed in the watch window by watching the variables DegC and DegF

+

ACLK = n/a, MCLK = SMCLK = default DCO ~ 1.045MHz, ADC12CLK = ADC12OSC

+
           MSP430FR5969
+        -----------------
+    /|\|                 |
+     | |                 |
+     --|RST              |
+       |Temp Sensor-->A30|
+       |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC12 peripheral
  • +
  • A30(TempSensor)
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • ADC12_B_VECTOR
  • +
+ +

Definition at line 74 of file tlv_ex3_calibrateTempSensor.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.js new file mode 100644 index 0000000..d7f6ab0 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.js @@ -0,0 +1,13 @@ +var _m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c = +[ + [ "ADC12ISR", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#ae0194f6cfda5bea946ec788350bcc32c", null ], + [ "calibrateADC", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#a0b3380f399a29ee713eff84ccc3e63ed", null ], + [ "main", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "bADCCAL_bytes", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#a7aa9b3eed291511084e0e5393a688b12", null ], + [ "DegC", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#ae2c5ba4879be8505b366623576465d6f", null ], + [ "DegF", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#a2ae78c37216c42fbff18911fc5f94486", null ], + [ "mref", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#aa78b10a9eddb4a2e29fd41ac0e14dfdf", null ], + [ "nref", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#ad8613314420046e0ca1c455de439f76a", null ], + [ "pADCCAL", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#ad13c61e61e372f4c0a9d101695015fd1", null ], + [ "temp", "_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c.html#a36142ddde297ed1d5577c81230997301", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c_source.html new file mode 100644 index 0000000..e590688 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2tlv_2tlv__ex3__calibrate_temp_sensor_8c_source.html @@ -0,0 +1,346 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/tlv/tlv_ex3_calibrateTempSensor.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tlv_ex3_calibrateTempSensor.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
70 //******************************************************************************
+
71 
+
72 #include "driverlib.h"
+
73 
+
74 uint16_t temp;
+
75 volatile float DegF;
+
76 volatile float DegC;
+
77 float mref, nref;
+
78 uint8_t bADCCAL_bytes;
+
79 struct s_TLV_ADC_Cal_Data * pADCCAL;
+
80 
+
81 //******************************************************************************
+
82 //
+
83 // This function will initialize and calibrate ADC for temperature sensing.
+
84 // The embedded function call of Get_TLV_Info searches the TLV block of data
+
85 // (defined in the device header file) for the ADC calibration block, then
+
86 // returns the address of the first data descriptor to the pointer passed into
+
87 // it. The slope and offset of the corrected temperature curve are then
+
88 // calculated for temperature calibration purposes.
+
89 //
+
90 //******************************************************************************
+
91 void calibrateADC(void);
+
92 
+
93 void main (void)
+
94 {
+
95  //Stop Watchdog Timer
+
96  WDT_A_hold(WDT_A_BASE);
+
97 
+
98  calibrateADC();
+
99 
+
100  while (1)
+
101  {
+
102  //Enable/Start first sampling and conversion cycle
+
103  /*
+
104  * Base address of ADC12 Module
+
105  * Start the conversion into memory buffer 0
+
106  * Use the repeated sequence of channels
+
107  */
+
108  ADC12_B_startConversion(ADC12_B_BASE,
+
109  ADC12_B_MEMORY_0,
+
110  ADC12_B_SINGLECHANNEL);
+
111 
+
112  //LPM0 with interrupts enabled
+
113  __bis_SR_register(LPM4_bits + GIE);
+
114  __no_operation();
+
115 
+
116  //Temperature in Celsius
+
117  DegC = (temp - nref) / mref;
+
118 
+
119  //Temperature in Fahrenheit
+
120  DegF = (9*DegC)/5 + 32;
+
121 
+
122  //SET BREAKPOINT HERE and watch IntDegC and IntDegF
+
123  __no_operation();
+
124  }
+
125 }
+
126 
+
127 void calibrateADC(void)
+
128 {
+
129  //Initialize the ADC12B Module
+
130  /*
+
131  * Base address of ADC12B Module
+
132  * Use internal ADC12B bit as sample/hold signal to start conversion
+
133  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
134  * Use default clock divider/pre-divider of 1
+
135  * Not use internal channel
+
136  */
+
137  ADC12_B_initParam initParam = {0};
+
138  initParam.sampleHoldSignalSourceSelect = ADC12_B_SAMPLEHOLDSOURCE_SC;
+
139  initParam.clockSourceSelect = ADC12_B_CLOCKSOURCE_ADC12OSC;
+
140  initParam.clockSourceDivider = ADC12_B_CLOCKDIVIDER_1;
+
141  initParam.clockSourcePredivider = ADC12_B_CLOCKPREDIVIDER__1;
+
142  initParam.internalChannelMap = ADC12_B_NOINTCH;
+
143  ADC12_B_init(ADC12_B_BASE, &initParam);
+
144 
+
145  //Enable the ADC12B module
+
146  ADC12_B_enable(ADC12_B_BASE);
+
147 
+
148  /*
+
149  * Base address of ADC12B Module
+
150  * For memory buffers 0-7 sample/hold for 64 clock cycles
+
151  * For memory buffers 8-15 sample/hold for 4 clock cycles (default)
+
152  * Disable Multiple Sampling
+
153  */
+
154  ADC12_B_setupSamplingTimer(ADC12_B_BASE,
+
155  ADC12_B_CYCLEHOLD_64_CYCLES,
+
156  ADC12_B_CYCLEHOLD_4_CYCLES,
+
157  ADC12_B_MULTIPLESAMPLESDISABLE);
+
158 
+
159  //Configure Memory Buffer
+
160  /*
+
161  * Base address of the ADC12B Module
+
162  * Configure memory buffer 0
+
163  * Map input Temperature Sensor to memory buffer 0
+
164  * Vref+ = VREF buffered
+
165  * Vref- = AVss
+
166  * Memory buffer 0 is not the end of a sequence
+
167  */
+
168  ADC12_B_configureMemoryParam configureMemoryParam = {0};
+
169  configureMemoryParam.memoryBufferControlIndex = ADC12_B_MEMORY_0;
+
170  configureMemoryParam.inputSourceSelect = ADC12_B_INPUT_TCMAP;
+
171  configureMemoryParam.refVoltageSourceSelect = ADC12_B_VREFPOS_INTBUF_VREFNEG_VSS;
+
172  configureMemoryParam.endOfSequence = ADC12_B_NOTENDOFSEQUENCE;
+
173  configureMemoryParam.windowComparatorSelect = ADC12_B_WINDOW_COMPARATOR_DISABLE;
+
174  configureMemoryParam.differentialModeSelect = ADC12_B_DIFFERENTIAL_MODE_DISABLE;
+
175  ADC12_B_configureMemory(ADC12_B_BASE, &configureMemoryParam);
+
176 
+
177  ADC12_B_clearInterrupt(ADC12_B_BASE,
+
178  0,
+
179  ADC12_B_IFG0
+
180  );
+
181 
+
182  //Enable memory buffer 0 interrupt
+
183  ADC12_B_enableInterrupt(ADC12_B_BASE,
+
184  ADC12_B_IE0,
+
185  0,
+
186  0);
+
187 
+
188  // If ref generator busy, WAIT
+
189  while(REF_A_BUSY == Ref_A_isRefGenBusy(REF_A_BASE));
+
190  // Select internal ref = 1.2V
+
191  Ref_A_setReferenceVoltage(REF_A_BASE, REF_A_VREF1_2V);
+
192  // Internal Reference ON
+
193  Ref_A_enableReferenceVoltage(REF_A_BASE);
+
194  // Wait for reference generator to settle
+
195  while(REF_A_READY != Ref_A_isVariableReferenceVoltageOutputReady(REF_A_BASE));
+
196 
+
197  // TLV access Function Call
+
198  TLV_getInfo(TLV_TAG_ADCCAL,
+
199  0,
+
200  &bADCCAL_bytes,
+
201  (uint16_t **)&pADCCAL
+
202  );
+
203 
+
204  mref = ((float)
+
205  (pADCCAL->adc_ref15_85_temp - pADCCAL->adc_ref15_30_temp))/(85-30);
+
206  nref = pADCCAL->adc_ref15_85_temp - mref*85;
+
207 }
+
208 
+
209 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
210 #pragma vector=ADC12_VECTOR
+
211 __interrupt
+
212 #elif defined(__GNUC__)
+
213 __attribute__((interrupt(ADC12_VECTOR)))
+
214 #endif
+
215 void ADC12ISR (void)
+
216 {
+
217  switch(__even_in_range(ADC12IV,12)) {
+
218  case 0: break; // Vector 0: No interrupt
+
219  case 2: break; // Vector 2: ADC12BMEMx Overflow
+
220  case 4: break; // Vector 4: Conversion time overflow
+
221  case 6: break; // Vector 6: ADC12BHI
+
222  case 8: break; // Vector 8: ADC12BLO
+
223  case 10: break; // Vector 10: ADC12BIN
+
224  case 12: // Vector 12: ADC12BMEM0 Interrupt
+
225  //Move results, IFG is cleared
+
226  temp = ADC12_B_getResults(ADC12_B_BASE, ADC12_B_MEMORY_0);
+
227 
+
228  //Exit active CPU
+
229  __bic_SR_register_on_exit(LPM4_bits);
+
230  break;
+
231  case 14: break; // Vector 14: ADC12BMEM1
+
232  case 16: break; // Vector 16: ADC12BMEM2
+
233  case 18: break; // Vector 18: ADC12BMEM3
+
234  case 20: break; // Vector 20: ADC12BMEM4
+
235  case 22: break; // Vector 22: ADC12BMEM5
+
236  case 24: break; // Vector 24: ADC12BMEM6
+
237  case 26: break; // Vector 26: ADC12BMEM7
+
238  case 28: break; // Vector 28: ADC12BMEM8
+
239  case 30: break; // Vector 30: ADC12BMEM9
+
240  case 32: break; // Vector 32: ADC12BMEM10
+
241  case 34: break; // Vector 34: ADC12BMEM11
+
242  case 36: break; // Vector 36: ADC12BMEM12
+
243  case 38: break; // Vector 38: ADC12BMEM13
+
244  case 40: break; // Vector 40: ADC12BMEM14
+
245  case 42: break; // Vector 42: ADC12BMEM15
+
246  case 44: break; // Vector 44: ADC12BMEM16
+
247  case 46: break; // Vector 46: ADC12BMEM17
+
248  case 48: break; // Vector 48: ADC12BMEM18
+
249  case 50: break; // Vector 50: ADC12BMEM19
+
250  case 52: break; // Vector 52: ADC12BMEM20
+
251  case 54: break; // Vector 54: ADC12BMEM21
+
252  case 56: break; // Vector 56: ADC12BMEM22
+
253  case 58: break; // Vector 58: ADC12BMEM23
+
254  case 60: break; // Vector 60: ADC12BMEM24
+
255  case 62: break; // Vector 62: ADC12BMEM25
+
256  case 64: break; // Vector 64: ADC12BMEM26
+
257  case 66: break; // Vector 66: ADC12BMEM27
+
258  case 68: break; // Vector 68: ADC12BMEM28
+
259  case 70: break; // Vector 70: ADC12BMEM29
+
260  case 72: break; // Vector 72: ADC12BMEM30
+
261  case 74: break; // Vector 74: ADC12BMEM31
+
262  case 76: break; // Vector 76: ADC12BRDY
+
263  default: break;
+
264  }
+
265 }
+
void calibrateADC(void)
+
volatile float DegF
+
uint16_t temp
+
void main(void)
+
uint8_t bADCCAL_bytes
+ +
struct s_TLV_ADC_Cal_Data * pADCCAL
+ +
void ADC12ISR(void)
+
volatile float DegC
+ +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html new file mode 100644 index 0000000..63ec9df --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html @@ -0,0 +1,181 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/wdt_a/wdt_a_ex1_intervalSMCLK.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
wdt_a_ex1_intervalSMCLK.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void WDT_A_ISR (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

WDT - Toggle P1.0, Interval Overflow ISR, DCO SMCLK

+

Toggle P1.0 using software timed by the WDT ISR. Toggle rate is approx. 30ms = {(default DCO 1.045MHz) / 32768} based on default DCO = SMCLK clock source used in this example for the WDT. ACLK = n/a, MCLK = SMCLK = default DCO ~1.045MHz

+

+Tested On: MSP430FR5969

+ + + + + + + +
/ |
RST
P1.0 -->LED
+

| |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • WDT_A_VECTOR
  • +
+ +

Definition at line 62 of file wdt_a_ex1_intervalSMCLK.c.

+ +

References __no_operation().

+ +
+
+ +

◆ WDT_A_ISR()

+ +
+
+ + + + + + + + +
void WDT_A_ISR (void )
+
+ +

Definition at line 101 of file wdt_a_ex1_intervalSMCLK.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js new file mode 100644 index 0000000..01bf269 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "WDT_A_ISR", "_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c.html#afa209a204489cffc3a47f48db05b9713", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c_source.html new file mode 100644 index 0000000..cbc8e05 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex1__interval_s_m_c_l_k_8c_source.html @@ -0,0 +1,191 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/wdt_a/wdt_a_ex1_intervalSMCLK.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
wdt_a_ex1_intervalSMCLK.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
59 //******************************************************************************
+
60 #include "driverlib.h"
+
61 
+
62 void main (void)
+
63 {
+
64  //Initialize WDT module in timer interval mode,
+
65  //with SMCLK as source at an interval of 32 ms.
+
66  WDT_A_initIntervalTimer(WDT_A_BASE,
+
67  WDT_A_CLOCKSOURCE_SMCLK,
+
68  WDT_A_CLOCKDIVIDER_32K);
+
69 
+
70  WDT_A_start(WDT_A_BASE);
+
71 
+
72  //Enable Watchdog Interupt
+
73  SFR_clearInterrupt(SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT);
+
74  SFR_enableInterrupt(SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT);
+
75 
+
76  //Set P1.0 to output direction
+
77  GPIO_setAsOutputPin(
+
78  GPIO_PORT_P1,
+
79  GPIO_PIN0
+
80  );
+
81 
+
82  /*
+
83  * Disable the GPIO power-on default high-impedance mode to activate
+
84  * previously configured port settings
+
85  */
+
86  PMM_unlockLPM5();
+
87 
+
88  //Enter LPM0, enable interrupts
+
89  __bis_SR_register(LPM0_bits + GIE);
+
90  //For debugger
+ +
92 }
+
93 
+
94 //Watchdog Timer interrupt service routine
+
95 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
96 #pragma vector=WDT_VECTOR
+
97 __interrupt
+
98 #elif defined(__GNUC__)
+
99 __attribute__((interrupt(WDT_VECTOR)))
+
100 #endif
+
101 void WDT_A_ISR (void)
+
102 {
+
103  //Toggle P1.0
+
104  GPIO_toggleOutputOnPin(
+
105  GPIO_PORT_P1,
+
106  GPIO_PIN0);
+
107 }
+
108 
+
void main(void)
+
void WDT_A_ISR(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html new file mode 100644 index 0000000..0338a5a --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html @@ -0,0 +1,181 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/wdt_a/wdt_a_ex2_intervalACLK.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
wdt_a_ex2_intervalACLK.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void WDT_A_ISR (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

WDT - Toggle P1.0, Interval Overflow ISR, 32kHz ACLK

+

Toggle P1.0 using software timed by WDT ISR. Toggle rate is exactly 250ms based on 32kHz ACLK WDT clock source. In this example the WDT is configured to divide 32768 watch-crystal(2^15) by 2^13 with an ISR triggered @ 4Hz = [WDT CLK source/32768]. ACLK = REFO , MCLK = SMCLK = default DCO ~1.045MHz

+

+Tested On: MSP430FR5969

+ + + + + + + +
/ |
RST
P1.0 -->LED
+

| |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • WDT_A_VECTOR
  • +
+ +

Definition at line 63 of file wdt_a_ex2_intervalACLK.c.

+ +

References __no_operation().

+ +
+
+ +

◆ WDT_A_ISR()

+ +
+
+ + + + + + + + +
void WDT_A_ISR (void )
+
+ +

Definition at line 102 of file wdt_a_ex2_intervalACLK.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js new file mode 100644 index 0000000..9796433 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.js @@ -0,0 +1,5 @@ +var _m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "WDT_A_ISR", "_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c.html#afa209a204489cffc3a47f48db05b9713", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c_source.html new file mode 100644 index 0000000..5410cdd --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex2__interval_a_c_l_k_8c_source.html @@ -0,0 +1,191 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/wdt_a/wdt_a_ex2_intervalACLK.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
wdt_a_ex2_intervalACLK.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Initialize WDT module in timer interval mode,
+
66  //with ACLK as source at an interval of 250 ms.
+
67  WDT_A_initIntervalTimer(WDT_A_BASE,
+
68  WDT_A_CLOCKSOURCE_ACLK,
+
69  WDT_A_CLOCKDIVIDER_8192);
+
70 
+
71  WDT_A_start(WDT_A_BASE);
+
72 
+
73  //Enable Watchdog Interupt
+
74  SFR_clearInterrupt(SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT);
+
75  SFR_enableInterrupt(SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT);
+
76 
+
77  //Set P1.0 to output direction
+
78  GPIO_setAsOutputPin(
+
79  GPIO_PORT_P1,
+
80  GPIO_PIN0
+
81  );
+
82 
+
83  /*
+
84  * Disable the GPIO power-on default high-impedance mode to activate
+
85  * previously configured port settings
+
86  */
+
87  PMM_unlockLPM5();
+
88 
+
89  //Enter LPM3, enable interrupts
+
90  __bis_SR_register(LPM3_bits + GIE);
+
91  //For debugger
+ +
93 }
+
94 
+
95 //Watchdog Timer interrupt service routine
+
96 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
97 #pragma vector=WDT_VECTOR
+
98 __interrupt
+
99 #elif defined(__GNUC__)
+
100 __attribute__((interrupt(WDT_VECTOR)))
+
101 #endif
+
102 void WDT_A_ISR (void)
+
103 {
+
104  //Toggle P1.0
+
105  GPIO_toggleOutputOnPin(
+
106  GPIO_PORT_P1,
+
107  GPIO_PIN0);
+
108 }
+
109 
+
void main(void)
+
void WDT_A_ISR(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html new file mode 100644 index 0000000..b1f2e06 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html @@ -0,0 +1,159 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/wdt_a/wdt_a_ex3_watchdogACLK.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
wdt_a_ex3_watchdogACLK.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

WDT - Failsafe Clock, 39KHz LFMODCLK

+

Configure WDT in watchdog to timeout sourced by ACLK. LPM3 is entered. This example will demonstrate WDT fail-safe feature by automatically selecting LFMODCLK as WDT clock source if ACLK fails. Watchdog timeout will toggle on P1.0 every 1 second in main function. LFMODCLK = 39062, ACLK = 32768, MCLK = SMCLK = default DCO ~1.045MHz

+

+Tested On: MSP430FR5969

+ + + + + + + +
/ |
RST
P1.0 -->LED
+

| |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 63 of file wdt_a_ex3_watchdogACLK.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js new file mode 100644 index 0000000..da492f6 --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.js @@ -0,0 +1,4 @@ +var _m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c = +[ + [ "main", "_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c_source.html b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c_source.html new file mode 100644 index 0000000..8ef89ad --- /dev/null +++ b/Generated Documentation/html/_m_s_p430_f_r5xx__6xx_2wdt__a_2wdt__a__ex3__watchdog_a_c_l_k_8c_source.html @@ -0,0 +1,178 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/wdt_a/wdt_a_ex3_watchdogACLK.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
wdt_a_ex3_watchdogACLK.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 void main (void)
+
64 {
+
65  //Watchdog mode -> reset after expired time
+
66  //WDT is clocked by LFMODCLK since ALCK is failed without initialization
+
67  //Set Watchdog Timer timeout 1s - SET BREAKPOINT HERE
+
68  WDT_A_initWatchdogTimer(WDT_A_BASE,
+
69  WDT_A_CLOCKSOURCE_ACLK,
+
70  WDT_A_CLOCKDIVIDER_32K);
+
71 
+
72  WDT_A_start(WDT_A_BASE);
+
73 
+
74  //Set P1.0 to output direction
+
75  GPIO_setAsOutputPin(
+
76  GPIO_PORT_P1,
+
77  GPIO_PIN0
+
78  );
+
79 
+
80  //Toggle P1.0
+
81  GPIO_toggleOutputOnPin(
+
82  GPIO_PORT_P1,
+
83  GPIO_PIN0
+
84  );
+
85 
+
86  /*
+
87  * Disable the GPIO power-on default high-impedance mode to activate
+
88  * previously configured port settings
+
89  */
+
90  PMM_unlockLPM5();
+
91 
+
92  //Enter LPM3
+
93  __bis_SR_register(LPM3_bits + GIE);
+
94  //For debugger
+ +
96 }
+
97 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/_power_01_design_8markdown.html b/Generated Documentation/html/_power_01_design_8markdown.html new file mode 100644 index 0000000..635ffde --- /dev/null +++ b/Generated Documentation/html/_power_01_design_8markdown.html @@ -0,0 +1,105 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Hardware/Power Design.markdown File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Hardware/Power Design.markdown File Reference
+
+
+
+
+ + + + diff --git a/Generated Documentation/html/_r_e_a_d_m_e_8markdown.html b/Generated Documentation/html/_r_e_a_d_m_e_8markdown.html index 25f2f76..8d31893 100644 --- a/Generated Documentation/html/_r_e_a_d_m_e_8markdown.html +++ b/Generated Documentation/html/_r_e_a_d_m_e_8markdown.html @@ -98,7 +98,7 @@ $(document).ready(function(){initNavTree('_r_e_a_d_m_e_8markdown.html',''); init diff --git a/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f5xx__6xx_200__empty_project_2main_8c.html b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f5xx__6xx_200__empty_project_2main_8c.html new file mode 100644 index 0000000..897c4ec --- /dev/null +++ b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f5xx__6xx_200__empty_project_2main_8c.html @@ -0,0 +1,138 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/00_emptyProject/main.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
main.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

Empty Project that includes driverlib

+ +

Definition at line 40 of file main.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f5xx__6xx_200__empty_project_2main_8c.js b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f5xx__6xx_200__empty_project_2main_8c.js new file mode 100644 index 0000000..9109789 --- /dev/null +++ b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f5xx__6xx_200__empty_project_2main_8c.js @@ -0,0 +1,4 @@ +var _resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f5xx__6xx_200__empty_project_2main_8c = +[ + [ "main", "_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f5xx__6xx_200__empty_project_2main_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f5xx__6xx_200__empty_project_2main_8c_source.html b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f5xx__6xx_200__empty_project_2main_8c_source.html new file mode 100644 index 0000000..343f47a --- /dev/null +++ b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f5xx__6xx_200__empty_project_2main_8c_source.html @@ -0,0 +1,146 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/00_emptyProject/main.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
main.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 
+
33 #include "driverlib.h"
+
34 
+
35 //******************************************************************************
+
39 //******************************************************************************
+
40 void main (void)
+
41 {
+
42 }
+
int main(void)
Definition: main.c:7
+ +
+
+ + + + diff --git a/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r2xx__4xx_200__empty_project_2main_8c.html b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r2xx__4xx_200__empty_project_2main_8c.html new file mode 100644 index 0000000..d6d340e --- /dev/null +++ b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r2xx__4xx_200__empty_project_2main_8c.html @@ -0,0 +1,138 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/00_emptyProject/main.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
main.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

Empty Project that includes driverlib

+ +

Definition at line 38 of file main.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r2xx__4xx_200__empty_project_2main_8c.js b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r2xx__4xx_200__empty_project_2main_8c.js new file mode 100644 index 0000000..a49d568 --- /dev/null +++ b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r2xx__4xx_200__empty_project_2main_8c.js @@ -0,0 +1,4 @@ +var _resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r2xx__4xx_200__empty_project_2main_8c = +[ + [ "main", "_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r2xx__4xx_200__empty_project_2main_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r2xx__4xx_200__empty_project_2main_8c_source.html b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r2xx__4xx_200__empty_project_2main_8c_source.html new file mode 100644 index 0000000..00eb49d --- /dev/null +++ b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r2xx__4xx_200__empty_project_2main_8c_source.html @@ -0,0 +1,144 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/00_emptyProject/main.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
main.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 //******************************************************************************
+
37 //******************************************************************************
+
38 void main (void)
+
39 {
+
40 }
+
int main(void)
Definition: main.c:7
+ +
+
+ + + + diff --git a/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r57xx_200__empty_project_2main_8c.html b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r57xx_200__empty_project_2main_8c.html new file mode 100644 index 0000000..c193e1a --- /dev/null +++ b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r57xx_200__empty_project_2main_8c.html @@ -0,0 +1,138 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/00_emptyProject/main.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
main.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

Empty Project that includes driverlib

+ +

Definition at line 39 of file main.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r57xx_200__empty_project_2main_8c.js b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r57xx_200__empty_project_2main_8c.js new file mode 100644 index 0000000..5286f87 --- /dev/null +++ b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r57xx_200__empty_project_2main_8c.js @@ -0,0 +1,4 @@ +var _resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r57xx_200__empty_project_2main_8c = +[ + [ "main", "_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r57xx_200__empty_project_2main_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r57xx_200__empty_project_2main_8c_source.html b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r57xx_200__empty_project_2main_8c_source.html new file mode 100644 index 0000000..7b309f5 --- /dev/null +++ b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r57xx_200__empty_project_2main_8c_source.html @@ -0,0 +1,145 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/00_emptyProject/main.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
main.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
38 //******************************************************************************
+
39 void main (void)
+
40 {
+
41 }
+
int main(void)
Definition: main.c:7
+ +
+
+ + + + diff --git a/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r5xx__6xx_200__empty_project_2main_8c.html b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r5xx__6xx_200__empty_project_2main_8c.html new file mode 100644 index 0000000..ceaad85 --- /dev/null +++ b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r5xx__6xx_200__empty_project_2main_8c.html @@ -0,0 +1,138 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/00_emptyProject/main.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
main.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

Empty Project that includes driverlib

+ +

Definition at line 39 of file main.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r5xx__6xx_200__empty_project_2main_8c.js b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r5xx__6xx_200__empty_project_2main_8c.js new file mode 100644 index 0000000..0b68051 --- /dev/null +++ b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r5xx__6xx_200__empty_project_2main_8c.js @@ -0,0 +1,4 @@ +var _resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r5xx__6xx_200__empty_project_2main_8c = +[ + [ "main", "_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r5xx__6xx_200__empty_project_2main_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r5xx__6xx_200__empty_project_2main_8c_source.html b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r5xx__6xx_200__empty_project_2main_8c_source.html new file mode 100644 index 0000000..644e290 --- /dev/null +++ b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430_f_r5xx__6xx_200__empty_project_2main_8c_source.html @@ -0,0 +1,145 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/00_emptyProject/main.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
main.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
38 //******************************************************************************
+
39 void main (void)
+
40 {
+
41 }
+
int main(void)
Definition: main.c:7
+ +
+
+ + + + diff --git a/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430i2xx_200__empty_project_2main_8c.html b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430i2xx_200__empty_project_2main_8c.html new file mode 100644 index 0000000..b5792e4 --- /dev/null +++ b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430i2xx_200__empty_project_2main_8c.html @@ -0,0 +1,138 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430i2xx/00_emptyProject/main.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
main.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

Empty Project that includes driverlib

+ +

Definition at line 39 of file main.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430i2xx_200__empty_project_2main_8c.js b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430i2xx_200__empty_project_2main_8c.js new file mode 100644 index 0000000..d22dde3 --- /dev/null +++ b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430i2xx_200__empty_project_2main_8c.js @@ -0,0 +1,4 @@ +var _resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430i2xx_200__empty_project_2main_8c = +[ + [ "main", "_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430i2xx_200__empty_project_2main_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430i2xx_200__empty_project_2main_8c_source.html b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430i2xx_200__empty_project_2main_8c_source.html new file mode 100644 index 0000000..255e081 --- /dev/null +++ b/Generated Documentation/html/_resources_2_software_2msp430__driverlib__2__91__13__01_2examples_2_m_s_p430i2xx_200__empty_project_2main_8c_source.html @@ -0,0 +1,145 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430i2xx/00_emptyProject/main.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
main.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
38 //******************************************************************************
+
39 void main (void)
+
40 {
+
41 }
+
int main(void)
Definition: main.c:7
+ +
+
+ + + + diff --git a/Generated Documentation/html/_software_2_code_01_composer_01_studio_01_workspace_2_sunseeker_telemetry_and_lighting_system_2main_8c.html b/Generated Documentation/html/_software_2_code_01_composer_01_studio_01_workspace_2_sunseeker_telemetry_and_lighting_system_2main_8c.html new file mode 100644 index 0000000..5681d77 --- /dev/null +++ b/Generated Documentation/html/_software_2_code_01_composer_01_studio_01_workspace_2_sunseeker_telemetry_and_lighting_system_2main_8c.html @@ -0,0 +1,138 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Software/Code Composer Studio Workspace/SunseekerTelemetryAndLightingSystem/main.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
main.c File Reference
+
+
+
#include <msp430.h>
+
+

Go to the source code of this file.

+ + + + +

+Functions

int main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
int main (void )
+
+

main.c

+ +

Definition at line 7 of file main.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/_software_2_code_01_composer_01_studio_01_workspace_2_sunseeker_telemetry_and_lighting_system_2main_8c.js b/Generated Documentation/html/_software_2_code_01_composer_01_studio_01_workspace_2_sunseeker_telemetry_and_lighting_system_2main_8c.js new file mode 100644 index 0000000..8d281b8 --- /dev/null +++ b/Generated Documentation/html/_software_2_code_01_composer_01_studio_01_workspace_2_sunseeker_telemetry_and_lighting_system_2main_8c.js @@ -0,0 +1,4 @@ +var _software_2_code_01_composer_01_studio_01_workspace_2_sunseeker_telemetry_and_lighting_system_2main_8c = +[ + [ "main", "_software_2_code_01_composer_01_studio_01_workspace_2_sunseeker_telemetry_and_lighting_system_2main_8c.html#a840291bc02cba5474a4cb46a9b9566fe", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/_software_2_code_01_composer_01_studio_01_workspace_2_sunseeker_telemetry_and_lighting_system_2main_8c_source.html b/Generated Documentation/html/_software_2_code_01_composer_01_studio_01_workspace_2_sunseeker_telemetry_and_lighting_system_2main_8c_source.html new file mode 100644 index 0000000..b4b3ed9 --- /dev/null +++ b/Generated Documentation/html/_software_2_code_01_composer_01_studio_01_workspace_2_sunseeker_telemetry_and_lighting_system_2main_8c_source.html @@ -0,0 +1,115 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Software/Code Composer Studio Workspace/SunseekerTelemetryAndLightingSystem/main.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
main.c
+
+
+Go to the documentation of this file.
1 #include <msp430.h> // The correct header file will be chosen automatically based on project settings
+
2 
+
3 
+
7 int main(void)
+
8 {
+
9  WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
+
10 
+
11  return 0;
+
12 }
+
int main(void)
Definition: main.c:7
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a_8c.html b/Generated Documentation/html/adc10__a_8c.html index 64393ce..e48b619 100644 --- a/Generated Documentation/html/adc10__a_8c.html +++ b/Generated Documentation/html/adc10__a_8c.html @@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('adc10__a_8c.html',''); initResizable() diff --git a/Generated Documentation/html/adc10__a_8c_source.html b/Generated Documentation/html/adc10__a_8c_source.html index fd7c72b..9af4632 100644 --- a/Generated Documentation/html/adc10__a_8c_source.html +++ b/Generated Documentation/html/adc10__a_8c_source.html @@ -309,7 +309,7 @@ $(document).ready(function(){initNavTree('adc10__a_8c_source.html',''); initResi diff --git a/Generated Documentation/html/adc10__a_8h.html b/Generated Documentation/html/adc10__a_8h.html index 20c1fb2..22813b8 100644 --- a/Generated Documentation/html/adc10__a_8h.html +++ b/Generated Documentation/html/adc10__a_8h.html @@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('adc10__a_8h.html',''); initResizable() diff --git a/Generated Documentation/html/adc10__a_8h_source.html b/Generated Documentation/html/adc10__a_8h_source.html index c3a3b6f..40dff8e 100644 --- a/Generated Documentation/html/adc10__a_8h_source.html +++ b/Generated Documentation/html/adc10__a_8h_source.html @@ -509,7 +509,7 @@ $(document).ready(function(){initNavTree('adc10__a_8h_source.html',''); initResi diff --git a/Generated Documentation/html/adc10__a__ex1__avcc_ref_8c.html b/Generated Documentation/html/adc10__a__ex1__avcc_ref_8c.html new file mode 100644 index 0000000..353941d --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex1__avcc_ref_8c.html @@ -0,0 +1,180 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex1_avccRef.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc10_a_ex1_avccRef.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void ADC10_A_ISR (void)
 
+

Function Documentation

+ +

◆ ADC10_A_ISR()

+ +
+
+ + + + + + + + +
void ADC10_A_ISR (void )
+
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

ADC10_A - Sample A0 Input, AVcc Ref, LED ON if A0 > 0.5AVcc

+

MSP430F550x Demo A single sample is made on A0 with reference to AVcc. Software sets ADC10SC to start sample and conversion - ADC10SC automatically cleared at EOC.ADC10_A internal oscillator times sample (16x) and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC10_A conversion complete, ADC10_A_ISR will force exit from LPM0 in Mainloop on reti. If A0 > 0.5*AVcc, P1.0 set, else reset.

          MSP430F550x
+       -----------------
+   /|\|              XIN|-
+    | |                 |
+    --|RST          XOUT|-
+      |          P6.0/A0|<- Sample Signal
+      |             P1.0|-> LED
+      |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC10_A peripheral
  • +
  • GPIO Port peripheral
  • +
  • A1
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • ADC10_A_VECTOR
  • +
+ +

Definition at line 68 of file adc10_a_ex1_avccRef.c.

+ +

References __delay_cycles(), and __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a__ex1__avcc_ref_8c.js b/Generated Documentation/html/adc10__a__ex1__avcc_ref_8c.js new file mode 100644 index 0000000..246147c --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex1__avcc_ref_8c.js @@ -0,0 +1,5 @@ +var adc10__a__ex1__avcc_ref_8c = +[ + [ "ADC10_A_ISR", "adc10__a__ex1__avcc_ref_8c.html#a4f0ddf5964c839508277d5e831897765", null ], + [ "main", "adc10__a__ex1__avcc_ref_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc10__a__ex1__avcc_ref_8c_source.html b/Generated Documentation/html/adc10__a__ex1__avcc_ref_8c_source.html new file mode 100644 index 0000000..243de76 --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex1__avcc_ref_8c_source.html @@ -0,0 +1,255 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex1_avccRef.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc10_a_ex1_avccRef.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
65 //******************************************************************************
+
66 #include "driverlib.h"
+
67 
+
68 void main (void)
+
69 {
+
70  //Stop WDT
+
71  WDT_A_hold(WDT_A_BASE);
+
72 
+
73  //Set P1.0 to output direction
+
74  GPIO_setAsOutputPin(
+
75  GPIO_PORT_P1,
+
76  GPIO_PIN0
+
77  );
+
78 
+
79  //Initialize the ADC10_A Module
+
80  /*
+
81  * Base Address for the ADC10_A Module
+
82  * Use internal ADC10_A bit as sample/hold signal to start conversion
+
83  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
84  * Use default clock divider of 1
+
85  */
+
86  ADC10_A_init(ADC10_A_BASE,
+
87  ADC10_A_SAMPLEHOLDSOURCE_SC,
+
88  ADC10_A_CLOCKSOURCE_ADC10OSC,
+
89  ADC10_A_CLOCKDIVIDER_1);
+
90 
+
91  ADC10_A_enable(ADC10_A_BASE);
+
92 
+
93  /*
+
94  * Base Address for the ADC10_A Module
+
95  * Sample/hold for 16 clock cycles
+
96  * Do not enable Multiple Sampling
+
97  */
+
98  ADC10_A_setupSamplingTimer(ADC10_A_BASE,
+
99  ADC10_A_CYCLEHOLD_16_CYCLES,
+
100  ADC10_A_MULTIPLESAMPLESDISABLE);
+
101 
+
102  //Configure the Memory Buffer
+
103  /*
+
104  * Base Address for the ADC10_A Module
+
105  * Use input A0
+
106  * Use positive reference of AVcc
+
107  * Use negative reference of AVss
+
108  */
+
109  ADC10_A_configureMemory(ADC10_A_BASE,
+
110  ADC10_A_INPUT_A0,
+
111  ADC10_A_VREFPOS_AVCC,
+
112  ADC10_A_VREFNEG_AVSS);
+
113 
+
114  //Enable the Memory Buffer Interrupt
+
115  ADC10_A_clearInterrupt(ADC10_A_BASE,
+
116  ADC10IFG0);
+
117  ADC10_A_enableInterrupt(ADC10_A_BASE,
+
118  ADC10IE0);
+
119 
+
120  for (;;)
+
121  {
+
122  __delay_cycles(5000);
+
123 
+
124  //Enable and Start the conversion
+
125  //in Single-Channel, Single Conversion Mode
+
126  ADC10_A_startConversion(ADC10_A_BASE,
+
127  ADC10_A_SINGLECHANNEL);
+
128 
+
129  //LPM0, ADC10_A_ISR will force exit
+
130  __bis_SR_register(CPUOFF + GIE);
+
131  __no_operation();
+
132 
+
133 
+
134  }
+
135 }
+
136 
+
137 // ADC10_A interrupt service routine
+
138 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
139 #pragma vector=ADC10_VECTOR
+
140 __interrupt
+
141 #elif defined(__GNUC__)
+
142 __attribute__((interrupt(ADC10_VECTOR)))
+
143 #endif
+
144 void ADC10_A_ISR (void) {
+
145 
+
146  switch (__even_in_range(ADC10IV,12)){
+
147  case 0: break; //No interrupt
+
148  case 2: break; //conversion result overflow
+
149  case 4: break; //conversion time overflow
+
150  case 6: break; //ADC10HI
+
151  case 8: break; //ADC10LO
+
152  case 10: break; //ADC10IN
+
153  case 12: //ADC10IFG0
+
154  //(Automatically clears ADC10IFG0 by reading memory buffer)
+
155  if (ADC10_A_getResults(ADC10_A_BASE) < 0x1FF){
+
156  //Clear P1.0 LED off
+ +
158  GPIO_PORT_P1,
+
159  GPIO_PIN0
+
160  );
+
161  } else {
+
162  //Set P1.0 LED on
+ +
164  GPIO_PORT_P1,
+
165  GPIO_PIN0
+
166  );
+
167  }
+
168 
+
169  //Clear CPUOFF bit from 0(SR)
+ +
171  break;
+
172  default: break;
+
173  }
+
174 }
+
void ADC10_A_ISR(void)
+
void main(void)
+ +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a__ex2__int_ref_8c.html b/Generated Documentation/html/adc10__a__ex2__int_ref_8c.html new file mode 100644 index 0000000..09a192d --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex2__int_ref_8c.html @@ -0,0 +1,226 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex2_intRef.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc10_a_ex2_intRef.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define TIMER_A_PERIOD   80
 
+ + + + + + + +

+Functions

void main (void)
 
void ADC10_A_ISR (void)
 
void TA0_ISR (void)
 
+

Macro Definition Documentation

+ +

◆ TIMER_A_PERIOD

+ +
+
+ + + + +
#define TIMER_A_PERIOD   80
+
+

ADC10_A - Sample A0 input, 1.5V Shared Ref, LED ON if A0 > 0.5V

+

MSP430F550x Demo A single sample is made on A0 with reference to internal 1.5V Vref.Software sets ADC10SC to start sample and conversion - ADC10SC automatically cleared at EOC. ADC10_A internal oscillator times sample (16x) and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC10_A conversion complete, ADC10_A_ISR will force exit from LPM0 in Mainloop on reti. If A0 > 0.5V, P1.0 set, else reset.

          MSP430F550x
+       -----------------
+   /|\|              XIN|-
+    | |                 |
+    --|RST          XOUT|-
+      |          P6.0/A0|<- Sample Signal
+      |             P1.0|-> LED
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC10_A peripheral
  • +
  • REF peripheral
  • +
  • TIMER_A peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • ADC10_A_VECTOR
  • +
  • TIMER0_A0_VECTOR
  • +
+ +

Definition at line 69 of file adc10_a_ex2_intRef.c.

+ +
+
+

Function Documentation

+ +

◆ ADC10_A_ISR()

+ +
+
+ + + + + + + + +
void ADC10_A_ISR (void )
+
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 71 of file adc10_a_ex2_intRef.c.

+ +

References __delay_cycles(), __no_operation(), and TIMER_A_PERIOD.

+ +
+
+ +

◆ TA0_ISR()

+ +
+
+ + + + + + + + +
void TA0_ISR (void )
+
+ +

Definition at line 220 of file adc10_a_ex2_intRef.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a__ex2__int_ref_8c.js b/Generated Documentation/html/adc10__a__ex2__int_ref_8c.js new file mode 100644 index 0000000..463d62f --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex2__int_ref_8c.js @@ -0,0 +1,7 @@ +var adc10__a__ex2__int_ref_8c = +[ + [ "TIMER_A_PERIOD", "adc10__a__ex2__int_ref_8c.html#ae899bfdc491d37c006b4c301d9f8e147", null ], + [ "ADC10_A_ISR", "adc10__a__ex2__int_ref_8c.html#a4f0ddf5964c839508277d5e831897765", null ], + [ "main", "adc10__a__ex2__int_ref_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TA0_ISR", "adc10__a__ex2__int_ref_8c.html#a7ac362134b9424264b6e1b6d401e9da7", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc10__a__ex2__int_ref_8c_source.html b/Generated Documentation/html/adc10__a__ex2__int_ref_8c_source.html new file mode 100644 index 0000000..fb258b3 --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex2__int_ref_8c_source.html @@ -0,0 +1,307 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex2_intRef.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc10_a_ex2_intRef.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
66 //******************************************************************************
+
67 #include "driverlib.h"
+
68 
+
69 #define TIMER_A_PERIOD 80
+
70 
+
71 void main (void)
+
72 {
+
73  //Stop Watchdog Timer
+
74  WDT_A_hold(WDT_A_BASE);
+
75 
+
76  //Set P1.0 to output direction
+
77  GPIO_setAsOutputPin(
+
78  GPIO_PORT_P1,
+
79  GPIO_PIN0
+
80  );
+
81 
+
82  //Initialize the ADC10_A Module
+
83  /*
+
84  * Base Address for the ADC10_A Module
+
85  * Use internal ADC10_A bit as sample/hold signal to start conversion
+
86  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
87  * Use default clock divider of 1
+
88  */
+
89  ADC10_A_init(ADC10_A_BASE,
+
90  ADC10_A_SAMPLEHOLDSOURCE_SC,
+
91  ADC10_A_CLOCKSOURCE_ADC10OSC,
+
92  ADC10_A_CLOCKDIVIDER_1);
+
93 
+
94  ADC10_A_enable(ADC10_A_BASE);
+
95 
+
96  /*
+
97  * Base Address for the ADC10_A Module
+
98  * Sample/hold for 16 clock cycles
+
99  * Do not enable Multiple Sampling
+
100  */
+
101  ADC10_A_setupSamplingTimer(ADC10_A_BASE,
+
102  ADC10_A_CYCLEHOLD_16_CYCLES,
+
103  ADC10_A_MULTIPLESAMPLESDISABLE);
+
104 
+
105  //Configure Memory Buffer
+
106  /*
+
107  * Base Address for the ADC10_A Module
+
108  * Use input A0
+
109  * Use positive reference of Internally generated Vref
+
110  * Use negative reference of AVss
+
111  */
+
112  ADC10_A_configureMemory(ADC10_A_BASE,
+
113  ADC10_A_INPUT_A0,
+
114  ADC10_A_VREFPOS_INT,
+
115  ADC10_A_VREFNEG_AVSS);
+
116 
+
117  //Enable Memory Buffer interrupt
+
118  ADC10_A_clearInterrupt(ADC10_A_BASE,
+
119  ADC10IFG0);
+
120  ADC10_A_enableInterrupt(ADC10_A_BASE,
+
121  ADC10IE0);
+
122 
+
123  //Configure internal reference
+
124  //If ref generator busy, WAIT
+
125  while ( REF_BUSY == Ref_isRefGenBusy(REF_BASE) ) ;
+
126  //Select internal ref = 1.5V
+
127  Ref_setReferenceVoltage(REF_BASE,
+
128  REF_VREF1_5V);
+
129  //Internal Reference ON
+
130  Ref_enableReferenceVoltage(REF_BASE);
+
131 
+
132  //Configure TA0 to provide delay for reference settling ~75us
+
133  //Start timer in Up Mode with Capture compare interrupt enabled
+
134  Timer_A_initUpModeParam initUpParam = {0};
+
135  initUpParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
136  initUpParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
137  initUpParam.timerPeriod = TIMER_A_PERIOD;
+
138  initUpParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
139  initUpParam.captureCompareInterruptEnable_CCR0_CCIE =
+
140  TIMER_A_CAPTURECOMPARE_INTERRUPT_ENABLE;
+
141  initUpParam.timerClear = TIMER_A_SKIP_CLEAR;
+
142  initUpParam.startTimer = true;
+
143  Timer_A_initUpMode(TIMER_A1_BASE, &initUpParam);
+
144 
+
145 
+
146  //LPM0, TA0_ISR will force exit
+
147  __bis_SR_register(CPUOFF + GIE);
+
148 
+
149  //Disable timer Interrupt
+
150  Timer_A_disableCaptureCompareInterrupt(TIMER_A0_BASE,
+
151  TIMER_A_CAPTURECOMPARE_REGISTER_0);
+
152 
+
153  for (;;)
+
154  {
+
155  //Delay between conversions
+
156  __delay_cycles(5000);
+
157 
+
158  //Enable and Start the conversion
+
159  //in Single-Channel, Single Conversion Mode
+
160  ADC10_A_startConversion(ADC10_A_BASE,
+
161  ADC10_A_SINGLECHANNEL);
+
162 
+
163  //LPM0, ADC10_A_ISR will force exit
+
164  __bis_SR_register(CPUOFF + GIE);
+
165  //For debug only
+
166  __no_operation();
+
167 
+
168 
+
169  }
+
170 }
+
171 
+
172 // ADC10_A interrupt service routine
+
173 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
174 #pragma vector=ADC10_VECTOR
+
175 __interrupt
+
176 #elif defined(__GNUC__)
+
177 __attribute__((interrupt(ADC10_VECTOR)))
+
178 #endif
+
179 void ADC10_A_ISR (void) {
+
180 
+
181  switch (__even_in_range(ADC10IV,12)){
+
182  case 0: break; //No interrupt
+
183  case 2: break; //conversion result overflow
+
184  case 4: break; //conversion time overflow
+
185  case 6: break; //ADC10HI
+
186  case 8: break; //ADC10LO
+
187  case 10: break; //ADC10IN
+
188  case 12: //ADC10IFG0
+
189 
+
190  //Automatically clears ADC10IFG0 by reading memory buffer
+
191  //ADC10MEM = A0 > 0.5V?
+
192  if (ADC10_A_getResults(ADC10_A_BASE) < 0x155){
+
193  //Clear P1.0 LED off
+ +
195  GPIO_PORT_P1,
+
196  GPIO_PIN0
+
197  );
+
198  } else {
+
199  //Set P1.0 LED on
+ +
201  GPIO_PORT_P1,
+
202  GPIO_PIN0
+
203  );
+
204  }
+
205 
+
206  //Clear CPUOFF bit from 0(SR)
+
207  //Breakpoint here and watch ADC_Result
+ +
209  break;
+
210  default: break;
+
211  }
+
212 }
+
213 
+
214 // TIMER_A interrupt service routine
+
215 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
216 __interrupt
+
217 #elif defined(__GNUC__)
+
218 __attribute__((interrupt(TIMER0_A0_VECTOR)))
+
219 #endif
+
220 void TA0_ISR (void) {
+
221 
+
222  Timer_A_stop(TIMER_A0_BASE);
+
223  //Exit LPM0 on return
+
224  LPM0_EXIT;
+
225 }
+
void ADC10_A_ISR(void)
+
void main(void)
+
void TA0_ISR(void)
+
#define TIMER_A_PERIOD
+ +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a__ex3__window_comp_8c.html b/Generated Documentation/html/adc10__a__ex3__window_comp_8c.html new file mode 100644 index 0000000..21233d6 --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex3__window_comp_8c.html @@ -0,0 +1,307 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex3_windowComp.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc10_a_ex3_windowComp.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + +

+Macros

#define High_Threshold   818
 
#define Low_Threshold   409
 
#define SlowToggle_Period   20000 - 1
 
#define FastToggle_Period   1000 - 1
 
+ + + + + + + +

+Functions

void main (void)
 
void ADC10_A_ISR (void)
 
void TIMER0_B0_ISR (void)
 
+ + + +

+Variables

Timer_B_initUpModeParam paramB2 = {0}
 
+

Macro Definition Documentation

+ +

◆ FastToggle_Period

+ +
+
+ + + + +
#define FastToggle_Period   1000 - 1
+
+ +

Definition at line 78 of file adc10_a_ex3_windowComp.c.

+ +
+
+ +

◆ High_Threshold

+ +
+
+ + + + +
#define High_Threshold   818
+
+

ADC10_A - Sample A1 Input, Window Comparator, 2.5V Internal Ref, TB0 Trigger

+

MSP430F550x Demo A1 is sampled in every 0.5s using the TA0.0 trigger in single ch/conversion mode. Window comparator is used to generate interrupts to indicate when the input voltage goes above the High_Threshold or below the Low_Threshold or is in between the high and low thresholds. TIMER_B0 is used as an interval timer used to control the LED at P1.0 to toggle slow/fast or turn off according to the ADC10_A Hi/Lo/IN interupts. ADC10_A is configured in pulse sample mode and is triggered by the TA0.0

         MSP430F550x
+      -----------------
+  /|\|              XIN|-
+   | |                 |
+   --|RST          XOUT|-
+     |          P6.1/A1|<- Sample Signal
+     |             P1.0|-> LED [toggle slow/fast or turn off]
+     |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC10_A peripheral
  • +
  • REF peripheral
  • +
  • TIMER_B peripheral
  • +
  • GPIO Port peripheral
  • +
  • A1
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • ADC10_A_VECTOR
  • +
  • TIMER0_B0_VECTOR
  • +
+ +

Definition at line 73 of file adc10_a_ex3_windowComp.c.

+ +
+
+ +

◆ Low_Threshold

+ +
+
+ + + + +
#define Low_Threshold   409
+
+ +

Definition at line 75 of file adc10_a_ex3_windowComp.c.

+ +
+
+ +

◆ SlowToggle_Period

+ +
+
+ + + + +
#define SlowToggle_Period   20000 - 1
+
+ +

Definition at line 77 of file adc10_a_ex3_windowComp.c.

+ +
+
+

Function Documentation

+ +

◆ ADC10_A_ISR()

+ +
+
+ + + + + + + + +
void ADC10_A_ISR (void )
+
+ +

Definition at line 222 of file adc10_a_ex3_windowComp.c.

+ +

References FastToggle_Period, GPIO_setOutputLowOnPin(), paramB2, and SlowToggle_Period.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+
+ +

◆ TIMER0_B0_ISR()

+ +
+
+ + + + + + + + +
void TIMER0_B0_ISR (void )
+
+ +

Definition at line 270 of file adc10_a_ex3_windowComp.c.

+ +
+
+

Variable Documentation

+ +

◆ paramB2

+ +
+
+ + + + +
Timer_B_initUpModeParam paramB2 = {0}
+
+ +

Definition at line 80 of file adc10_a_ex3_windowComp.c.

+ +

Referenced by ADC10_A_ISR(), and main().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a__ex3__window_comp_8c.js b/Generated Documentation/html/adc10__a__ex3__window_comp_8c.js new file mode 100644 index 0000000..fb7317a --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex3__window_comp_8c.js @@ -0,0 +1,11 @@ +var adc10__a__ex3__window_comp_8c = +[ + [ "FastToggle_Period", "adc10__a__ex3__window_comp_8c.html#a619a3d96f4722bc42e2bad7f971fac0c", null ], + [ "High_Threshold", "adc10__a__ex3__window_comp_8c.html#aedf164404e64d010e84a3ed9ccd429ad", null ], + [ "Low_Threshold", "adc10__a__ex3__window_comp_8c.html#ad34ae37785d0b31878cb096b1417b25f", null ], + [ "SlowToggle_Period", "adc10__a__ex3__window_comp_8c.html#a4066f2ce8f8e324b169c26ad4401ddd5", null ], + [ "ADC10_A_ISR", "adc10__a__ex3__window_comp_8c.html#a4f0ddf5964c839508277d5e831897765", null ], + [ "main", "adc10__a__ex3__window_comp_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMER0_B0_ISR", "adc10__a__ex3__window_comp_8c.html#aba74f24d536d068ad8a244b7dd14d254", null ], + [ "paramB2", "adc10__a__ex3__window_comp_8c.html#a1fd251faa314924539c4dc6a0d79f33f", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc10__a__ex3__window_comp_8c_source.html b/Generated Documentation/html/adc10__a__ex3__window_comp_8c_source.html new file mode 100644 index 0000000..732067d --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex3__window_comp_8c_source.html @@ -0,0 +1,354 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex3_windowComp.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc10_a_ex3_windowComp.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
69 //******************************************************************************
+
70 #include "driverlib.h"
+
71 
+
72 //~2.0V Input
+
73 #define High_Threshold 818
+
74 //~1.0V Input
+
75 #define Low_Threshold 409
+
76 
+
77 #define SlowToggle_Period 20000 - 1
+
78 #define FastToggle_Period 1000 - 1
+
79 
+
80 Timer_B_initUpModeParam paramB2 = {0};
+
81 
+
82 void main (void)
+
83 {
+
84  //Stop Watchdog Timer
+
85  WDT_A_hold(WDT_A_BASE);
+
86 
+
87  paramB2.clockSource = TIMER_B_CLOCKSOURCE_ACLK;
+
88  paramB2.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
89  paramB2.timerPeriod = FastToggle_Period;
+
90  paramB2.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_DISABLE;
+
91  paramB2.captureCompareInterruptEnable_CCR0_CCIE =
+
92  TIMER_B_CCIE_CCR0_INTERRUPT_ENABLE;
+
93  paramB2.timerClear = TIMER_B_SKIP_CLEAR;
+
94  paramB2.startTimer = true;
+
95  Timer_B_initUpMode(TIMER_B0_BASE, &paramB2);
+
96 
+
97  //Initialize the ADC10_A Module
+
98  /*
+
99  * Base Address for the ADC10_A Module
+
100  * Use TIMER_A0 to signal a sample/hold-and-convert
+
101  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
102  * Use default clock divider of 1
+
103  */
+
104  ADC10_A_init(ADC10_A_BASE,
+
105  ADC10_A_SAMPLEHOLDSOURCE_1,
+
106  ADC10_A_CLOCKSOURCE_ADC10OSC,
+
107  ADC10_A_CLOCKDIVIDER_1);
+
108 
+
109  ADC10_A_enable(ADC10_A_BASE);
+
110 
+
111  /*
+
112  * Base Address for the ADC10_A Module
+
113  * Sample/hold for 16 clock cycles
+
114  * Do not enable Multiple Sampling
+
115  */
+
116  ADC10_A_setupSamplingTimer(ADC10_A_BASE,
+
117  ADC10_A_CYCLEHOLD_16_CYCLES,
+
118  ADC10_A_MULTIPLESAMPLESDISABLE);
+
119 
+
120  //Configure Memory Buffer
+
121  /*
+
122  * Base Address for the ADC10_A Module
+
123  * Use input A1
+
124  * Use positive reference of Internally generated Vref
+
125  * Use negative reference of AVss
+
126  */
+
127  ADC10_A_configureMemory(ADC10_A_BASE,
+
128  ADC10_A_INPUT_A1,
+
129  ADC10_A_VREFPOS_INT,
+
130  ADC10_A_VREFNEG_AVSS);
+
131 
+
132  //Configure Window Comparator
+
133  /*
+
134  * Base Address for the ADC10_A Module
+
135  * Set the high threshold of the window comparator
+
136  * Set the low threshold of the window comparator
+
137  */
+
138  ADC10_A_setWindowComp(ADC10_A_BASE,
+ +
140  Low_Threshold);
+
141 
+
142  //Enable all window comparator interrupts
+
143  ADC10_A_clearInterrupt(ADC10_A_BASE,
+
144  ADC10HIIFG + ADC10LOIFG + ADC10INIFG);
+
145  ADC10_A_enableInterrupt(ADC10_A_BASE,
+
146  ADC10HIIE + ADC10LOIE + ADC10INIE);
+
147 
+
148  //Configure internal reference
+
149  //If ref generator busy, WAIT
+
150  while ( REF_BUSY == Ref_isRefGenBusy(REF_BASE) ) ;
+
151  //Select internal ref = 1.5V
+
152  Ref_setReferenceVoltage(REF_BASE,
+
153  REF_VREF2_5V);
+
154  //Internal Reference ON
+
155  Ref_enableReferenceVoltage(REF_BASE);
+
156 
+
157  //Delay (~75us) for Ref to settle
+
158  __delay_cycles(75);
+
159 
+
160 
+
161  //Set P1.0 to output direction
+
162  GPIO_setAsOutputPin(
+
163  GPIO_PORT_P1,
+
164  GPIO_PIN0
+
165  );
+
166 
+
167  //Clear P1.0 LED off
+ +
169  GPIO_PORT_P1,
+
170  GPIO_PIN0
+
171  );
+
172 
+
173  //Configure TB0 period-timer
+
174  Timer_B_initUpModeParam paramB1 = {0};
+
175  paramB1.clockSource = TIMER_B_CLOCKSOURCE_ACLK;
+
176  paramB1.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
177  paramB1.timerPeriod = 0;
+
178  paramB1.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_DISABLE;
+
179  paramB1.captureCompareInterruptEnable_CCR0_CCIE =
+
180  TIMER_B_CCIE_CCR0_INTERRUPT_ENABLE;
+
181  paramB1.timerClear = TIMER_B_DO_CLEAR;
+
182  paramB1.startTimer = true;
+
183  Timer_B_initUpMode(TIMER_B0_BASE, &paramB1);
+
184 
+
185  //Configure ADC10_A timer trigger TA0.1
+
186  Timer_A_initCompareModeParam initCompareModeParam = {0};
+
187  initCompareModeParam.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
+
188  initCompareModeParam.compareInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
189  initCompareModeParam.compareOutputMode = TIMER_A_OUTPUTMODE_TOGGLE;
+
190  initCompareModeParam.compareValue = 8192 - 1;
+
191  Timer_A_initCompareMode(TIMER_A0_BASE, &initCompareModeParam);
+
192 
+
193  Timer_A_initUpModeParam paramA = {0};
+
194  paramA.clockSource = TIMER_A_CLOCKSOURCE_ACLK;
+
195  paramA.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
196  paramA.timerPeriod = 16384 - 1;
+
197  paramA.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
198  paramA.captureCompareInterruptEnable_CCR0_CCIE =
+
199  TIMER_A_CCIE_CCR0_INTERRUPT_DISABLE;
+
200  paramA.timerClear = TIMER_A_DO_CLEAR;
+
201  paramA.startTimer = true;
+
202  Timer_A_initUpMode(TIMER_A0_BASE, &paramA);
+
203 
+
204 
+
205  //Enable and Start the conversion
+
206  //in Repeated Single-Channel Conversion Mode
+
207  ADC10_A_startConversion(ADC10_A_BASE,
+
208  ADC10_A_REPEATED_SINGLECHANNEL);
+
209 
+
210  //Enter LPM3 w/ interrupts
+
211  __bis_SR_register(LPM3_bits + GIE);
+
212  //for debugger
+
213  __no_operation();
+
214 }
+
215 
+
216 // ADC10_A interrupt service routine
+
217 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
218 __interrupt
+
219 #elif defined(__GNUC__)
+
220 __attribute__((interrupt(ADC10_VECTOR)))
+
221 #endif
+
222 void ADC10_A_ISR (void) {
+
223 
+
224  switch (__even_in_range(ADC10IV,12)){
+
225  case 0: break; //No interrupt
+
226  case 2: break; //conversion result overflow
+
227  case 4: break; //conversion time overflow
+
228  case 6: //ADC10HIIFG
+
229  //Turn off Timer
+
230  Timer_B_stop(TIMER_B0_BASE);
+
231 
+
232  //Set Timer Period for fast LED toggle
+
233 
+
234  paramB2.timerPeriod = FastToggle_Period;
+
235  Timer_B_initUpMode(TIMER_B0_BASE, &paramB2);
+
236 
+
237  break;
+
238 
+
239  case 8: //ADC10LOIFG
+
240  //Turn off Timer
+
241  Timer_B_stop(TIMER_B0_BASE);
+
242 
+
243  //Clear P1.0 LED off
+ +
245  GPIO_PORT_P1,
+
246  GPIO_PIN0
+
247  );
+
248  break;
+
249 
+
250  case 10: //ADC10INIFG
+
251  //Turn off Timer
+
252  Timer_B_stop(TIMER_B0_BASE);
+
253 
+
254  //Set Timer Period for slow LED toggle
+
255  paramB2.timerPeriod = SlowToggle_Period;
+
256  Timer_B_initUpMode(TIMER_B0_BASE, &paramB2);
+
257 
+
258  break;
+
259  case 12: break; //ADC10IFG0
+
260  default: break;
+
261  }
+
262 }
+
263 
+
264 // TIMER_B interrupt service routine
+
265 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
266 __interrupt
+
267 #elif defined(__GNUC__)
+
268 __attribute__((interrupt(TIMER0_B0_VECTOR)))
+
269 #endif
+
270 void TIMER0_B0_ISR (void) {
+
271  // Toggle P1.0
+
272  GPIO_toggleOutputOnPin(GPIO_PORT_P1, GPIO_PIN0);
+
273 }
+
Timer_B_initUpModeParam paramB2
+
#define SlowToggle_Period
+
void ADC10_A_ISR(void)
+
#define FastToggle_Period
+
void main(void)
+
void TIMER0_B0_ISR(void)
+
#define Low_Threshold
+
#define High_Threshold
+ +
__no_operation()
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a__ex4__signed_data_8c.html b/Generated Documentation/html/adc10__a__ex4__signed_data_8c.html new file mode 100644 index 0000000..a2bd309 --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex4__signed_data_8c.html @@ -0,0 +1,180 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex4_signedData.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc10_a_ex4_signedData.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void ADC10_A_ISR (void)
 
+

Function Documentation

+ +

◆ ADC10_A_ISR()

+ +
+
+ + + + + + + + +
void ADC10_A_ISR (void )
+
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

ADC10_A - Sample A1 Input, Signed Data, LED ON if A1 > 0.5AVcc

+

MSP430F550x Demo A single sample is made on A0 with SIGNED reference to AVcc. Software sets ADC10SC to start sample and conversion - ADC10SC automatically cleared at EOC. ADC10_A internal oscillator times sample (16x) and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC10_A conversion complete, ADC10_A_ISR will force exit from LPM0 in Mainloop on reti. If A1 > 0.5*AVcc, P1.0 set, else reset. To see the full extent of the negative conversion, add a watch to ADC_Result, and anything < 0.5&AVcc will be negative. Note, that a small change like +-1 voltage change ill result in large changes in this scenario because the least significant bits are 0.

          MSP430F550x
+       -----------------
+   /|\|                 |
+    | |                 |
+    --|RST              |
+      |          P6.1/A1|<- Sample Signal
+      |             P1.0|-> LED
+      |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC10_A peripheral
  • +
  • GPIO Port peripheral
  • +
  • A1
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • ADC10_A_VECTOR
  • +
+ +

Definition at line 72 of file adc10_a_ex4_signedData.c.

+ +

References __delay_cycles(), and __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a__ex4__signed_data_8c.js b/Generated Documentation/html/adc10__a__ex4__signed_data_8c.js new file mode 100644 index 0000000..d5916e1 --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex4__signed_data_8c.js @@ -0,0 +1,5 @@ +var adc10__a__ex4__signed_data_8c = +[ + [ "ADC10_A_ISR", "adc10__a__ex4__signed_data_8c.html#a4f0ddf5964c839508277d5e831897765", null ], + [ "main", "adc10__a__ex4__signed_data_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc10__a__ex4__signed_data_8c_source.html b/Generated Documentation/html/adc10__a__ex4__signed_data_8c_source.html new file mode 100644 index 0000000..51e189f --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex4__signed_data_8c_source.html @@ -0,0 +1,258 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex4_signedData.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc10_a_ex4_signedData.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
68 //******************************************************************************
+
69 
+
70 #include "driverlib.h"
+
71 
+
72 void main (void)
+
73 {
+
74  //Stop Watchdog Timer
+
75  WDT_A_hold(WDT_A_BASE);
+
76 
+
77  //Set P1.0 to output direction
+
78  GPIO_setAsOutputPin(
+
79  GPIO_PORT_P1,
+
80  GPIO_PIN0
+
81  );
+
82 
+
83  //Initialize the ADC10_A Module
+
84  /*
+
85  * Base Address for the ADC10_A Module
+
86  * Use internal ADC10_A bit as sample/hold signal to start conversion
+
87  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
88  * Use default clock divider of 1
+
89  */
+
90  ADC10_A_init(ADC10_A_BASE,
+
91  ADC10_A_SAMPLEHOLDSOURCE_SC,
+
92  ADC10_A_CLOCKSOURCE_ADC10OSC,
+
93  ADC10_A_CLOCKDIVIDER_1);
+
94 
+
95  ADC10_A_enable(ADC10_A_BASE);
+
96 
+
97  /*
+
98  * Base Address for the ADC10_A Module
+
99  * Sample/hold for 16 clock cycles
+
100  * Do not enable Multiple Sampling
+
101  */
+
102  ADC10_A_setupSamplingTimer(ADC10_A_BASE,
+
103  ADC10_A_CYCLEHOLD_16_CYCLES,
+
104  ADC10_A_MULTIPLESAMPLESDISABLE);
+
105  //Convert data into signed, 2's complement format
+
106  ADC10_A_setDataReadBackFormat(ADC10_A_BASE,
+
107  ADC10_A_SIGNED_2SCOMPLEMENT);
+
108 
+
109  //Configure Memory Buffer
+
110  /*
+
111  * Base Address for the ADC10_A Module
+
112  * Use input A1
+
113  * Use positive reference of AVcc
+
114  * Use negative reference of AVss
+
115  */
+
116  ADC10_A_configureMemory(ADC10_A_BASE,
+
117  ADC10_A_INPUT_A1,
+
118  ADC10_A_VREFPOS_AVCC,
+
119  ADC10_A_VREFNEG_AVSS);
+
120 
+
121  //Enable Memory Buffer Interrupt
+
122  ADC10_A_clearInterrupt(ADC10_A_BASE,
+
123  ADC10IFG0);
+
124  ADC10_A_enableInterrupt(ADC10_A_BASE,
+
125  ADC10IE0);
+
126 
+
127  while (1)
+
128  {
+
129  __delay_cycles(5000);
+
130 
+
131  //Enable and Start the conversion
+
132  //in Single-Channel, Single-Conversion Mode
+
133  ADC10_A_startConversion(ADC10_A_BASE,
+
134  ADC10_A_SINGLECHANNEL);
+
135 
+
136  //LPM0, ADC10_A_ISR will force exit
+
137  __bis_SR_register(CPUOFF + GIE);
+
138  //For debug only
+
139  __no_operation();
+
140 
+
141 
+
142  }
+
143 }
+
144 
+
145 // ADC10_A interrupt service routine
+
146 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
147 __interrupt
+
148 #elif defined(__GNUC__)
+
149 __attribute__((interrupt(ADC10_VECTOR)))
+
150 #endif
+
151 void ADC10_A_ISR (void) {
+
152 
+
153  switch (__even_in_range(ADC10IV,12)){
+
154  case 0: break; //No interrupt
+
155  case 2: break; //conversion result overflow
+
156  case 4: break; //conversion time overflow
+
157  case 6: break; //ADC10HI
+
158  case 8: break; //ADC10LO
+
159  case 10: break; //ADC10IN
+
160  case 12: //ADC10IFG0
+
161  //Move Results from Memory Buffer
+
162  //(Automatically clears ADC10IFG0 by reading memory buffer)
+
163  if (ADC10_A_getResults(ADC10_A_BASE) < 0){
+
164  //Clear P1.0 LED off
+
165  GPIO_setOutputLowOnPin(GPIO_PORT_P1,
+
166  GPIO_PIN0
+
167  );
+
168  } else {
+
169  //Set P1.0 LED on
+ +
171  GPIO_PORT_P1,
+
172  GPIO_PIN0
+
173  );
+
174  }
+
175  //Clear CPUOFF bit from 0(SR)
+ +
177  break;
+
178  default: break;
+
179  }
+
180 }
+
void ADC10_A_ISR(void)
+
void main(void)
+ +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a__ex5__batt_monitor_8c.html b/Generated Documentation/html/adc10__a__ex5__batt_monitor_8c.html new file mode 100644 index 0000000..d914ded --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex5__batt_monitor_8c.html @@ -0,0 +1,156 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex5_battMonitor.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc10_a_ex5_battMonitor.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

ADC10_A - Sample A11 (AVcc/2), Battery Monitor, LED OFF if AVcc < 2.3V

+

MSP430F550x Demo A single sample is made on A11 (AVcc/2) with reference to internal 1.5V Vref. Software sets ADC10SC to start sample and conversion - ADC10SC automatically cleared at EOC. ADC10_A internal oscillator times sample (16x) and conversion. ADC10BUSY flag is polled for EOC. If A11 (AVcc/2) < 0311h (1.15V) indicating AVcc is less 2.3V, P1.0 reset indicating a lo_Batt condition, else set. ACLK = n/a, MCLK = SMCLK = default DCO ~1.2MHz, ADC10CLK = ADC10OSC

          MSP430F550x
+       -----------------
+   /|\|              XIN|-
+    | |                 |
+    --|RST          XOUT|-
+      |  (AVcc/2) -> A11|  [ Voltage source->Vcc + external pwr jumper]
+      |             P1.0|-> LED  [ON if AVcc > 2.3V]
+      |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC10_A peripheral
  • +
  • GPIO Port peripheral
  • +
  • A11
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 69 of file adc10_a_ex5_battMonitor.c.

+ +

References __delay_cycles(), __no_operation(), GPIO_setOutputHighOnPin(), and GPIO_setOutputLowOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a__ex5__batt_monitor_8c.js b/Generated Documentation/html/adc10__a__ex5__batt_monitor_8c.js new file mode 100644 index 0000000..442b0c6 --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex5__batt_monitor_8c.js @@ -0,0 +1,4 @@ +var adc10__a__ex5__batt_monitor_8c = +[ + [ "main", "adc10__a__ex5__batt_monitor_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc10__a__ex5__batt_monitor_8c_source.html b/Generated Documentation/html/adc10__a__ex5__batt_monitor_8c_source.html new file mode 100644 index 0000000..c21d7a9 --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex5__batt_monitor_8c_source.html @@ -0,0 +1,239 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex5_battMonitor.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc10_a_ex5_battMonitor.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
66 //******************************************************************************
+
67 #include "driverlib.h"
+
68 
+
69 void main (void)
+
70 {
+
71  //Stop Watchdog Timer
+
72  WDT_A_hold(WDT_A_BASE);
+
73 
+
74  //Initialize the ADC10_A Module
+
75  /*
+
76  * Base Address for the ADC10_A Module
+
77  * Use internal ADC10_A bit as sample/hold signal to start conversion
+
78  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
79  * Use default clock divider of 1
+
80  */
+
81  ADC10_A_init(ADC10_A_BASE,
+
82  ADC10_A_SAMPLEHOLDSOURCE_SC,
+
83  ADC10_A_CLOCKSOURCE_ADC10OSC,
+
84  ADC10_A_CLOCKDIVIDER_1);
+
85 
+
86  ADC10_A_enable(ADC10_A_BASE);
+
87 
+
88  /*
+
89  * Base Address for the ADC10_A Module
+
90  * Sample/hold for 16 clock cycles
+
91  * Do not enable Multiple Sampling
+
92  */
+
93  ADC10_A_setupSamplingTimer(ADC10_A_BASE,
+
94  ADC10_A_CYCLEHOLD_16_CYCLES,
+
95  ADC10_A_MULTIPLESAMPLESDISABLE);
+
96 
+
97  //Configure Memory Buffer
+
98  /*
+
99  * Base Address for the ADC10_A Module
+
100  * Use (Vcc-Vss)/2 as input
+
101  * Use positive reference of Internally generated Vref
+
102  * Use negative reference of AVss
+
103  */
+
104  ADC10_A_configureMemory(ADC10_A_BASE,
+
105  ADC10_A_INPUT_BATTERYMONITOR,
+
106  ADC10_A_VREFPOS_INT,
+
107  ADC10_A_VREFNEG_AVSS);
+
108 
+
109  //Configure internal reference
+
110  //If ref generator busy, WAIT
+
111  while ( REF_BUSY == Ref_isRefGenBusy(REF_BASE) ) ;
+
112  //Select internal ref = 1.5V
+
113  Ref_setReferenceVoltage(REF_BASE,
+
114  REF_VREF1_5V);
+
115  //Internal Reference ON
+
116  Ref_enableReferenceVoltage(REF_BASE);
+
117 
+
118  //Delay (~75us) for Ref to settle
+
119  __delay_cycles(75);
+
120 
+
121  //Set P1.0 to output direction
+
122  GPIO_setAsOutputPin(
+
123  GPIO_PORT_P1,
+
124  GPIO_PIN0
+
125  );
+
126 
+
127  //Clear P1.0 LED off
+ +
129  GPIO_PORT_P1,
+
130  GPIO_PIN0
+
131  );
+
132 
+
133  while (1)
+
134  {
+
135  //Enable and Start the conversion
+
136  //in Single-Channel, Single-Conversion Mode
+
137  ADC10_A_startConversion(ADC10_A_BASE,
+
138  ADC10_A_SINGLECHANNEL);
+
139  //ADC10BUSY?
+
140  while (ADC10_A_isBusy(ADC10_A_BASE)) ;
+
141 
+
142  //For debug only
+
143  __no_operation();
+
144 
+
145  //Is ADC10MEM = A11 > 1.15V?
+
146  if (ADC10_A_getResults(ADC10_A_BASE) < 0x311){
+
147  //Clear P1.0 LED off
+ +
149  GPIO_PORT_P1,
+
150  GPIO_PIN0
+
151  );
+
152  } else {
+
153  //Set P1.0 LED on
+ +
155  GPIO_PORT_P1,
+
156  GPIO_PIN0
+
157  );
+
158  }
+
159  }
+
160 }
+
161 
+
void main(void)
+ +
__no_operation()
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a__ex6__ref_toggle_8c.html b/Generated Documentation/html/adc10__a__ex6__ref_toggle_8c.html new file mode 100644 index 0000000..70fc0e0 --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex6__ref_toggle_8c.html @@ -0,0 +1,183 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex6_refToggle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc10_a_ex6_refToggle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void delay (void)
 
void main (void)
 
+

Function Documentation

+ +

◆ delay()

+ +
+
+ + + + + + + + +
void delay (void )
+
+

ADC10_A - Sample A1 Input, Toggle Internal Reference

+

MSP430F550x Demo Sample and convert analog voltage at ADC i/p ch A1 in single channel single conversion mode. Internal reference is toggled between 1.5V and 2.5V and the ADC measurements are made. With 1V input at A1, Vref+ of 1.5V and 2.5V gives ADC conv result of ~682 and ~409 respectively. LED at P1.0 is turned on when ADC conv result >500 (that is with Vref=1.5V) and turned off otherwise (when Vref=2.5V) Basically with an input between 0.8V and 1.3V the LED will toggle consistently, with an input below 0.8V the LED will stay off, and an input above 1.3V the LED will remain on. ACLK = n/a, MCLK = SMCLK = default DCO ~1.2MHz, ADC10CLK = ADC10OSC

         MSP430F550x
+      -----------------
+  /|\|              XIN|-
+   | |                 |
+   --|RST          XOUT|-
+     |                 |
+     |          P6.1/A1|<- 1V
+     |             P1.0|-> LED
+     |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC10_A peripheral
  • +
  • GPIO Port peripheral
  • +
  • A1
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 190 of file adc10_a_ex6_refToggle.c.

+ +

References i.

+ +

Referenced by main().

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a__ex6__ref_toggle_8c.js b/Generated Documentation/html/adc10__a__ex6__ref_toggle_8c.js new file mode 100644 index 0000000..1dd4030 --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex6__ref_toggle_8c.js @@ -0,0 +1,5 @@ +var adc10__a__ex6__ref_toggle_8c = +[ + [ "delay", "adc10__a__ex6__ref_toggle_8c.html#a341d33c536d663703208ab568f7d1e0e", null ], + [ "main", "adc10__a__ex6__ref_toggle_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc10__a__ex6__ref_toggle_8c_source.html b/Generated Documentation/html/adc10__a__ex6__ref_toggle_8c_source.html new file mode 100644 index 0000000..245ad8d --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex6__ref_toggle_8c_source.html @@ -0,0 +1,272 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex6_refToggle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc10_a_ex6_refToggle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
71 //******************************************************************************
+
72 
+
73 //Software delay function definition
+
74 void delay (void);
+
75 
+
76 void main (void)
+
77 {
+
78  uint8_t vRefStatus;
+
79 
+
80  //Stop Watchdog Timer
+
81  WDT_A_hold(WDT_A_BASE);
+
82 
+
83  //Initialize the ADC10_A Module
+
84  /*
+
85  * Base Address for the ADC10_A Module
+
86  * Use internal ADC10_A bit as sample/hold signal to start conversion
+
87  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
88  * Use default clock divider of 1
+
89  */
+
90  ADC10_A_init(ADC10_A_BASE,
+
91  ADC10_A_SAMPLEHOLDSOURCE_SC,
+
92  ADC10_A_CLOCKSOURCE_ADC10OSC,
+
93  ADC10_A_CLOCKDIVIDER_1);
+
94 
+
95  ADC10_A_enable(ADC10_A_BASE);
+
96 
+
97  /*
+
98  * Base Address for the ADC10_A Module
+
99  * Sample/hold for 16 clock cycles
+
100  * Do not enable Multiple Sampling
+
101  */
+
102  ADC10_A_setupSamplingTimer(ADC10_A_BASE,
+
103  ADC10_A_CYCLEHOLD_16_CYCLES,
+
104  ADC10_A_MULTIPLESAMPLESDISABLE);
+
105 
+
106  //Configure Memory Buffer
+
107  /*
+
108  * Base Address for the ADC10_A Module
+
109  * Use input A1
+
110  * Use positive reference of Internally generated Vref
+
111  * Use negative reference of AVss
+
112  */
+
113  ADC10_A_configureMemory(ADC10_A_BASE,
+
114  ADC10_A_INPUT_A1,
+
115  ADC10_A_VREFPOS_INT,
+
116  ADC10_A_VREFNEG_AVSS);
+
117 
+
118  //Configure internal reference
+
119  //If ref generator busy, WAIT
+
120  while ( REF_BUSY == Ref_isRefGenBusy(REF_BASE) ) ;
+
121  //Select internal ref = 1.5V
+
122  Ref_setReferenceVoltage(REF_BASE,
+
123  REF_VREF1_5V);
+
124  //Internal Reference ON
+
125  Ref_enableReferenceVoltage(REF_BASE);
+
126  //vRefStatus == 1 for Vref == 1.5V
+
127  vRefStatus = 1;
+
128 
+
129  //Delay (~75us) for Ref to settle
+
130  __delay_cycles(75);
+
131 
+
132  //Set P1.0 to output direction
+
133  GPIO_setAsOutputPin(GPIO_PORT_P1,
+
134  GPIO_PIN0
+
135  );
+
136 
+
137  //Clear P1.0 LED off
+
138  GPIO_setOutputLowOnPin(GPIO_PORT_P1,
+
139  GPIO_PIN0
+
140  );
+
141 
+
142  while (1)
+
143  {
+
144  //Enable and Start the conversion
+
145  //in Single-Channel, Single-Conversion Mode
+
146  ADC10_A_startConversion(ADC10_A_BASE,
+
147  ADC10_A_SINGLECHANNEL);
+
148 
+
149  //Toggle internal reference voltage
+
150  //If ref generator busy, WAIT
+
151  while ( REF_BUSY == Ref_isRefGenBusy(REF_BASE) ) ;
+
152 
+
153  //Toggle Internal Ref between 1.5V/2.5V
+
154  if (vRefStatus){ //Vref == 1.5V
+
155  //Select internal ref = 2.5V
+
156  Ref_setReferenceVoltage(REF_BASE,
+
157  REF_VREF2_5V);
+
158  //vRefStatus == 0 for Vref == 2.5V
+
159  vRefStatus = 0;
+
160  } else { //Vref == 2.5V
+
161  //Select internal ref = 1.5V
+
162  Ref_setReferenceVoltage(REF_BASE,
+
163  REF_VREF1_5V);
+
164  //vRefStatus == 1 for Vref == 1.5V
+
165  vRefStatus = 1;
+
166  }
+
167 
+
168  //Conversion complete?
+
169  while (!(ADC10_A_getInterruptStatus(ADC10_A_BASE,
+
170  ADC10IFG0))) ;
+
171 
+
172  //Is ADC10MEM0 = A1 > 500
+
173  if (ADC10_A_getResults(ADC10_A_BASE) > 500){
+
174  //Set P1.0 LED on
+
175  GPIO_setOutputHighOnPin(GPIO_PORT_P1,
+
176  GPIO_PIN0
+
177  );
+
178  } else {
+
179  //Clear P1.0; LED off; Vref=2.5V used
+
180  GPIO_setOutputLowOnPin(GPIO_PORT_P1,
+
181  GPIO_PIN0
+
182  );
+
183  }
+
184 
+
185  //Delay between conversions
+
186  delay();
+
187  }
+
188 }
+
189 
+
190 void delay (void)
+
191 {
+
192  volatile uint32_t i;
+
193 
+
194  for (i = 0x7FFF; i > 0; i--){}
+
195 }
+
196 
+
void delay(void)
+
void main(void)
+ + +
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a__ex7__repeat_single_d_m_a_8c.html b/Generated Documentation/html/adc10__a__ex7__repeat_single_d_m_a_8c.html new file mode 100644 index 0000000..069a1a4 --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex7__repeat_single_d_m_a_8c.html @@ -0,0 +1,180 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex7_repeatSingleDMA.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc10_a_ex7_repeatSingleDMA.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void DMA0_ISR (void)
 
+

Function Documentation

+ +

◆ DMA0_ISR()

+ +
+
+ + + + + + + + +
void DMA0_ISR (void )
+
+ +

Definition at line 188 of file adc10_a_ex7_repeatSingleDMA.c.

+ +

References __bic_SR_register_on_exit().

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

ADC10_A - Sample A1 Input, DMA 64 Samples, Repeat Single

+

MSP430F550x Demo Sample A1 64 times with AVcc ref. Software writes to ADC10SC to trigger sample burst. In Mainloop MSP430 waits in LPM0 to save power until ADC10_A conversion burst complete, DMA_IFG will force exit from LPM0 in Mainloop on reti. ADC10_A internal oscillator times sample period (16x) and conversion (13x). DMA transfers conversion result in ADC10MEM0 to array ADC_Result. P1.0 set at start of conversion burst, reset on completion.

          MSP430F550x
+       -----------------
+   /|\|              XIN|-
+    | |                 |
+    --|RST          XOUT|-
+      |          P6.1/A1|<- Sample Signal
+      |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC10_A peripheral
  • +
  • DMA peripheral
  • +
  • GPIO Port peripheral
  • +
  • A1
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • DMA_VECTOR
  • +
+ +

Definition at line 69 of file adc10_a_ex7_repeatSingleDMA.c.

+ +

References __delay_cycles(), __no_operation(), i, and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a__ex7__repeat_single_d_m_a_8c.js b/Generated Documentation/html/adc10__a__ex7__repeat_single_d_m_a_8c.js new file mode 100644 index 0000000..8158d40 --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex7__repeat_single_d_m_a_8c.js @@ -0,0 +1,5 @@ +var adc10__a__ex7__repeat_single_d_m_a_8c = +[ + [ "DMA0_ISR", "adc10__a__ex7__repeat_single_d_m_a_8c.html#aba3f61eeab54432fa0a3595da39cc6f8", null ], + [ "main", "adc10__a__ex7__repeat_single_d_m_a_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc10__a__ex7__repeat_single_d_m_a_8c_source.html b/Generated Documentation/html/adc10__a__ex7__repeat_single_d_m_a_8c_source.html new file mode 100644 index 0000000..c27cb91 --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex7__repeat_single_d_m_a_8c_source.html @@ -0,0 +1,284 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex7_repeatSingleDMA.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc10_a_ex7_repeatSingleDMA.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
67 //******************************************************************************
+
68 
+
69 void main (void)
+
70 {
+
71  uint16_t ADC_Result[64];
+
72  volatile uint16_t ADC_Result_Average;
+
73  uint8_t i;
+
74  uint16_t ADC_Result_sum;
+
75 
+
76  //Stop Watchdog Timer
+
77  WDT_A_hold(WDT_A_BASE);
+
78 
+
79  //Initialize the ADC10_A Module
+
80  /*
+
81  * Base Address for the ADC10_A Module
+
82  * Use internal ADC10_A bit as sample/hold signal to start conversion
+
83  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
84  * Use default clock divider of 1
+
85  */
+
86  ADC10_A_init(ADC10_A_BASE,
+
87  ADC10_A_SAMPLEHOLDSOURCE_SC,
+
88  ADC10_A_CLOCKSOURCE_ADC10OSC,
+
89  ADC10_A_CLOCKDIVIDER_1);
+
90 
+
91  ADC10_A_enable(ADC10_A_BASE);
+
92 
+
93  /*
+
94  * Base Address for the ADC10_A Module
+
95  * Sample/hold for 16 clock cycles
+
96  * Enable Multiple Sampling
+
97  */
+
98  ADC10_A_setupSamplingTimer(ADC10_A_BASE,
+
99  ADC10_A_CYCLEHOLD_16_CYCLES,
+
100  ADC10_A_MULTIPLESAMPLESENABLE);
+
101 
+
102  //Configure Memory Buffer
+
103  /*
+
104  * Base Address for the ADC10_A Module
+
105  * Use input A1
+
106  * Use positive reference of AVcc
+
107  * Use negative reference of AVss
+
108  */
+
109  ADC10_A_configureMemory(ADC10_A_BASE,
+
110  ADC10_A_INPUT_A1,
+
111  ADC10_A_VREFPOS_AVCC,
+
112  ADC10_A_VREFNEG_AVSS);
+
113 
+
114  //Initialize and Setup DMA Channel 0
+
115  /*
+
116  * Configure DMA channel 0
+
117  * Configure channel for repeated single transfer
+
118  * DMA interrupt flag will be set after every 64 transfers
+
119  * Use DMA Trigger Source 24 (ADC10IFG)
+
120  * Transfer Word-to-Word
+
121  * Trigger upon Rising Edge of Trigger Source Signal
+
122  */
+
123  DMA_initParam param = {0};
+
124  param.channelSelect = DMA_CHANNEL_0;
+
125  param.transferModeSelect = DMA_TRANSFER_REPEATED_SINGLE;
+
126  param.transferSize = 64;
+
127  param.triggerSourceSelect = DMA_TRIGGERSOURCE_24;
+
128  param.transferUnitSelect = DMA_SIZE_SRCWORD_DSTWORD;
+
129  param.triggerTypeSelect = DMA_TRIGGER_RISINGEDGE;
+
130  DMA_init(&param);
+
131  /*
+
132  * Configure DMA channel 0
+
133  * Use ADC10_A Memory Buffer as source
+
134  * Increment destination address after every transfer
+
135  */
+
136  DMA_setSrcAddress(DMA_CHANNEL_0,
+
137  ADC10_A_getMemoryAddressForDMA(ADC10_A_BASE),
+
138  DMA_DIRECTION_UNCHANGED);
+
139  /*
+
140  * Base Address for the DMA Module
+
141  * Configure DMA channel 0
+
142  * Use ADC_Result[0] as destination
+
143  * Increment destination address after every transfer
+
144  */
+
145  DMA_setDstAddress(DMA_CHANNEL_0,
+
146  (uint32_t)(uintptr_t)&ADC_Result[0],
+
147  DMA_DIRECTION_INCREMENT);
+
148 
+
149  //Enable DMA channel 0 interrupt
+
150  DMA_clearInterrupt(DMA_CHANNEL_0);
+
151  DMA_enableInterrupt(DMA_CHANNEL_0);
+
152 
+
153  //Enable transfers on DMA channel 0
+
154  DMA_enableTransfers(DMA_CHANNEL_0);
+
155 
+
156  while (1)
+
157  {
+
158  //Enable and Start the conversion
+
159  //in Repeated Single-Channel Conversion Mode
+
160  ADC10_A_startConversion(ADC10_A_BASE,
+
161  ADC10_A_REPEATED_SINGLECHANNEL);
+
162 
+
163  __bis_SR_register(CPUOFF + GIE); //LPM0, ADC10_A_ISR will force exit
+
164  __no_operation(); //For debug only
+
165 
+
166  //Clear accumulate register
+
167  ADC_Result_sum = 0x0;
+
168  for (i = 0; i < 64; i++){
+
169  ADC_Result_sum += ADC_Result[i];
+
170  }
+
171 
+
172  //Average of 64 conversions results
+
173  ADC_Result_Average = ADC_Result_sum >> 6;
+
174 
+
175  //SET BREAKPOINT HERE to be able to watch ADC_Result_Average
+
176  //Delay before next 64 conversions
+
177  __delay_cycles(50000);
+
178  }
+
179 }
+
180 
+
181 
+
182 // DMA interrupt service routine
+
183 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
184 __interrupt
+
185 #elif defined(__GNUC__)
+
186 __attribute__((interrupt(DMA_VECTOR)))
+
187 #endif
+
188 void DMA0_ISR (void) {
+
189  switch (__even_in_range(DMAIV,16)){
+
190  case 0: break; //No interrupt
+
191  case 2: //DMA0IFG
+
192  //64 conversions complete
+
193  //Disable Conversions without pre-empting any conversions taking place.
+
194  ADC10_A_disableConversions(ADC10_A_BASE,
+
195  ADC10_A_PREEMPTCONVERSION);
+
196  //Exit LPM
+ +
198  break;
+
199  case 4: break; //DMA1IFG
+
200  case 6: break; //DMA2IFG
+
201  default: break;
+
202  }
+
203 }
+
MPU_initThreeSegmentsParam param
+
void main(void)
+
void DMA0_ISR(void)
+ + +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a__ex8__sequence_d_m_a_8c.html b/Generated Documentation/html/adc10__a__ex8__sequence_d_m_a_8c.html new file mode 100644 index 0000000..bc95f88 --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex8__sequence_d_m_a_8c.html @@ -0,0 +1,179 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex8_sequenceDMA.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc10_a_ex8_sequenceDMA.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void DMA0_ISR (void)
 
+

Function Documentation

+ +

◆ DMA0_ISR()

+ +
+
+ + + + + + + + +
void DMA0_ISR (void )
+
+ +

Definition at line 189 of file adc10_a_ex8_sequenceDMA.c.

+ +

References __bic_SR_register_on_exit().

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

ADC10_A - Sample A2-0 Inputs directly to DMA, 8-Bit Res, Single Seq.

+

MSP430F550x Demo Sample A2/A1/A0 as single sequence with reference to AVcc. Software sets ADC10SC to trigger sample sequence. In Mainloop MSP430 waits in LPM0 to save power until ADC10_A conversion complete, DMA_ISR will force exit from any LPMx. ADC10_A internal oscillator times sample period (16x) and conversion (13x). DMA transfers conv results ADC_Result variable. Notice that the conversions go in the order of A2, A1, then A0.

+

+MSP430F550x

+

/|| XIN|- | | | –|RST XOUT|- | P6.2/A2|<- Sample Signal 1 | P6.1/A1|<- Sample Signal 2 | P6.0/A0|<- Sample Signal 3 | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC10_A peripheral
  • +
  • DMA peripheral
  • +
  • GPIO Port peripheral
  • +
  • A2
  • +
  • A1
  • +
  • A0
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • DMA_VECTOR
  • +
+ +

Definition at line 74 of file adc10_a_ex8_sequenceDMA.c.

+ +

References __delay_cycles(), __no_operation(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a__ex8__sequence_d_m_a_8c.js b/Generated Documentation/html/adc10__a__ex8__sequence_d_m_a_8c.js new file mode 100644 index 0000000..a9ad4f0 --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex8__sequence_d_m_a_8c.js @@ -0,0 +1,5 @@ +var adc10__a__ex8__sequence_d_m_a_8c = +[ + [ "DMA0_ISR", "adc10__a__ex8__sequence_d_m_a_8c.html#aba3f61eeab54432fa0a3595da39cc6f8", null ], + [ "main", "adc10__a__ex8__sequence_d_m_a_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc10__a__ex8__sequence_d_m_a_8c_source.html b/Generated Documentation/html/adc10__a__ex8__sequence_d_m_a_8c_source.html new file mode 100644 index 0000000..a492713 --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex8__sequence_d_m_a_8c_source.html @@ -0,0 +1,279 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex8_sequenceDMA.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc10_a_ex8_sequenceDMA.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
45 //1
+
71 //******************************************************************************
+
72 
+
73 
+
74 void main (void)
+
75 {
+
76 
+
77  //8-bit ADC conversion result array
+
78  uint8_t ADC_Result[3];
+
79 
+
80  //Stop Watchdog Timer
+
81  WDT_A_hold(WDT_A_BASE);
+
82 
+
83  //Initialize the ADC10_A Module
+
84  /*
+
85  * Base Address for the ADC10_A Module
+
86  * Use internal ADC10_A bit as sample/hold signal to start conversion
+
87  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
88  * Use default clock divider of 1
+
89  */
+
90  ADC10_A_init(ADC10_A_BASE,
+
91  ADC10_A_SAMPLEHOLDSOURCE_SC,
+
92  ADC10_A_CLOCKSOURCE_ADC10OSC,
+
93  ADC10_A_CLOCKDIVIDER_1);
+
94 
+
95  ADC10_A_enable(ADC10_A_BASE);
+
96 
+
97  /*
+
98  * Base Address for the ADC10_A Module
+
99  * Sample/hold for 16 clock cycles
+
100  * Enable Multiple Sampling
+
101  */
+
102  ADC10_A_setupSamplingTimer(ADC10_A_BASE,
+
103  ADC10_A_CYCLEHOLD_16_CYCLES,
+
104  ADC10_A_MULTIPLESAMPLESENABLE);
+
105  //Change the resolution to 8-bit
+
106  ADC10_A_setResolution(ADC10_A_BASE,
+
107  ADC10_A_RESOLUTION_8BIT);
+
108 
+
109  //Configure Memory Buffer
+
110  /*
+
111  * Base Address for the ADC10_A Module
+
112  * Use input A2
+
113  * Use positive reference of AVcc
+
114  * Use negative reference of AVss
+
115  */
+
116  ADC10_A_configureMemory(ADC10_A_BASE,
+
117  ADC10_A_INPUT_A2,
+
118  ADC10_A_VREFPOS_AVCC,
+
119  ADC10_A_VREFNEG_AVSS);
+
120 
+
121 
+
122  //Initialize and Setup DMA Channel 0
+
123  /*
+
124  * Configure DMA channel 0
+
125  * Configure channel for repeated single transfer
+
126  * DMA interrupt flag will be set after every 3 transfers
+
127  * Use DMA Trigger Source 24 (ADC10IFG)
+
128  * Transfer Byte-to-byte
+
129  * Trigger upon the Rising Edge of the Trigger Source
+
130  */
+
131  DMA_initParam param = {0};
+
132  param.channelSelect = DMA_CHANNEL_0;
+
133  param.transferModeSelect = DMA_TRANSFER_REPEATED_SINGLE;
+
134  param.transferSize = 3;
+
135  param.triggerSourceSelect = DMA_TRIGGERSOURCE_24;
+
136  param.transferUnitSelect = DMA_SIZE_SRCBYTE_DSTBYTE;
+
137  param.triggerTypeSelect = DMA_TRIGGER_RISINGEDGE;
+
138  DMA_init(&param);
+
139  /*
+
140  * Configure DMA channel 0
+
141  * Use ADC10_A Memory Buffer as source
+
142  * Increment destination address after every transfer
+
143  */
+
144  DMA_setSrcAddress(DMA_CHANNEL_0,
+
145  ADC10_A_getMemoryAddressForDMA(ADC10_A_BASE),
+
146  DMA_DIRECTION_UNCHANGED);
+
147  /*
+
148  * Base Address of the DMA Module
+
149  * Configure DMA channel 0
+
150  * Use ADC_Result[0] as destination
+
151  * Increment destination address after every transfer
+
152  */
+
153  DMA_setDstAddress(DMA_CHANNEL_0,
+
154  (uint32_t)(uintptr_t)&ADC_Result[0],
+
155  DMA_DIRECTION_INCREMENT);
+
156 
+
157  //Enable DMA channel 0 interrupt
+
158  DMA_clearInterrupt(DMA_CHANNEL_0);
+
159  DMA_enableInterrupt(DMA_CHANNEL_0);
+
160 
+
161  //Enable transfers on DMA channel 0
+
162  DMA_enableTransfers(DMA_CHANNEL_0);
+
163 
+
164  while (1)
+
165  {
+
166  //Wait if ADC10_A core is active
+
167  while (ADC10_A_isBusy(ADC10_A_BASE)) ;
+
168 
+
169  //Enable and Start the conversion
+
170  //in Sequence of Channels Conversion Mode
+
171  ADC10_A_startConversion(ADC10_A_BASE,
+
172  ADC10_A_SEQOFCHANNELS);
+
173 
+
174  //LPM0, ADC10_A_ISR will force exit
+
175  __bis_SR_register(CPUOFF + GIE);
+
176  //Delay between sequence convs
+
177  __delay_cycles(5000);
+
178  //BREAKPOINT; check ADC_Result
+
179  __no_operation();
+
180  }
+
181 }
+
182 
+
183 // DMA interrupt service routine
+
184 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
185 __interrupt
+
186 #elif defined(__GNUC__)
+
187 __attribute__((interrupt(DMA_VECTOR)))
+
188 #endif
+
189 void DMA0_ISR (void) {
+
190  switch (__even_in_range(DMAIV,16)){
+
191  case 0: break; //No interrupt
+
192  case 2: //DMA0IFG
+
193  //Sequence of Channels Conversion Complete
+
194  //exit LPM
+ +
196  break;
+
197  case 4: break; //DMA1IFG
+
198  case 6: break; //DMA2IFG
+
199  default: break;
+
200  }
+
201 }
+
202 
+
MPU_initThreeSegmentsParam param
+
void main(void)
+
void DMA0_ISR(void)
+ +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a__ex9__repeat_seq_8c.html b/Generated Documentation/html/adc10__a__ex9__repeat_seq_8c.html new file mode 100644 index 0000000..ed275dd --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex9__repeat_seq_8c.html @@ -0,0 +1,182 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex9_repeatSeq.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc10_a_ex9_repeatSeq.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void DMA0_ISR (void)
 
+

Function Documentation

+ +

◆ DMA0_ISR()

+ +
+
+ + + + + + + + +
void DMA0_ISR (void )
+
+ +

Definition at line 190 of file adc10_a_ex9_repeatSeq.c.

+ +

References __bic_SR_register_on_exit().

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

ADC10_A - Sample A1-0 Inputs directly to DMA, AVcc Ref, Repeat Seq.

+

MSP430F550x Demo Use DMA to sample A1/A0 repeat sequence 32x(64 total samples) with reference to AVcc. Software sets ADC10SC to trigger sample burst. In Mainloop MSP430 waits in LPM0 to save power until ADC10_A conversion complete, DMA_ISR will force exit from LPM0 in Mainloop. ADC10_A internal oscillator times sample period (16x) and conversion (13x). DMA transfers conversion code to ADC_Result.

         MSP430F550x
+      -----------------
+  /|\|              XIN|-
+   | |                 |
+   --|RST          XOUT|-
+     |          P6.1/A1|<- Sample Signal 1
+     |          P6.0/A0|<- Sample Signal 2
+     |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC10_A peripheral
  • +
  • DMA peripheral
  • +
  • GPIO Port peripheral
  • +
  • A1
  • +
  • A0
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • DMA_VECTOR
  • +
+ +

Definition at line 72 of file adc10_a_ex9_repeatSeq.c.

+ +

References __delay_cycles(), __no_operation(), i, and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__a__ex9__repeat_seq_8c.js b/Generated Documentation/html/adc10__a__ex9__repeat_seq_8c.js new file mode 100644 index 0000000..0a20c81 --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex9__repeat_seq_8c.js @@ -0,0 +1,5 @@ +var adc10__a__ex9__repeat_seq_8c = +[ + [ "DMA0_ISR", "adc10__a__ex9__repeat_seq_8c.html#aba3f61eeab54432fa0a3595da39cc6f8", null ], + [ "main", "adc10__a__ex9__repeat_seq_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc10__a__ex9__repeat_seq_8c_source.html b/Generated Documentation/html/adc10__a__ex9__repeat_seq_8c_source.html new file mode 100644 index 0000000..ffe38dd --- /dev/null +++ b/Generated Documentation/html/adc10__a__ex9__repeat_seq_8c_source.html @@ -0,0 +1,284 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc10_a/adc10_a_ex9_repeatSeq.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc10_a_ex9_repeatSeq.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
69 //******************************************************************************
+
70 
+
71 
+
72 void main (void)
+
73 {
+
74  volatile uint16_t i;
+
75  //ADC conversion result array
+
76  uint16_t ADC_Result[64];
+
77 
+
78  //Stop Watchdog Timer
+
79  WDT_A_hold(WDT_A_BASE);
+
80 
+
81  //Initializae the ADC10_A Module
+
82  /*
+
83  * Base Address for the ADC10_A Module
+
84  * Use internal ADC10_A bit as sample/hold signal to start conversion
+
85  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
86  * Use default clock divider of 1
+
87  */
+
88  ADC10_A_init(ADC10_A_BASE,
+
89  ADC10_A_SAMPLEHOLDSOURCE_SC,
+
90  ADC10_A_CLOCKSOURCE_ADC10OSC,
+
91  ADC10_A_CLOCKDIVIDER_1);
+
92 
+
93  ADC10_A_enable(ADC10_A_BASE);
+
94 
+
95  /*
+
96  * Base Address for the ADC10_A Module
+
97  * Sample/hold for 16 clock cycles
+
98  * Enable Multiple Sampling
+
99  */
+
100  ADC10_A_setupSamplingTimer(ADC10_A_BASE,
+
101  ADC10_A_CYCLEHOLD_16_CYCLES,
+
102  ADC10_A_MULTIPLESAMPLESENABLE);
+
103 
+
104  //Configure Memory Buffer
+
105  /*
+
106  * Base Address for the ADC10_A Module
+
107  * Use input A1
+
108  * Use positive reference of AVcc
+
109  * Use negative reference of AVss
+
110  */
+
111  ADC10_A_configureMemory(ADC10_A_BASE,
+
112  ADC10_A_INPUT_A1,
+
113  ADC10_A_VREFPOS_AVCC,
+
114  ADC10_A_VREFNEG_AVSS);
+
115 
+
116 
+
117  //Initialize and Setup DMA Channel 0
+
118  /*
+
119  * Configure DMA channel 0
+
120  * Configure channel for repeated single transfer
+
121  * DMA interrupt flag will be set after every 2 transfers
+
122  * Use DMA Trigger Source 24 (ADC10IFG)
+
123  * Tranfer Word-to-Word
+
124  * Trigger upon Rising Edge of Trigger Source
+
125  */
+
126  DMA_initParam param = {0};
+
127  param.channelSelect = DMA_CHANNEL_0;
+
128  param.transferModeSelect = DMA_TRANSFER_REPEATED_SINGLE;
+
129  param.transferSize = 2;
+
130  param.triggerSourceSelect = DMA_TRIGGERSOURCE_24;
+
131  param.transferUnitSelect = DMA_SIZE_SRCWORD_DSTWORD;
+
132  param.triggerTypeSelect = DMA_TRIGGER_RISINGEDGE;
+
133  DMA_init(&param);
+
134  /*
+
135  * Base Address of the DMA Module
+
136  * Configure DMA channel 0
+
137  * Use ADC10_A Memory Buffer as source
+
138  * Increment destination address after every transfer
+
139  */
+
140  DMA_setSrcAddress(DMA_CHANNEL_0,
+
141  ADC10_A_getMemoryAddressForDMA(ADC10_A_BASE),
+
142  DMA_DIRECTION_UNCHANGED);
+
143 
+
144  //Enable DMA channel 0 interrupt
+
145  DMA_clearInterrupt(DMA_CHANNEL_0);
+
146  DMA_enableInterrupt(DMA_CHANNEL_0);
+
147 
+
148  //Enable transfers on DMA channel 0
+
149  DMA_enableTransfers(DMA_CHANNEL_0);
+
150 
+
151  while (1)
+
152  {
+
153  for (i = 0; i < 32; i++)
+
154  {
+
155  /*
+
156  * Base Address of the DMA Module
+
157  * Configure DMA channel 0
+
158  * Use ADC_Result[i*2] as destination
+
159  * Increment destination address after every transfer
+
160  */
+
161  DMA_setDstAddress(DMA_CHANNEL_0,
+
162  (uint32_t)(uintptr_t)&ADC_Result[i * 2],
+
163  DMA_DIRECTION_INCREMENT);
+
164 
+
165  //Wait if ADC10_A core is active
+
166  while (ADC10_A_isBusy(ADC10_A_BASE)) ;
+
167 
+
168  //Enable and Start the conversion
+
169  //in Repeated Sequence of Channels Conversion Mode
+
170  ADC10_A_startConversion(ADC10_A_BASE,
+
171  ADC10_A_REPEATED_SEQOFCHANNELS);
+
172 
+
173  //LPM0, ADC10_A_ISR will force exit
+
174  __bis_SR_register(CPUOFF + GIE);
+
175  }
+
176 
+
177  //Delay between sequence convs
+
178  __delay_cycles(5000);
+
179  //BREAKPOINT; check ADC_Result
+
180  __no_operation();
+
181  }
+
182 }
+
183 
+
184 // DMA interrupt service routine
+
185 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
186 __interrupt
+
187 #elif defined(__GNUC__)
+
188 __attribute__((interrupt(DMA_VECTOR)))
+
189 #endif
+
190 void DMA0_ISR (void) {
+
191  switch (__even_in_range(DMAIV,16)){
+
192  case 0: break; //No interrupt
+
193  case 2: //DMA0IFG
+
194  //Sequence of Channels Conversion Complete
+
195  //Disable Conversion without pre-empting any conversions taking place.
+
196  ADC10_A_disableConversions(ADC10_A_BASE, ADC10_A_PREEMPTCONVERSION);
+
197  //exit LPM
+ +
199  break;
+
200  case 4: break; //DMA1IFG
+
201  case 6: break; //DMA2IFG
+
202  default: break;
+
203  }
+
204 }
+
205 
+
MPU_initThreeSegmentsParam param
+
void main(void)
+
void DMA0_ISR(void)
+ + +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__b__ex1__avcc_ref_8c.html b/Generated Documentation/html/adc10__b__ex1__avcc_ref_8c.html new file mode 100644 index 0000000..105ba02 --- /dev/null +++ b/Generated Documentation/html/adc10__b__ex1__avcc_ref_8c.html @@ -0,0 +1,178 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/adc10_b/adc10_b_ex1_avccRef.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc10_b_ex1_avccRef.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void ADC10_ISR (void)
 
+

Function Documentation

+ +

◆ ADC10_ISR()

+ +
+
+ + + + + + + + +
void ADC10_ISR (void )
+
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

ADC10B - Sample A1 Input, AVcc Ref, P1.0 and P3.5 is set if A1 > 0.5AVcc

+

MSP430FR573x Demo A single sample is made on A1 with reference to AVcc. Software sets ADC10SC to start sample and conversion - ADC10SC automatically cleared at EOC.ADC10B internal oscillator times sample (16x) and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC10B conversion complete, ADC10_ISR will force exit from LPM0 in Mainloop on reti. If A1 > 0.5*AVcc, P1.0 and and P3.5 set, else reset.

+

+MSP430FR5739

+

/|| XIN|- | | | –|RST XOUT|- | | >—|P1.1/A1 P1.0|-->LED | P3.5|-->LED

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC10 peripheral
  • +
  • GPIO Port peripheral
  • +
  • A1
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • ADC10_VECTOR

    +

    Built with IAR Embedded Workbench Version: 5.40 & Code Composer Studio V5.1

    +
  • +
+ +

Definition at line 69 of file adc10_b_ex1_avccRef.c.

+ +

References __delay_cycles(), and __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__b__ex1__avcc_ref_8c.js b/Generated Documentation/html/adc10__b__ex1__avcc_ref_8c.js new file mode 100644 index 0000000..187c487 --- /dev/null +++ b/Generated Documentation/html/adc10__b__ex1__avcc_ref_8c.js @@ -0,0 +1,5 @@ +var adc10__b__ex1__avcc_ref_8c = +[ + [ "ADC10_ISR", "adc10__b__ex1__avcc_ref_8c.html#a0855d693fe165416af491f6742e649bc", null ], + [ "main", "adc10__b__ex1__avcc_ref_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc10__b__ex1__avcc_ref_8c_source.html b/Generated Documentation/html/adc10__b__ex1__avcc_ref_8c_source.html new file mode 100644 index 0000000..a12372c --- /dev/null +++ b/Generated Documentation/html/adc10__b__ex1__avcc_ref_8c_source.html @@ -0,0 +1,319 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/adc10_b/adc10_b_ex1_avccRef.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc10_b_ex1_avccRef.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
66 //******************************************************************************
+
67 
+
68 
+
69 void main (void)
+
70 {
+
71  //Stop WDT
+
72  WDT_A_hold(WDT_A_BASE);
+
73 
+
74  //Set P1.1 as an input pin.
+
75  /*
+
76  * Select Port 1
+
77  * Set Pin 1 as input
+
78  * Set Ternary module function
+
79  */
+
80  GPIO_setAsPeripheralModuleFunctionInputPin(
+
81  GPIO_PORT_P1,
+
82  GPIO_PIN1,
+
83  GPIO_TERNARY_MODULE_FUNCTION);
+
84 
+
85  //Set P1.0 as an output pin.
+
86  /*
+
87 
+
88  * Select Port 1
+
89  * Set Pin 0 as output
+
90  */
+
91  GPIO_setAsOutputPin(
+
92  GPIO_PORT_P1,
+
93  GPIO_PIN0);
+
94 
+
95  //Set P3.5 as an output pin.
+
96  /*
+
97 
+
98  * Select Port 3
+
99  * Set Pin 5 as output
+
100  */
+
101  GPIO_setAsOutputPin(
+
102  GPIO_PORT_P3,
+
103  GPIO_PIN5);
+
104 
+
105  //Initialize the ADC10B Module
+
106  /*
+
107  * Base Address for the ADC10B Module
+
108  * Use internal ADC10B bit as sample/hold signal to start conversion
+
109  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
110  * Use default clock divider of 1
+
111  */
+
112  ADC10_B_init(ADC10_B_BASE,
+
113  ADC10_B_SAMPLEHOLDSOURCE_SC,
+
114  ADC10_B_CLOCKSOURCE_ADC10OSC,
+
115  ADC10_B_CLOCKDIVIDER_1);
+
116 
+
117  ADC10_B_enable(ADC10_B_BASE);
+
118 
+
119  /*
+
120  * Base Address for the ADC10B Module
+
121  * Sample/hold for 16 clock cycles
+
122  * Do not enable Multiple Sampling
+
123  */
+
124  ADC10_B_setupSamplingTimer(ADC10_B_BASE,
+
125  ADC10_B_CYCLEHOLD_16_CYCLES,
+
126  ADC10_B_MULTIPLESAMPLESDISABLE);
+
127 
+
128  //Configure the Memory Buffer
+
129  /*
+
130  * Base Address for the ADC10B Module
+
131  * Use input A1
+
132  * Use positive reference of AVcc
+
133  * Use negative reference of AVss
+
134  */
+
135  ADC10_B_configureMemory(ADC10_B_BASE,
+
136  ADC10_B_INPUT_A1,
+
137  ADC10_B_VREFPOS_AVCC,
+
138  ADC10_B_VREFNEG_AVSS);
+
139 
+
140  ADC10_B_clearInterrupt(ADC10_B_BASE,
+
141  ADC10IE0);
+
142 
+
143  //Enable the Memory Buffer Interrupt
+
144  ADC10_B_enableInterrupt(ADC10_B_BASE,
+
145  ADC10IE0);
+
146 
+
147  for (;;)
+
148  {
+
149  __delay_cycles(5000);
+
150 
+
151  //Enable and Start the conversion
+
152  //in Single-Channel, Single Conversion Mode
+
153  ADC10_B_startConversion(ADC10_B_BASE,
+
154  ADC10_B_SINGLECHANNEL);
+
155 
+
156  //LPM0, ADC10_ISR will force exit
+
157  __bis_SR_register(CPUOFF + GIE);
+
158  __no_operation();
+
159 
+
160 
+
161  }
+
162 }
+
163 
+
164 //ADC10B interrupt service routine
+
165 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
166 #pragma vector=ADC10_VECTOR
+
167 __interrupt
+
168 #elif defined(__GNUC__)
+
169 __attribute__((interrupt(ADC10_VECTOR)))
+
170 #endif
+
171 void ADC10_ISR (void)
+
172 {
+
173  switch (__even_in_range(ADC10IV,12)){
+
174  case 0: break; //No interrupt
+
175  case 2: break; //conversion result overflow
+
176  case 4: break; //conversion time overflow
+
177  case 6: break; //ADC10HI
+
178  case 8: break; //ADC10LO
+
179  case 10: break; //ADC10IN
+
180  case 12: //ADC10IFG0
+
181  //(Automatically clears ADC10IFG0 by reading memory buffer)
+
182  if (ADC10_B_getResults(ADC10_B_BASE) < 0x1FF){
+
183 
+
184  //Clear P1.0 LED off
+
185  /*
+
186 
+
187  * Select Port 1
+
188  * Set Pin 0 to output Low.
+
189  */
+ +
191  GPIO_PORT_P1,
+
192  GPIO_PIN0
+
193  );
+
194 
+
195  //Clear P3.5 LED off
+
196  /*
+
197 
+
198  * Select Port 3
+
199  * Set Pin 5 to output Low.
+
200  */
+ +
202  GPIO_PORT_P3,
+
203  GPIO_PIN5
+
204  );
+
205 
+
206  } else {
+
207  //Set P1.0 LED on
+
208  /*
+
209 
+
210  * Select Port 1
+
211  * Set Pin 0 to output high.
+
212  */
+ +
214  GPIO_PORT_P1,
+
215  GPIO_PIN0
+
216  );
+
217 
+
218  //Set P3.5 LED on
+
219  /*
+
220 
+
221  * Select Port 3
+
222  * Set Pin 5 to output high.
+
223  */
+ +
225  GPIO_PORT_P3,
+
226  GPIO_PIN5
+
227  );
+
228 
+
229  }
+
230 
+
231  //Clear CPUOFF bit from 0(SR)
+ +
233  break;
+
234  default: break;
+
235  }
+
236 }
+
237 
+
void ADC10_ISR(void)
+
void main(void)
+ +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__b__ex2__int_ref_8c.html b/Generated Documentation/html/adc10__b__ex2__int_ref_8c.html new file mode 100644 index 0000000..469b382 --- /dev/null +++ b/Generated Documentation/html/adc10__b__ex2__int_ref_8c.html @@ -0,0 +1,229 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/adc10_b/adc10_b_ex2_intRef.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc10_b_ex2_intRef.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define TIMER_PERIOD   80
 
+ + + + + + + +

+Functions

void main (void)
 
void ADC10_ISR (void)
 
void TA0_ISR (void)
 
+

Macro Definition Documentation

+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   80
+
+

ADC10B - Sample A1 input, 1.5V Shared Ref, LED ON if A1 > 0.5V

+

MSP430FR573x Demo A single sample is made on A1 with reference to internal 1.5V Vref.Software sets ADC10SC to start sample and conversion - ADC10SC automatically cleared at EOC. ADC10B internal oscillator times sample (16x) and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC10B conversion complete, ADC10_ISR will force exit from LPM0 in Mainloop on reti. If A1 > 0.5V, P1.0 set, else reset.

          MSP430FR5739
+       -----------------
+   /|\|              XIN|-
+    | |                 |
+    --|RST          XOUT|-
+      |          P1.1/A1|<- Sample Signal
+      |             P1.0|-> LED
+      |             P3.5|-->LED
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC10 peripheral
  • +
  • REF peripheral
  • +
  • Timer_A peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • ADC10_VECTOR
  • +
  • TIMER0_A0_VECTOR

    +

    Built with IAR Embedded Workbench Version: 5.40 & Code Composer Studio V5.1

    +
  • +
+ +

Definition at line 72 of file adc10_b_ex2_intRef.c.

+ +
+
+

Function Documentation

+ +

◆ ADC10_ISR()

+ +
+
+ + + + + + + + +
void ADC10_ISR (void )
+
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 74 of file adc10_b_ex2_intRef.c.

+ +

References __delay_cycles(), __no_operation(), and TIMER_PERIOD.

+ +
+
+ +

◆ TA0_ISR()

+ +
+
+ + + + + + + + +
void TA0_ISR (void )
+
+ +

Definition at line 276 of file adc10_b_ex2_intRef.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc10__b__ex2__int_ref_8c.js b/Generated Documentation/html/adc10__b__ex2__int_ref_8c.js new file mode 100644 index 0000000..bfb5fc7 --- /dev/null +++ b/Generated Documentation/html/adc10__b__ex2__int_ref_8c.js @@ -0,0 +1,7 @@ +var adc10__b__ex2__int_ref_8c = +[ + [ "TIMER_PERIOD", "adc10__b__ex2__int_ref_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "ADC10_ISR", "adc10__b__ex2__int_ref_8c.html#a0855d693fe165416af491f6742e649bc", null ], + [ "main", "adc10__b__ex2__int_ref_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TA0_ISR", "adc10__b__ex2__int_ref_8c.html#a7ac362134b9424264b6e1b6d401e9da7", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc10__b__ex2__int_ref_8c_source.html b/Generated Documentation/html/adc10__b__ex2__int_ref_8c_source.html new file mode 100644 index 0000000..b6b20b9 --- /dev/null +++ b/Generated Documentation/html/adc10__b__ex2__int_ref_8c_source.html @@ -0,0 +1,361 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/adc10_b/adc10_b_ex2_intRef.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc10_b_ex2_intRef.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
70 //******************************************************************************
+
71 
+
72 #define TIMER_PERIOD 80
+
73 
+
74 void main (void)
+
75 {
+
76  //Stop Watchdog Timer
+
77  WDT_A_hold(WDT_A_BASE);
+
78 
+
79  //Set P1.1 as an input pin.
+
80  /*
+
81  * Select Port 1
+
82  * Set Pin 1 as input
+
83  * Set Ternary module function
+
84  */
+
85  GPIO_setAsPeripheralModuleFunctionInputPin(
+
86  GPIO_PORT_P1,
+
87  GPIO_PIN1,
+
88  GPIO_TERNARY_MODULE_FUNCTION);
+
89 
+
90  //Set P1.0 as an output pin.
+
91  /*
+
92  * Select Port 1
+
93  * Set Pin 0 as output
+
94  */
+
95  GPIO_setAsOutputPin(
+
96  GPIO_PORT_P1,
+
97  GPIO_PIN0);
+
98 
+
99 
+
100  //Set P3.5 as an output pin.
+
101  /*
+
102 
+
103  * Select Port 3
+
104  * Set Pin 5 as output
+
105  */
+
106  GPIO_setAsOutputPin(
+
107  GPIO_PORT_P3,
+
108  GPIO_PIN5);
+
109 
+
110  //Initialize the ADC10 Module
+
111  /*
+
112  * Base Address for the ADC10 Module
+
113  * Use internal ADC10 bit as sample/hold signal to start conversion
+
114  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
115  * Use default clock divider of 1
+
116  */
+
117  ADC10_B_init(ADC10_B_BASE,
+
118  ADC10_B_SAMPLEHOLDSOURCE_SC,
+
119  ADC10_B_CLOCKSOURCE_ADC10OSC,
+
120  ADC10_B_CLOCKDIVIDER_1);
+
121 
+
122  ADC10_B_enable(ADC10_B_BASE);
+
123 
+
124  /*
+
125  * Base Address for the ADC10 Module
+
126  * Sample/hold for 16 clock cycles
+
127  * Do not enable Multiple Sampling
+
128  */
+
129  ADC10_B_setupSamplingTimer(ADC10_B_BASE,
+
130  ADC10_B_CYCLEHOLD_16_CYCLES,
+
131  ADC10_B_MULTIPLESAMPLESDISABLE);
+
132 
+
133  //Configure Memory Buffer
+
134  /*
+
135  * Base Address for the ADC10 Module
+
136  * Use input A1
+
137  * Use positive reference of Internally generated Vref
+
138  * Use negative reference of AVss
+
139  */
+
140  ADC10_B_configureMemory(ADC10_B_BASE,
+
141  ADC10_B_INPUT_A1,
+
142  ADC10_B_VREFPOS_INT,
+
143  ADC10_B_VREFNEG_AVSS);
+
144 
+
145  ADC10_B_clearInterrupt(ADC10_B_BASE,
+
146  ADC10IE0);
+
147  //Enable Memory Buffer interrupt
+
148  ADC10_B_enableInterrupt(ADC10_B_BASE,
+
149  ADC10IE0);
+
150 
+
151  //Configure internal reference
+
152  //If ref generator busy, WAIT
+
153  while ( REF_BUSY == Ref_isRefGenBusy(REF_BASE) ) ;
+
154 
+
155  //Select internal ref = 1.5V
+
156  Ref_setReferenceVoltage(REF_BASE,
+
157  REF_VREF1_5V);
+
158  //Internal Reference ON
+
159  Ref_enableReferenceVoltage(REF_BASE);
+
160 
+
161  // Configure TA0 to provide delay for reference settling ~75us
+
162  Timer_A_initUpModeParam initUpParam = {0};
+
163  initUpParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
164  initUpParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
165  initUpParam.timerPeriod = TIMER_PERIOD;
+
166  initUpParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
167  initUpParam.captureCompareInterruptEnable_CCR0_CCIE =
+
168  TIMER_A_CAPTURECOMPARE_INTERRUPT_ENABLE;
+
169  initUpParam.timerClear = TIMER_A_DO_CLEAR;
+
170  initUpParam.startTimer = true;
+
171  Timer_A_initUpMode(TIMER_A1_BASE, &initUpParam);
+
172 
+
173  __bis_SR_register(CPUOFF + GIE); // LPM0, TA0_ISR will force exit
+
174 
+
175 
+
176 
+
177  for (;;)
+
178  {
+
179  //Delay between conversions
+
180  __delay_cycles(5000);
+
181 
+
182  //Enable and Start the conversion
+
183  //in Single-Channel, Single Conversion Mode
+
184  ADC10_B_startConversion(ADC10_B_BASE,
+
185  ADC10_B_SINGLECHANNEL);
+
186 
+
187  //LPM0, ADC10_ISR will force exit
+
188  __bis_SR_register(CPUOFF + GIE);
+
189  //For debug only
+
190  __no_operation();
+
191 
+
192 
+
193  }
+
194 }
+
195 
+
196 //ADC10 interrupt service routine
+
197 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
198 #pragma vector=ADC10_VECTOR
+
199 __interrupt
+
200 #elif defined(__GNUC__)
+
201 __attribute__((interrupt(ADC10_VECTOR)))
+
202 #endif
+
203 void ADC10_ISR (void)
+
204 {
+
205  switch (__even_in_range(ADC10IV,12)){
+
206  case 0: break; //No interrupt
+
207  case 2: break; //conversion result overflow
+
208  case 4: break; //conversion time overflow
+
209  case 6: break; //ADC10HI
+
210  case 8: break; //ADC10LO
+
211  case 10: break; //ADC10IN
+
212  case 12: //ADC10IFG0
+
213 
+
214  //Automatically clears ADC10IFG0 by reading memory buffer
+
215  //ADC10MEM = A0 > 0.5V?
+
216  if (ADC10_B_getResults(ADC10_B_BASE) < 0x155){
+
217  //Clear P1.0 LED off
+
218  /*
+
219  * Select Port 1
+
220  * Set Pin 0 to output Low.
+
221  */
+ +
223  GPIO_PORT_P1,
+
224  GPIO_PIN0
+
225  );
+
226 
+
227  //Clear P3.5 LED off
+
228  /*
+
229 
+
230  * Select Port 3
+
231  * Set Pin 5 to output Low.
+
232  */
+ +
234  GPIO_PORT_P3,
+
235  GPIO_PIN5
+
236  );
+
237 
+
238  } else {
+
239  //Set P1.0 LED on
+
240  /*
+
241 
+
242  * Select Port 1
+
243  * Set Pin 0 to output high.
+
244  */
+ +
246  GPIO_PORT_P1,
+
247  GPIO_PIN0
+
248  );
+
249 
+
250  //Set P3.5 LED on
+
251  /*
+
252 
+
253  * Select Port 3
+
254  * Set Pin 5 to output high.
+
255  */
+ +
257  GPIO_PORT_P3,
+
258  GPIO_PIN5
+
259  );
+
260  }
+
261 
+
262  //Clear CPUOFF bit from 0(SR)
+
263  //Breakpoint here and watch ADC_Result
+ +
265  break;
+
266  default: break;
+
267  }
+
268 }
+
269 
+
270 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
271 #pragma vector=TIMER0_A0_VECTOR
+
272 __interrupt
+
273 #elif defined(__GNUC__)
+
274 __attribute__((interrupt(TIMER0_A0_VECTOR)))
+
275 #endif
+
276 void TA0_ISR (void)
+
277 {
+
278  TA0CTL = 0;
+
279  LPM0_EXIT; // Exit LPM0 on return
+
280 }
+
281 
+
void ADC10_ISR(void)
+
void main(void)
+
void TA0_ISR(void)
+
#define TIMER_PERIOD
+ +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__a_8c.html b/Generated Documentation/html/adc12__a_8c.html index 2f5143f..b85119a 100644 --- a/Generated Documentation/html/adc12__a_8c.html +++ b/Generated Documentation/html/adc12__a_8c.html @@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('adc12__a_8c.html',''); initResizable() diff --git a/Generated Documentation/html/adc12__a_8c_source.html b/Generated Documentation/html/adc12__a_8c_source.html index 2385657..df7e588 100644 --- a/Generated Documentation/html/adc12__a_8c_source.html +++ b/Generated Documentation/html/adc12__a_8c_source.html @@ -177,7 +177,7 @@ $(document).ready(function(){initNavTree('adc12__a_8c_source.html',''); initResi
85 
86 
87 void ADC12_A_configureMemory(uint16_t baseAddress,
-
88  ADC12_A_configureMemoryParam *param)
+
88  ADC12_A_configureMemoryParam *param)
89 {
90  //Make sure the ENC bit is cleared before configuring a Memory Buffer Control
91  assert( !(HWREG16(baseAddress + OFS_ADC12CTL0) & ADC12ENC) );
@@ -186,14 +186,14 @@ $(document).ready(function(){initNavTree('adc12__a_8c_source.html',''); initResi
94  {
95  //Set the offset in respect to ADC12MCTL0
96  uint16_t memoryBufferControlOffset =
-
97  (OFS_ADC12MCTL0 + param->memoryBufferControlIndex);
+
97  (OFS_ADC12MCTL0 + param->memoryBufferControlIndex);
98 
99  //Reset the memory buffer control and Set the input source
100  HWREG8(baseAddress + memoryBufferControlOffset) =
-
101  param->inputSourceSelect //Set Input Source
-
102  + param->positiveRefVoltageSourceSelect //Set Vref+
-
103  + param->negativeRefVoltageSourceSelect //Set Vref-
-
104  + param->endOfSequence; //Set End of Sequence
+
101  param->inputSourceSelect //Set Input Source
+
102  + param->positiveRefVoltageSourceSelect //Set Vref+
+
103  + param->negativeRefVoltageSourceSelect //Set Vref-
+
104  + param->endOfSequence; //Set End of Sequence
105  }
106 }
107 void ADC12_A_enableInterrupt (uint16_t baseAddress,
@@ -329,6 +329,7 @@ $(document).ready(function(){initNavTree('adc12__a_8c_source.html',''); initResi
237 //
240 //
241 //*****************************************************************************
+
MPU_initThreeSegmentsParam param
#define HWREG8(x)
Definition: hw_memmap.h:41
@@ -340,7 +341,7 @@ $(document).ready(function(){initNavTree('adc12__a_8c_source.html',''); initResi diff --git a/Generated Documentation/html/adc12__a_8h.html b/Generated Documentation/html/adc12__a_8h.html index a05b7f1..dc45474 100644 --- a/Generated Documentation/html/adc12__a_8h.html +++ b/Generated Documentation/html/adc12__a_8h.html @@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('adc12__a_8h.html',''); initResizable() diff --git a/Generated Documentation/html/adc12__a_8h_source.html b/Generated Documentation/html/adc12__a_8h_source.html index b846005..7b571fe 100644 --- a/Generated Documentation/html/adc12__a_8h_source.html +++ b/Generated Documentation/html/adc12__a_8h_source.html @@ -444,7 +444,7 @@ $(document).ready(function(){initNavTree('adc12__a_8h_source.html',''); initResi
565 //
566 //*****************************************************************************
567 extern void ADC12_A_configureMemory(uint16_t baseAddress,
-
568  ADC12_A_configureMemoryParam *param);
+
568  ADC12_A_configureMemoryParam *param);
569 
570 //*****************************************************************************
571 //
@@ -560,6 +560,7 @@ $(document).ready(function(){initNavTree('adc12__a_8h_source.html',''); initResi
1036 
1037 #endif
1038 #endif // __MSP430WARE_ADC12_A_H__
+
MPU_initThreeSegmentsParam param
@@ -567,7 +568,7 @@ $(document).ready(function(){initNavTree('adc12__a_8h_source.html',''); initResi diff --git a/Generated Documentation/html/adc12__a__ex1__avcc_ref_8c.html b/Generated Documentation/html/adc12__a__ex1__avcc_ref_8c.html new file mode 100644 index 0000000..db597ea --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex1__avcc_ref_8c.html @@ -0,0 +1,179 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc12_a/adc12_a_ex1_avccRef.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc12_a_ex1_avccRef.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void ADC12_A_ISR (void)
 
+

Function Documentation

+ +

◆ ADC12_A_ISR()

+ +
+
+ + + + + + + + +
void ADC12_A_ISR (void )
+
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

ADC12_A - Sample A0 Input, AVcc Ref, LED ON if A0 > 0.5*AVcc MSP430F552x Demo

+

Description: A single sample is made on A0 with reference to AVcc. Software sets ADC12SC to start sample and conversion - ADC12SC automatically cleared at EOC. ADC12_A internal oscillator times sample (16x) and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC12_A conversion complete, ADC12_A_ISR will force exit from LPM0 in Mainloop on reti. If A0 > 0.5*AVcc, P1.0 set, else reset.

          MSP430F552x
+      -----------------
+  /|\|                 |
+   | |                 |
+   --|RST       P6.0/A0|<- Vin
+     |             P1.0|--> LED
+     |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC12_A peripheral
  • +
  • GPIO Port peripheral
  • +
  • A0
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • ADC12_A_VECTOR
  • +
+ +

Definition at line 68 of file adc12_a_ex1_avccRef.c.

+ +

References __no_operation(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__a__ex1__avcc_ref_8c.js b/Generated Documentation/html/adc12__a__ex1__avcc_ref_8c.js new file mode 100644 index 0000000..09289a7 --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex1__avcc_ref_8c.js @@ -0,0 +1,5 @@ +var adc12__a__ex1__avcc_ref_8c = +[ + [ "ADC12_A_ISR", "adc12__a__ex1__avcc_ref_8c.html#a95d158eff75655affb0b2a05dff1bc7e", null ], + [ "main", "adc12__a__ex1__avcc_ref_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc12__a__ex1__avcc_ref_8c_source.html b/Generated Documentation/html/adc12__a__ex1__avcc_ref_8c_source.html new file mode 100644 index 0000000..c65b8a2 --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex1__avcc_ref_8c_source.html @@ -0,0 +1,282 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc12_a/adc12_a_ex1_avccRef.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc12_a_ex1_avccRef.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
64 //******************************************************************************
+
65 
+
66 #include "driverlib.h"
+
67 
+
68 void main (void)
+
69 {
+
70  //Stop Watchdog Timer
+
71  WDT_A_hold(WDT_A_BASE);
+
72 
+
73  //P6.0 ADC option select
+
74  GPIO_setAsPeripheralModuleFunctionInputPin(
+
75  GPIO_PORT_P6,
+
76  GPIO_PIN0
+
77  );
+
78 
+
79  GPIO_setAsOutputPin(
+
80  GPIO_PORT_P1,
+
81  GPIO_PIN0
+
82  );
+
83 
+
84  //Initialize the ADC12_A Module
+
85  /*
+
86  * Base address of ADC12_A Module
+
87  * Use internal ADC12_A bit as sample/hold signal to start conversion
+
88  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
89  * Use default clock divider of 1
+
90  */
+
91  ADC12_A_init(ADC12_A_BASE,
+
92  ADC12_A_SAMPLEHOLDSOURCE_SC,
+
93  ADC12_A_CLOCKSOURCE_ADC12OSC,
+
94  ADC12_A_CLOCKDIVIDER_1);
+
95 
+
96  ADC12_A_enable(ADC12_A_BASE);
+
97 
+
98  /*
+
99  * Base address of ADC12_A Module
+
100  * For memory buffers 0-7 sample/hold for 64 clock cycles
+
101  * For memory buffers 8-15 sample/hold for 4 clock cycles (default)
+
102  * Disable Multiple Sampling
+
103  */
+
104  ADC12_A_setupSamplingTimer(ADC12_A_BASE,
+
105  ADC12_A_CYCLEHOLD_64_CYCLES,
+
106  ADC12_A_CYCLEHOLD_4_CYCLES,
+
107  ADC12_A_MULTIPLESAMPLESDISABLE);
+
108 
+
109  //Configure Memory Buffer
+
110  /*
+
111  * Base address of the ADC12_A Module
+
112  * Configure memory buffer 0
+
113  * Map input A0 to memory buffer 0
+
114  * Vref+ = AVcc
+
115  * Vr- = AVss
+
116  * Memory buffer 0 is not the end of a sequence
+
117  */
+
118  ADC12_A_configureMemoryParam param = {0};
+
119  param.memoryBufferControlIndex = ADC12_A_MEMORY_0;
+
120  param.inputSourceSelect = ADC12_A_INPUT_A0;
+
121  param.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
+
122  param.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
+
123  param.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;
+
124  ADC12_A_configureMemory(ADC12_A_BASE ,&param);
+
125 
+
126  //Enable memory buffer 0 interrupt
+
127  ADC12_A_clearInterrupt(ADC12_A_BASE,
+
128  ADC12IFG0);
+
129  ADC12_A_enableInterrupt(ADC12_A_BASE,
+
130  ADC12IE0);
+
131 
+
132  while (1)
+
133  {
+
134  //Enable/Start sampling and conversion
+
135  /*
+
136  * Base address of ADC12_A Module
+
137  * Start the conversion into memory buffer 0
+
138  * Use the single-channel, single-conversion mode
+
139  */
+
140  ADC12_A_startConversion(ADC12_A_BASE,
+
141  ADC12_A_MEMORY_0,
+
142  ADC12_A_SINGLECHANNEL);
+
143 
+
144  //LPM0, ADC12_A_ISR will force exit
+
145  __bis_SR_register(LPM0_bits + GIE);
+
146  //for Debugger
+
147  __no_operation();
+
148  }
+
149 }
+
150 
+
151 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
152 #pragma vector=ADC12_VECTOR
+
153 __interrupt
+
154 #elif defined(__GNUC__)
+
155 __attribute__((interrupt(ADC12_VECTOR)))
+
156 #endif
+
157 void ADC12_A_ISR (void)
+
158 {
+
159  switch (__even_in_range(ADC12IV,34)){
+
160  case 0: break; //Vector 0: No interrupt
+
161  case 2: break; //Vector 2: ADC overflow
+
162  case 4: break; //Vector 4: ADC timing overflow
+
163  case 6: //Vector 6: ADC12IFG0
+
164  //Is Memory Buffer 0 = A0 > 0.5AVcc?
+
165  if (ADC12_A_getResults(ADC12_A_BASE,
+
166  ADC12_A_MEMORY_0)
+
167  >= 0x7ff){
+
168  //set P1.0
+ +
170  GPIO_PORT_P1,
+
171  GPIO_PIN0
+
172  );
+
173  } else {
+
174  //Clear P1.0 LED off
+ +
176  GPIO_PORT_P1,
+
177  GPIO_PIN0
+
178  );
+
179  }
+
180 
+
181  //Exit active CPU
+
182  __bic_SR_register_on_exit(LPM0_bits);
+
183  case 8: break; //Vector 8: ADC12IFG1
+
184  case 10: break; //Vector 10: ADC12IFG2
+
185  case 12: break; //Vector 12: ADC12IFG3
+
186  case 14: break; //Vector 14: ADC12IFG4
+
187  case 16: break; //Vector 16: ADC12IFG5
+
188  case 18: break; //Vector 18: ADC12IFG6
+
189  case 20: break; //Vector 20: ADC12IFG7
+
190  case 22: break; //Vector 22: ADC12IFG8
+
191  case 24: break; //Vector 24: ADC12IFG9
+
192  case 26: break; //Vector 26: ADC12IFG10
+
193  case 28: break; //Vector 28: ADC12IFG11
+
194  case 30: break; //Vector 30: ADC12IFG12
+
195  case 32: break; //Vector 32: ADC12IFG13
+
196  case 34: break; //Vector 34: ADC12IFG14
+
197  default: break;
+
198  }
+
199 }
+
200 
+
MPU_initThreeSegmentsParam param
+
void main(void)
+
void ADC12_A_ISR(void)
+ +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__a__ex2__int_ref_8c.html b/Generated Documentation/html/adc12__a__ex2__int_ref_8c.html new file mode 100644 index 0000000..bab3598 --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex2__int_ref_8c.html @@ -0,0 +1,154 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc12_a/adc12_a_ex2_intRef.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc12_a_ex2_intRef.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

ADC12_A - Sample A0 Input, 1.5V Internal Ref MSP430F552x Demo

+

This example shows how to use the internal reference of REF module using the REF control registers. The ADC12_A uses the internal 1.5V reference and performs a single conversion on channel A0. The conversion results are stored in ADC12MEM0. Test by applying a voltage to channel A0, then setting and running to a break point at the "__no_operation()" instruction. To view the conversion results, open an ADC12_A register window in debugger and view the contents of ADC12MEM0.

           MSP430F552x
+       -----------------
+   /|\|                 |
+    | |                 |
+    --|RST       P6.0/A0|<- Vin
+      |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC12_A peripheral
  • +
  • GPIO Port peripheral
  • +
  • A0
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 68 of file adc12_a_ex2_intRef.c.

+ +

References __delay_cycles(), __no_operation(), i, and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__a__ex2__int_ref_8c.js b/Generated Documentation/html/adc12__a__ex2__int_ref_8c.js new file mode 100644 index 0000000..c256989 --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex2__int_ref_8c.js @@ -0,0 +1,4 @@ +var adc12__a__ex2__int_ref_8c = +[ + [ "main", "adc12__a__ex2__int_ref_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc12__a__ex2__int_ref_8c_source.html b/Generated Documentation/html/adc12__a__ex2__int_ref_8c_source.html new file mode 100644 index 0000000..8590086 --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex2__int_ref_8c_source.html @@ -0,0 +1,234 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc12_a/adc12_a_ex2_intRef.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc12_a_ex2_intRef.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
64 //******************************************************************************
+
65 
+
66 #include "driverlib.h"
+
67 
+
68 void main (void)
+
69 {
+
70  volatile uint16_t i;
+
71 
+
72  //Stop Watchdog Timer
+
73  WDT_A_hold(WDT_A_BASE);
+
74 
+
75  //Enable A/D channel A0
+
76  GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P6,
+
77  GPIO_PIN0
+
78  );
+
79 
+
80  //Initialize the ADC12_A Module
+
81  /*
+
82  * Base address of ADC12_A Module
+
83  * Use internal ADC12_A bit as sample/hold signal to start conversion
+
84  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
85  * Use default clock divider of 1
+
86  */
+
87  ADC12_A_init(ADC12_A_BASE,
+
88  ADC12_A_SAMPLEHOLDSOURCE_SC,
+
89  ADC12_A_CLOCKSOURCE_ADC12OSC,
+
90  ADC12_A_CLOCKDIVIDER_1);
+
91 
+
92  ADC12_A_enable(ADC12_A_BASE);
+
93 
+
94  /*
+
95  * Base address of ADC12_A Module
+
96  * For memory buffers 0-7 sample/hold for 64 clock cycles
+
97  * For memory buffers 8-15 sample/hold for 4 clock cycles (default)
+
98  * Disable Multiple Sampling
+
99  */
+
100  ADC12_A_setupSamplingTimer(ADC12_A_BASE,
+
101  ADC12_A_CYCLEHOLD_64_CYCLES,
+
102  ADC12_A_CYCLEHOLD_4_CYCLES,
+
103  ADC12_A_MULTIPLESAMPLESDISABLE);
+
104 
+
105  //Configure Memory Buffer
+
106  /*
+
107  * Base address of the ADC12_A Module
+
108  * Configure memory buffer 0
+
109  * Map input A0 to memory buffer 0
+
110  * Vr+ = Vref+ (int)
+
111  * Vr- = AVss
+
112  * Memory buffer 0 is not the end of a sequence
+
113  */
+
114  ADC12_A_configureMemoryParam param = {0};
+
115  param.memoryBufferControlIndex = ADC12_A_MEMORY_0;
+
116  param.inputSourceSelect = ADC12_A_INPUT_A0;
+
117  param.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_INT;
+
118  param.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
+
119  param.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;
+
120  ADC12_A_configureMemory(ADC12_A_BASE ,&param);
+
121 
+
122  //Configure internal reference
+
123  //If ref generator busy, WAIT
+
124  while ( REF_ACTIVE == Ref_isRefGenBusy(REF_BASE) ) ;
+
125  //Select internal ref = 1.5V
+
126  Ref_setReferenceVoltage(REF_BASE,
+
127  REF_VREF1_5V);
+
128  //Internal Reference ON
+
129  Ref_enableReferenceVoltage(REF_BASE);
+
130 
+
131  //Delay (~75us) for Ref to settle
+
132  __delay_cycles(75);
+
133 
+
134 
+
135  while (1)
+
136  {
+
137  //Enable/Start first sampling and conversion cycle
+
138  /*
+
139  * Base address of ADC12_A Module
+
140  * Start the conversion into memory buffer 0
+
141  * Use the single-channel, single-conversion mode
+
142  */
+
143  ADC12_A_startConversion(ADC12_A_BASE,
+
144  ADC12_A_MEMORY_0,
+
145  ADC12_A_SINGLECHANNEL);
+
146 
+
147  //Poll for interrupt on memory buffer 0
+
148  while (!ADC12_A_getInterruptStatus(ADC12_A_BASE,
+
149  ADC12IFG0)) ;
+
150 
+
151  //SET BREAKPOINT HERE
+
152  __no_operation();
+
153  }
+
154 }
+
MPU_initThreeSegmentsParam param
+
void main(void)
+ + +
__no_operation()
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__a__ex3__ext_ref_8c.html b/Generated Documentation/html/adc12__a__ex3__ext_ref_8c.html new file mode 100644 index 0000000..4a075e0 --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex3__ext_ref_8c.html @@ -0,0 +1,150 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc12_a/adc12_a_ex3_extRef.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc12_a_ex3_extRef.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

ADC12_A - Sample A0 Input, External Ref MSP430F552x Demo

+

This example shows how to use an external positive reference for the ADC12_A. The external reference is applied to the VeREF+ pin. AVss is used for the negative reference. A single conversion is performed on channel A0. The conversion results are stored in ADC12MEM0 and Test by applying a voltage to channel A0, then setting and running to a break point at the "_NOP()" instruction. To view the conversion results, open an SFR window in debugger and view the contents of ADC12MEM0.

+

NOTE: VeREF+ range: 1.4V (min) to AVCC (max) VeREF- range: 0V (min) to 1.2V (max) Differential ref voltage range: 1.4V(min) to AVCC(max) (see datasheet for device specific information)

    MSP430F552x
+-------------------
+

/|| | | | | –|RST P6.0/A0|<- Vin | P5.0/VeREF+|<- REF | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC12_A peripheral
  • +
  • GPIO Port peripheral
  • +
  • A0
  • +
  • VeREF+
  • +
+ +

Definition at line 70 of file adc12_a_ex3_extRef.c.

+ +

References __no_operation(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__a__ex3__ext_ref_8c.js b/Generated Documentation/html/adc12__a__ex3__ext_ref_8c.js new file mode 100644 index 0000000..b6ae3c7 --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex3__ext_ref_8c.js @@ -0,0 +1,4 @@ +var adc12__a__ex3__ext_ref_8c = +[ + [ "main", "adc12__a__ex3__ext_ref_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc12__a__ex3__ext_ref_8c_source.html b/Generated Documentation/html/adc12__a__ex3__ext_ref_8c_source.html new file mode 100644 index 0000000..ed2f87e --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex3__ext_ref_8c_source.html @@ -0,0 +1,217 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc12_a/adc12_a_ex3_extRef.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc12_a_ex3_extRef.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
66 //******************************************************************************
+
67 
+
68 #include "driverlib.h"
+
69 
+
70 void main (void)
+
71 {
+
72  //Stop Watchdog Timer
+
73  WDT_A_hold(WDT_A_BASE);
+
74 
+
75  //Enable A/D channel A0
+
76  GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P6,
+
77  GPIO_PIN0
+
78  );
+
79 
+
80  //Initialize the ADC12_A Module
+
81  /*
+
82  * Base address of ADC12_A Module
+
83  * Use internal ADC12_A bit as sample/hold signal to start conversion
+
84  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
85  * Use default clock divider of 1
+
86  */
+
87  ADC12_A_init(ADC12_A_BASE,
+
88  ADC12_A_SAMPLEHOLDSOURCE_SC,
+
89  ADC12_A_CLOCKSOURCE_ADC12OSC,
+
90  ADC12_A_CLOCKDIVIDER_1);
+
91 
+
92  ADC12_A_enable(ADC12_A_BASE);
+
93 
+
94  /*
+
95  * Base address of ADC12_A Module
+
96  * For memory buffers 0-7 sample/hold for 16 clock cycles
+
97  * For memory buffers 8-15 sample/hold for 4 clock cycles (default)
+
98  * Disable Multiple Sampling
+
99  */
+
100  ADC12_A_setupSamplingTimer(ADC12_A_BASE,
+
101  ADC12_A_CYCLEHOLD_16_CYCLES,
+
102  ADC12_A_CYCLEHOLD_4_CYCLES,
+
103  ADC12_A_MULTIPLESAMPLESDISABLE);
+
104 
+
105  //Configure Memory Buffer
+
106  /*
+
107  * Base address of the ADC12_A Module
+
108  * Configure memory buffer 0
+
109  * Map input A0 to memory buffer 0
+
110  * Vref+ = VeREF+ (ext)
+
111  * Vref- = AVss
+
112  * Memory buffer 0 is not the end of a sequence
+
113  */
+
114  ADC12_A_configureMemoryParam param = {0};
+
115  param.memoryBufferControlIndex = ADC12_A_MEMORY_0;
+
116  param.inputSourceSelect = ADC12_A_INPUT_A0;
+
117  param.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_EXT;
+
118  param.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
+
119  param.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;
+
120  ADC12_A_configureMemory(ADC12_A_BASE ,&param);
+
121 
+
122  while (1)
+
123  {
+
124  //Enable/Start first sampling and conversion cycle
+
125  /*
+
126  * Base address of ADC12_A Module
+
127  * Start the conversion into memory buffer 0
+
128  * Use the single-channel, single-conversion mode
+
129  */
+
130  ADC12_A_startConversion(ADC12_A_BASE,
+
131  ADC12_A_MEMORY_0,
+
132  ADC12_A_SINGLECHANNEL);
+
133 
+
134  //Poll for interrupt on memory buffer 0
+
135  while (!ADC12_A_getInterruptStatus(ADC12_A_BASE,
+
136  ADC12IFG0)) ;
+
137 
+
138  //SET BREAKPOINT HERE
+
139  __no_operation();
+
140  }
+
141 }
+
MPU_initThreeSegmentsParam param
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__a__ex4__repeated_seq_8c.html b/Generated Documentation/html/adc12__a__ex4__repeated_seq_8c.html new file mode 100644 index 0000000..44c7eed --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex4__repeated_seq_8c.html @@ -0,0 +1,282 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc12_a/adc12_a_ex4_repeatedSeq.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc12_a_ex4_repeatedSeq.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define Num_of_Results   8
 
+ + + + + +

+Functions

void main (void)
 
void ADC12ISR (void)
 
+ + + + + + + + + +

+Variables

volatile uint16_t A0results [Num_of_Results]
 
volatile uint16_t A1results [Num_of_Results]
 
volatile uint16_t A2results [Num_of_Results]
 
volatile uint16_t A3results [Num_of_Results]
 
+

Macro Definition Documentation

+ +

◆ Num_of_Results

+ +
+
+ + + + +
#define Num_of_Results   8
+
+

ADC12_A - Sample A0-3 Input, AVcc Ref, Repeated Sequence of Conversions

+

This example shows how to perform a repeated sequence of conversions using "repeat sequence-of-channels" mode. AVcc is used for the reference and repeated sequence of conversions is performed on Channels A0, A1, A2, and A3. Each conversion result is stored in ADC12MEM0, ADC12MEM1, ADC12MEM2, and ADC12MEM3 respectively. After each sequence, the 4 conversion results are moved to A0results[], A1results[], A2results[], and A3results[]. Test by applying voltages to channels A0 - A3. Open a watch window in debugger and view the results. Set Breakpoint1 in the index increment line to see the array values change sequentially and Breakpoint2 to see the entire array of conversion results in A0results[], A1results[], A2results[], and A3results[]for the specified Num_of_Results.

+

Note that a sequence has no restrictions on which channels are converted. For example, a valid sequence could be A0, A3, A2, A4, A2, A1, A0, and A7. See the MSP430x5xx User's Guide for instructions on using the ADC12_A.

          MSP430F552x
+       -----------------
+   /|\|                 |
+    | |          P6.0/A0|<- Vin0
+    --|RST       P6.1/A1|<- Vin1
+      |          P6.2/A2|<- Vin2
+      |          P6.3/A3|<- Vin3
+      |                 |Vref is Vcc in all cases
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC12_A peripheral
  • +
  • GPIO Port peripheral
  • +
  • A0
  • +
  • A1
  • +
  • A2
  • +
  • A3
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • ADC12_A_VECTOR
  • +
+ +

Definition at line 79 of file adc12_a_ex4_repeatedSeq.c.

+ +
+
+

Function Documentation

+ +

◆ ADC12ISR()

+ +
+
+ + + + + + + + +
void ADC12ISR (void )
+
+ +

Definition at line 216 of file adc12_a_ex4_repeatedSeq.c.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 86 of file adc12_a_ex4_repeatedSeq.c.

+ +

References __no_operation().

+ +
+
+

Variable Documentation

+ +

◆ A0results

+ +
+
+ + + + +
volatile uint16_t A0results[Num_of_Results]
+
+ +

Definition at line 81 of file adc12_a_ex4_repeatedSeq.c.

+ +
+
+ +

◆ A1results

+ +
+
+ + + + +
volatile uint16_t A1results[Num_of_Results]
+
+ +

Definition at line 82 of file adc12_a_ex4_repeatedSeq.c.

+ +
+
+ +

◆ A2results

+ +
+
+ + + + +
volatile uint16_t A2results[Num_of_Results]
+
+ +

Definition at line 83 of file adc12_a_ex4_repeatedSeq.c.

+ +
+
+ +

◆ A3results

+ +
+
+ + + + +
volatile uint16_t A3results[Num_of_Results]
+
+ +

Definition at line 84 of file adc12_a_ex4_repeatedSeq.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__a__ex4__repeated_seq_8c.js b/Generated Documentation/html/adc12__a__ex4__repeated_seq_8c.js new file mode 100644 index 0000000..a72893c --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex4__repeated_seq_8c.js @@ -0,0 +1,10 @@ +var adc12__a__ex4__repeated_seq_8c = +[ + [ "Num_of_Results", "adc12__a__ex4__repeated_seq_8c.html#a78a02d14040df7efbf037190a2e1b134", null ], + [ "ADC12ISR", "adc12__a__ex4__repeated_seq_8c.html#ae0194f6cfda5bea946ec788350bcc32c", null ], + [ "main", "adc12__a__ex4__repeated_seq_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "A0results", "adc12__a__ex4__repeated_seq_8c.html#af4469ec9e3464d888a7346b686ee47d7", null ], + [ "A1results", "adc12__a__ex4__repeated_seq_8c.html#a00a903bf00ff0acee458d19ef1a96a20", null ], + [ "A2results", "adc12__a__ex4__repeated_seq_8c.html#a52db4c38c59a4efc53ed6f36d4fee837", null ], + [ "A3results", "adc12__a__ex4__repeated_seq_8c.html#acec056f156b95cb08bd2b8bfe7c23d89", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc12__a__ex4__repeated_seq_8c_source.html b/Generated Documentation/html/adc12__a__ex4__repeated_seq_8c_source.html new file mode 100644 index 0000000..29ef98d --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex4__repeated_seq_8c_source.html @@ -0,0 +1,335 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc12_a/adc12_a_ex4_repeatedSeq.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc12_a_ex4_repeatedSeq.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
76 //******************************************************************************
+
77 #include "driverlib.h"
+
78 
+
79 #define Num_of_Results 8
+
80 
+
81 volatile uint16_t A0results[Num_of_Results];
+
82 volatile uint16_t A1results[Num_of_Results];
+
83 volatile uint16_t A2results[Num_of_Results];
+
84 volatile uint16_t A3results[Num_of_Results];
+
85 
+
86 void main (void)
+
87 {
+
88  //Stop Watchdog Timer
+
89  WDT_A_hold(WDT_A_BASE);
+
90 
+
91  //Enable A/D channel inputs
+
92  GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P6,
+
93  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 +
+
94  GPIO_PIN3 + GPIO_PIN4 + GPIO_PIN5 +
+
95  GPIO_PIN6 + GPIO_PIN7
+
96  );
+
97 
+
98  //Initialize the ADC12_A Module
+
99  /*
+
100  * Base address of ADC12_A Module
+
101  * Use internal ADC12_A bit as sample/hold signal to start conversion
+
102  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
103  * Use default clock divider of 1
+
104  */
+
105  ADC12_A_init(ADC12_A_BASE,
+
106  ADC12_A_SAMPLEHOLDSOURCE_SC,
+
107  ADC12_A_CLOCKSOURCE_ADC12OSC,
+
108  ADC12_A_CLOCKDIVIDER_1
+
109  );
+
110 
+
111  ADC12_A_enable(ADC12_A_BASE);
+
112 
+
113  /*
+
114  * Base address of ADC12_A Module
+
115  * For memory buffers 0-7 sample/hold for 256 clock cycles
+
116  * For memory buffers 8-15 sample/hold for 4 clock cycles (default)
+
117  * Enable Multiple Sampling
+
118  */
+
119  ADC12_A_setupSamplingTimer(ADC12_A_BASE,
+
120  ADC12_A_CYCLEHOLD_256_CYCLES,
+
121  ADC12_A_CYCLEHOLD_4_CYCLES,
+
122  ADC12_A_MULTIPLESAMPLESENABLE);
+
123 
+
124  //Configure Memory Buffers
+
125  /*
+
126  * Base address of the ADC12_A Module
+
127  * Configure memory buffer 0
+
128  * Map input A0 to memory buffer 0
+
129  * Vref+ = AVcc
+
130  * Vref- = AVss
+
131  * Memory buffer 0 is not the end of a sequence
+
132  */
+
133  ADC12_A_configureMemoryParam param0 = {0};
+
134  param0.memoryBufferControlIndex = ADC12_A_MEMORY_0;
+
135  param0.inputSourceSelect = ADC12_A_INPUT_A0;
+
136  param0.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
+
137  param0.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
+
138  param0.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;
+
139  ADC12_A_configureMemory(ADC12_A_BASE ,&param0);
+
140 
+
141  /*
+
142  * Base address of the ADC12_A Module
+
143  * Configure memory buffer 1
+
144  * Map input A1 to memory buffer 1
+
145  * Vref+ = AVcc
+
146  * Vref- = AVss
+
147  * Memory buffer 1 is not the end of a sequence
+
148  *
+
149  */
+
150  ADC12_A_configureMemoryParam param1 = {0};
+
151  param1.memoryBufferControlIndex = ADC12_A_MEMORY_1;
+
152  param1.inputSourceSelect = ADC12_A_INPUT_A1;
+
153  param1.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
+
154  param1.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
+
155  param1.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;
+
156  ADC12_A_configureMemory(ADC12_A_BASE ,&param1);
+
157  /*
+
158  * Base address of the ADC12_A Module
+
159  * Configure memory buffer 2
+
160  * Map input A2 to memory buffer 2
+
161  * Vref+ = AVcc
+
162  * Vref- = AVss
+
163  * Memory buffer 2 is not the end of a sequence
+
164  */
+
165  ADC12_A_configureMemoryParam param2 = {0};
+
166  param2.memoryBufferControlIndex = ADC12_A_MEMORY_2;
+
167  param2.inputSourceSelect = ADC12_A_INPUT_A2;
+
168  param2.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
+
169  param2.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
+
170  param2.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;
+
171  ADC12_A_configureMemory(ADC12_A_BASE ,&param2);
+
172  /*
+
173  * Base address of the ADC12_A Module
+
174  * Configure memory buffer 3
+
175  * Map input A3 to memory buffer 3
+
176  * Vr+ = AVcc
+
177  * Vr- = AVss
+
178  * Memory buffer 3 IS the end of a sequence
+
179  */
+
180  ADC12_A_configureMemoryParam param3 = {0};
+
181  param3.memoryBufferControlIndex = ADC12_A_MEMORY_3;
+
182  param3.inputSourceSelect = ADC12_A_INPUT_A3;
+
183  param3.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
+
184  param3.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
+
185  param3.endOfSequence = ADC12_A_ENDOFSEQUENCE;
+
186  ADC12_A_configureMemory(ADC12_A_BASE ,&param3);
+
187 
+
188  //Enable memory buffer 3 interrupt
+
189  ADC12_A_clearInterrupt(ADC12_A_BASE,
+
190  ADC12IFG3);
+
191  ADC12_A_enableInterrupt(ADC12_A_BASE,
+
192  ADC12IE3);
+
193 
+
194  //Enable/Start first sampling and conversion cycle
+
195  /*
+
196  * Base address of ADC12_A Module
+
197  * Start the conversion into memory buffer 0
+
198  * Use the repeated sequence of channels
+
199  */
+
200  ADC12_A_startConversion(ADC12_A_BASE,
+
201  ADC12_A_MEMORY_0,
+
202  ADC12_A_REPEATED_SEQOFCHANNELS);
+
203 
+
204  //Enter LPM0, Enable interrupts
+
205  __bis_SR_register(LPM0_bits + GIE);
+
206  //For debugger
+
207  __no_operation();
+
208 }
+
209 
+
210 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
211 #pragma vector=ADC12_VECTOR
+
212 __interrupt
+
213 #elif defined(__GNUC__)
+
214 __attribute__((interrupt(ADC12_VECTOR)))
+
215 #endif
+
216 void ADC12ISR (void)
+
217 {
+
218  static uint16_t index = 0;
+
219 
+
220  switch (__even_in_range(ADC12IV,34)){
+
221  case 0: break; //Vector 0: No interrupt
+
222  case 2: break; //Vector 2: ADC overflow
+
223  case 4: break; //Vector 4: ADC timing overflow
+
224  case 6: break; //Vector 6: ADC12IFG0
+
225  case 8: break; //Vector 8: ADC12IFG1
+
226  case 10: break; //Vector 10: ADC12IFG2
+
227  case 12: //Vector 12: ADC12IFG3
+
228  //Move A0 results, IFG is cleared
+
229  A0results[index] =
+
230  ADC12_A_getResults(ADC12_A_BASE,
+
231  ADC12_A_MEMORY_0);
+
232  //Move A1 results, IFG is cleared
+
233  A1results[index] =
+
234  ADC12_A_getResults(ADC12_A_BASE,
+
235  ADC12_A_MEMORY_1);
+
236  //Move A2 results, IFG is cleared
+
237  A2results[index] =
+
238  ADC12_A_getResults(ADC12_A_BASE,
+
239  ADC12_A_MEMORY_2);
+
240  //Move A3 results, IFG is cleared
+
241  A3results[index] =
+
242  ADC12_A_getResults(ADC12_A_BASE,
+
243  ADC12_A_MEMORY_3);
+
244 
+
245  //Increment results index, modulo; Set BREAKPOINT here
+
246  index++;
+
247 
+
248  if (index == 8){
+
249  (index = 0);
+
250  }
+
251  case 14: break; //Vector 14: ADC12IFG4
+
252  case 16: break; //Vector 16: ADC12IFG5
+
253  case 18: break; //Vector 18: ADC12IFG6
+
254  case 20: break; //Vector 20: ADC12IFG7
+
255  case 22: break; //Vector 22: ADC12IFG8
+
256  case 24: break; //Vector 24: ADC12IFG9
+
257  case 26: break; //Vector 26: ADC12IFG10
+
258  case 28: break; //Vector 28: ADC12IFG11
+
259  case 30: break; //Vector 30: ADC12IFG12
+
260  case 32: break; //Vector 32: ADC12IFG13
+
261  case 34: break; //Vector 34: ADC12IFG14
+
262  default: break;
+
263  }
+
264 }
+
volatile uint16_t A1results[Num_of_Results]
+
volatile uint16_t A2results[Num_of_Results]
+
void main(void)
+
#define Num_of_Results
+
volatile uint16_t A3results[Num_of_Results]
+
void ADC12ISR(void)
+
volatile uint16_t A0results[Num_of_Results]
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__a__ex5__repeated_single_8c.html b/Generated Documentation/html/adc12__a__ex5__repeated_single_8c.html new file mode 100644 index 0000000..079d620 --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex5__repeated_single_8c.html @@ -0,0 +1,222 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc12_a/adc12_a_ex5_repeatedSingle.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc12_a_ex5_repeatedSingle.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define Num_of_Results   8
 
+ + + + + +

+Functions

void main (void)
 
void ADC12ISR (void)
 
+ + + +

+Variables

volatile uint16_t results [Num_of_Results]
 
+

Macro Definition Documentation

+ +

◆ Num_of_Results

+ +
+
+ + + + +
#define Num_of_Results   8
+
+

ADC12_A - Sample A0 Input, AVcc Ref, Repeated Single Conversion

+

This example shows how to perform repeated conversions on a single channel using "repeat-single-channel" mode. AVcc is used for the reference and repeated conversions are performed on Channel A0. Each conversion result is moved to an 8-element array called results[]. Test by applying a voltage to channel A0, then running. Open a watch window in debugger and view the results. Set Breakpoint1 in the index increment line to see the array value change sequentially and Breakpoint to see the entire array of conversion results in "results[]" for the specified Num_of_Results. This can run even in LPM4 mode as ADC has its own clock.

          MSP430F552x
+       -----------------
+   /|\|                 |
+    | |                 |
+    --|RST       P6.0/A0|<- Vin
+      |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC12_A peripheral
  • +
  • GPIO Port peripheral
  • +
  • A0
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • ADC12_A_VECTOR
  • +
+ +

Definition at line 69 of file adc12_a_ex5_repeatedSingle.c.

+ +
+
+

Function Documentation

+ +

◆ ADC12ISR()

+ +
+
+ + + + + + + + +
void ADC12ISR (void )
+
+ +

Definition at line 157 of file adc12_a_ex5_repeatedSingle.c.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 77 of file adc12_a_ex5_repeatedSingle.c.

+ +

References __no_operation(), and param.

+ +
+
+

Variable Documentation

+ +

◆ results

+ +
+
+ + + + +
volatile uint16_t results[Num_of_Results]
+
+ +

Definition at line 71 of file adc12_a_ex5_repeatedSingle.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__a__ex5__repeated_single_8c.js b/Generated Documentation/html/adc12__a__ex5__repeated_single_8c.js new file mode 100644 index 0000000..8c31321 --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex5__repeated_single_8c.js @@ -0,0 +1,7 @@ +var adc12__a__ex5__repeated_single_8c = +[ + [ "Num_of_Results", "adc12__a__ex5__repeated_single_8c.html#a78a02d14040df7efbf037190a2e1b134", null ], + [ "ADC12ISR", "adc12__a__ex5__repeated_single_8c.html#ae0194f6cfda5bea946ec788350bcc32c", null ], + [ "main", "adc12__a__ex5__repeated_single_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "results", "adc12__a__ex5__repeated_single_8c.html#a2f59271f9137b6923ed2d48cf6bbad3b", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc12__a__ex5__repeated_single_8c_source.html b/Generated Documentation/html/adc12__a__ex5__repeated_single_8c_source.html new file mode 100644 index 0000000..1fa44ed --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex5__repeated_single_8c_source.html @@ -0,0 +1,274 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc12_a/adc12_a_ex5_repeatedSingle.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc12_a_ex5_repeatedSingle.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
65 //******************************************************************************
+
66 
+
67 #include "driverlib.h"
+
68 
+
69 #define Num_of_Results 8
+
70 
+
71 volatile uint16_t results[Num_of_Results];
+
72 //Needs to be global in this
+
73 //example. Otherwise, the
+
74 //compiler removes it because it
+
75 //is not used for anything.
+
76 
+
77 void main (void)
+
78 {
+
79  //Stop Watchdog Timer
+
80  WDT_A_hold(WDT_A_BASE);
+
81 
+
82  //Enable A/D channel A0
+
83  GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P6,
+
84  GPIO_PIN0
+
85  );
+
86 
+
87  //Initialize the ADC12_A Module
+
88  /*
+
89  * Base address of ADC12_A Module
+
90  * Use internal ADC12_A bit as sample/hold signal to start conversion
+
91  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
92  * Use default clock divider of 1
+
93  */
+
94  ADC12_A_init(ADC12_A_BASE,
+
95  ADC12_A_SAMPLEHOLDSOURCE_SC,
+
96  ADC12_A_CLOCKSOURCE_ADC12OSC,
+
97  ADC12_A_CLOCKDIVIDER_1);
+
98 
+
99  ADC12_A_enable(ADC12_A_BASE);
+
100 
+
101  /*
+
102  * Base address of ADC12_A Module
+
103  * For memory buffers 0-7 sample/hold for 256 clock cycles
+
104  * For memory buffers 8-15 sample/hold for 4 clock cycles (default)
+
105  * Enable Multiple Sampling
+
106  */
+
107  ADC12_A_setupSamplingTimer(ADC12_A_BASE,
+
108  ADC12_A_CYCLEHOLD_256_CYCLES,
+
109  ADC12_A_CYCLEHOLD_4_CYCLES,
+
110  ADC12_A_MULTIPLESAMPLESENABLE);
+
111 
+
112  //Configure Memory Buffer
+
113  /*
+
114  * Base address of the ADC12_A Module
+
115  * Configure memory buffer 0
+
116  * Map input A0 to memory buffer 0
+
117  * Vref+ = AVcc
+
118  * Vref- = AVss
+
119  * Memory buffer 0 is not the end of a sequence
+
120  */
+
121  ADC12_A_configureMemoryParam param = {0};
+
122  param.memoryBufferControlIndex = ADC12_A_MEMORY_0;
+
123  param.inputSourceSelect = ADC12_A_INPUT_A0;
+
124  param.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
+
125  param.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
+
126  param.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;
+
127  ADC12_A_configureMemory(ADC12_A_BASE ,&param);
+
128 
+
129  //Enable memory buffer 0 interrupt
+
130  ADC12_A_clearInterrupt(ADC12_A_BASE,
+
131  ADC12IFG0);
+
132  ADC12_A_enableInterrupt(ADC12_A_BASE,
+
133  ADC12IE0);
+
134 
+
135  //Enable/Start first sampling and conversion cycle
+
136  /*
+
137  * Base address of ADC12_A Module
+
138  * Start the conversion into memory buffer 0
+
139  * Use the repeated single-channel
+
140  */
+
141  ADC12_A_startConversion(ADC12_A_BASE,
+
142  ADC12_A_MEMORY_0,
+
143  ADC12_A_REPEATED_SINGLECHANNEL);
+
144 
+
145  //Enter LPM4, Enable interrupts
+
146  __bis_SR_register(LPM4_bits + GIE);
+
147  //For debugger
+
148  __no_operation();
+
149 }
+
150 
+
151 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
152 #pragma vector=ADC12_VECTOR
+
153 __interrupt
+
154 #elif defined(__GNUC__)
+
155 __attribute__((interrupt(ADC12_VECTOR)))
+
156 #endif
+
157 void ADC12ISR (void)
+
158 {
+
159  static uint8_t index = 0;
+
160 
+
161  switch (__even_in_range(ADC12IV,34)){
+
162  case 0: break; //Vector 0: No interrupt
+
163  case 2: break; //Vector 2: ADC overflow
+
164  case 4: break; //Vector 4: ADC timing overflow
+
165  case 6: //Vector 6: ADC12IFG0
+
166  //Move results
+
167  results[index] =
+
168  ADC12_A_getResults(ADC12_A_BASE,
+
169  ADC12_A_MEMORY_0);
+
170 
+
171  //Increment results index, modulo;
+
172  //Set Breakpoint1 here and watch results[]
+
173  index++;
+
174 
+
175  if (index == 8){
+
176  index = 0;
+
177  }
+
178  case 8: break; //Vector 8: ADC12IFG1
+
179  case 10: break; //Vector 10: ADC12IFG2
+
180  case 12: break; //Vector 12: ADC12IFG3
+
181  case 14: break; //Vector 14: ADC12IFG4
+
182  case 16: break; //Vector 16: ADC12IFG5
+
183  case 18: break; //Vector 18: ADC12IFG6
+
184  case 20: break; //Vector 20: ADC12IFG7
+
185  case 22: break; //Vector 22: ADC12IFG8
+
186  case 24: break; //Vector 24: ADC12IFG9
+
187  case 26: break; //Vector 26: ADC12IFG10
+
188  case 28: break; //Vector 28: ADC12IFG11
+
189  case 30: break; //Vector 30: ADC12IFG12
+
190  case 32: break; //Vector 32: ADC12IFG13
+
191  case 34: break; //Vector 34: ADC12IFG14
+
192  default: break;
+
193  }
+
194 }
+
MPU_initThreeSegmentsParam param
+
volatile uint16_t results[Num_of_Results]
+
void main(void)
+
#define Num_of_Results
+
void ADC12ISR(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__a__ex6__extended_inputs_8c.html b/Generated Documentation/html/adc12__a__ex6__extended_inputs_8c.html new file mode 100644 index 0000000..f3db88b --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex6__extended_inputs_8c.html @@ -0,0 +1,206 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc12_a/adc12_a_ex6_extendedInputs.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc12_a_ex6_extendedInputs.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void ADC12ISR (void)
 
+ + + +

+Variables

volatile uint16_t results [2]
 
+

Function Documentation

+ +

◆ ADC12ISR()

+ +
+
+ + + + + + + + +
void ADC12ISR (void )
+
+ +

Definition at line 177 of file adc12_a_ex6_extendedInputs.c.

+ +

References __bic_SR_register_on_exit(), and results.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 83 of file adc12_a_ex6_extendedInputs.c.

+ +

References __no_operation().

+ +
+
+

Variable Documentation

+ +

◆ results

+ +
+
+ + + + +
volatile uint16_t results[2]
+
+

ADC12_A - Sample A8 & A9 as Inputs, AVcc Ref

+

This example shows how to perform A/D conversion on up to 10 external channels by showing that channels A8 and A9 can be used for conversion of external signals when not using these channels as external reference inputs. A single sequence of conversions is performed - one conversion on A8 and then one conversion on A9. Each conversion uses AVcc and AVss for the references. The conversion results are stored in ADC12MEM0 and ADC12MEM1 respectively and are moved to 'results[]' upon completion of the sequence. Test by applying voltages to pins VeREF+ for A8 and VREF-/VeREF- for A9, then setting and running to a break point at the "_BIC..." instruction in the ISR. To view the conversion results, open a watch window in debugger and view 'results' or view ADC12MEM0 and ADC12MEM1 in an ADC12_A SFR window. This can run even in LPM4 mode as ADC has its own clock

+

NOTE: When using channels A8 and A9 for external signals, internal references must be used for the conversions. Refer to figure 18-1 in the MSP430x5xx Family User's Guide.

          MSP430F552x
+       -----------------
+   /|\|                 |
+    | |                 |
+    --|RST     A8/VeREF+|<- Vin1
+      |  A9/VREF-/VeREF-|<- Vin2
+      |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC12_A peripheral
  • +
  • GPIO Port peripheral
  • +
  • A8/VeREF+
  • +
  • A9/VREF-/VeREF-
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • ADC12_A_VECTOR
  • +
+ +

Definition at line 81 of file adc12_a_ex6_extendedInputs.c.

+ +

Referenced by ADC12ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__a__ex6__extended_inputs_8c.js b/Generated Documentation/html/adc12__a__ex6__extended_inputs_8c.js new file mode 100644 index 0000000..0991777 --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex6__extended_inputs_8c.js @@ -0,0 +1,6 @@ +var adc12__a__ex6__extended_inputs_8c = +[ + [ "ADC12ISR", "adc12__a__ex6__extended_inputs_8c.html#ae0194f6cfda5bea946ec788350bcc32c", null ], + [ "main", "adc12__a__ex6__extended_inputs_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "results", "adc12__a__ex6__extended_inputs_8c.html#a7448104efdc64cc0e1eae999acb2a7b6", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc12__a__ex6__extended_inputs_8c_source.html b/Generated Documentation/html/adc12__a__ex6__extended_inputs_8c_source.html new file mode 100644 index 0000000..161fa1a --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex6__extended_inputs_8c_source.html @@ -0,0 +1,283 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc12_a/adc12_a_ex6_extendedInputs.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc12_a_ex6_extendedInputs.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
76 //******************************************************************************
+
77 
+
78 //Needs to be global in this example
+
79 //Otherwise, the compiler removes it
+
80 //because it is not used for anything.
+
81 volatile uint16_t results[2];
+
82 
+
83 void main (void)
+
84 {
+
85  //Stop Watchdog Timer
+
86  WDT_A_hold(WDT_A_BASE);
+
87 
+
88  //Initialize the ADC12_A Module
+
89  /*
+
90  * Base address of ADC12_A Module
+
91  * Use internal ADC12_A bit as sample/hold signal to start conversion
+
92  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
93  * Use default clock divider of 1
+
94  */
+
95  ADC12_A_init(ADC12_A_BASE,
+
96  ADC12_A_SAMPLEHOLDSOURCE_SC,
+
97  ADC12_A_CLOCKSOURCE_ADC12OSC,
+
98  ADC12_A_CLOCKDIVIDER_1);
+
99 
+
100  ADC12_A_enable(ADC12_A_BASE);
+
101 
+
102  /*
+
103  * Base address of ADC12_A Module
+
104  * For memory buffers 0-7 sample/hold for 1024 clock cycles
+
105  * For memory buffers 8-15 sample/hold for 4 clock cycles (default)
+
106  * Enable Multiple Sampling
+
107  */
+
108  ADC12_A_setupSamplingTimer(ADC12_A_BASE,
+
109  ADC12_A_CYCLEHOLD_1024_CYCLES,
+
110  ADC12_A_CYCLEHOLD_4_CYCLES,
+
111  ADC12_A_MULTIPLESAMPLESENABLE);
+
112 
+
113  //Configure Memory Buffers
+
114  /*
+
115  * Base address of the ADC12_A Module
+
116  * Configure memory buffer 0
+
117  * Map input A8 to memory buffer 0
+
118  * Vref+ = AVcc
+
119  * Vref- = AVss
+
120  * Memory buffer 0 is not the end of a sequence
+
121  */
+
122  ADC12_A_configureMemoryParam param0 = {0};
+
123  param0.memoryBufferControlIndex = ADC12_A_MEMORY_0;
+
124  param0.inputSourceSelect = ADC12_A_INPUT_A8;
+
125  param0.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
+
126  param0.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
+
127  param0.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;
+
128  ADC12_A_configureMemory(ADC12_A_BASE ,&param0);
+
129 
+
130  /*
+
131  * Base address of the ADC12_A Module
+
132  * Configure memory buffer 1
+
133  * Map input A9 to memory buffer 1
+
134  * Vref+ = AVcc
+
135  * Vref- = AVss
+
136  * Memory buffer 1 is not the end of a sequence
+
137  */
+
138  ADC12_A_configureMemoryParam param1 = {0};
+
139  param1.memoryBufferControlIndex = ADC12_A_MEMORY_1;
+
140  param1.inputSourceSelect = ADC12_A_INPUT_A9;
+
141  param1.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
+
142  param1.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
+
143  param1.endOfSequence = ADC12_A_ENDOFSEQUENCE;
+
144  ADC12_A_configureMemory(ADC12_A_BASE ,&param1);
+
145 
+
146  //Enable memory buffer 1 interrupt
+
147  ADC12_A_enableInterrupt(ADC12_A_BASE,
+
148  ADC12IFG1);
+
149  ADC12_A_enableInterrupt(ADC12_A_BASE,
+
150  ADC12IE1);
+
151 
+
152  while (1)
+
153  {
+
154  //Enable/Start sampling and conversion
+
155  /*
+
156  * Base address of ADC12_A Module
+
157  * Start the conversion into memory buffer 0
+
158  * Use the sequence of channels
+
159  */
+
160  ADC12_A_startConversion(ADC12_A_BASE,
+
161  ADC12_A_MEMORY_0,
+
162  ADC12_A_SEQOFCHANNELS);
+
163 
+
164  //Enter LPM4, Enable interrupts
+
165  __bis_SR_register(LPM4_bits + GIE);
+
166  //For debugger
+
167  __no_operation();
+
168  }
+
169 }
+
170 
+
171 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
172 #pragma vector=ADC12_VECTOR
+
173 __interrupt
+
174 #elif defined(__GNUC__)
+
175 __attribute__((interrupt(ADC12_VECTOR)))
+
176 #endif
+
177 void ADC12ISR (void)
+
178 {
+
179  switch (__even_in_range(ADC12IV,34)){
+
180  case 0: break; //Vector 0: No interrupt
+
181  case 2: break; //Vector 2: ADC overflow
+
182  case 4: break; //Vector 4: ADC timing overflow
+
183  case 6: break; //Vector 6: ADC12IFG0
+
184  case 8: //Vector 8: ADC12IFG1
+
185  //Move results, IFG is cleared
+
186  results[0] =
+
187  ADC12_A_getResults(ADC12_A_BASE,
+
188  ADC12_A_MEMORY_0);
+
189  //Move results, IFG is cleared
+
190  results[1] =
+
191  ADC12_A_getResults(ADC12_A_BASE,
+
192  ADC12_A_MEMORY_1);
+
193 
+
194  //Exit active CPU,
+
195  //SET BREAKPOINT HERE and watch results[]
+
196  __bic_SR_register_on_exit(LPM4_bits);
+
197  case 10: break; //Vector 10: ADC12IFG2
+
198  case 12: break; //Vector 12: ADC12IFG3
+
199  case 14: break; //Vector 14: ADC12IFG4
+
200  case 16: break; //Vector 16: ADC12IFG5
+
201  case 18: break; //Vector 18: ADC12IFG6
+
202  case 20: break; //Vector 20: ADC12IFG7
+
203  case 22: break; //Vector 22: ADC12IFG8
+
204  case 24: break; //Vector 24: ADC12IFG9
+
205  case 26: break; //Vector 26: ADC12IFG10
+
206  case 28: break; //Vector 28: ADC12IFG11
+
207  case 30: break; //Vector 30: ADC12IFG12
+
208  case 32: break; //Vector 32: ADC12IFG13
+
209  case 34: break; //Vector 34: ADC12IFG14
+
210  default: break;
+
211  }
+
212 }
+
213 
+
void main(void)
+
volatile uint16_t results[2]
+
void ADC12ISR(void)
+ +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__a__ex7__sequence_8c.html b/Generated Documentation/html/adc12__a__ex7__sequence_8c.html new file mode 100644 index 0000000..609930c --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex7__sequence_8c.html @@ -0,0 +1,208 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc12_a/adc12_a_ex7_sequence.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc12_a_ex7_sequence.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void ADC12ISR (void)
 
+ + + +

+Variables

volatile uint16_t results [4]
 
+

Function Documentation

+ +

◆ ADC12ISR()

+ +
+
+ + + + + + + + +
void ADC12ISR (void )
+
+ +

Definition at line 217 of file adc12_a_ex7_sequence.c.

+ +

References __bic_SR_register_on_exit(), and results.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 84 of file adc12_a_ex7_sequence.c.

+ +

References __no_operation().

+ +
+
+

Variable Documentation

+ +

◆ results

+ +
+
+ + + + +
volatile uint16_t results[4]
+
+

ADC12_A - Sample A0-3 Input, AVcc Ref, Non-Repeated Sequence of Conversions

+

This example shows how to perform A/D conversions on a sequence of channels. A single sequence of conversions is performed - one conversion each on channels A0, A1, A2, and A3. Each conversion uses AVcc and AVss for the references. The conversion results are stored in ADC12MEM0, ADC12MEM1, ADC12MEM2, and ADC12MEM3 respectively and are moved to 'results[]' upon completion of the sequence. Test by applying voltages to pins A0, A1, A2, and A3, then setting and running to a break point at the "_BIC..." instruction in the ISR. To view the conversion results, open a watch window in debugger and view 'results' or view ADC12MEM0, ADC12MEM1, ADC12MEM2, and ADC12MEM3 in an ADC12_A SFR window. This can run even in LPM4 mode as ADC has its own clock Note that a sequence has no restrictions on which channels are converted. For example, a valid sequence could be A0, A3, A2, A4, A2, A1, A0, and A7. See the MSP430x5xx User's Guide for instructions on using the ADC12_A.

          MSP430F552x
+       -----------------
+   /|\|                 |
+    | |          P6.0/A0|<- Vin0
+    --|RST       P6.1/A1|<- Vin1
+      |          P6.2/A2|<- Vin2
+      |          P6.3/A3|<- Vin3
+      |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC12_A peripheral
  • +
  • GPIO Port peripheral
  • +
  • A0
  • +
  • A1
  • +
  • A2
  • +
  • A3
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • ADC12_A_VECTOR
  • +
+ +

Definition at line 82 of file adc12_a_ex7_sequence.c.

+ +

Referenced by ADC12ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__a__ex7__sequence_8c.js b/Generated Documentation/html/adc12__a__ex7__sequence_8c.js new file mode 100644 index 0000000..1351ae3 --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex7__sequence_8c.js @@ -0,0 +1,6 @@ +var adc12__a__ex7__sequence_8c = +[ + [ "ADC12ISR", "adc12__a__ex7__sequence_8c.html#ae0194f6cfda5bea946ec788350bcc32c", null ], + [ "main", "adc12__a__ex7__sequence_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "results", "adc12__a__ex7__sequence_8c.html#aed9f0e3cb68df9b5f0f8300ef3538f99", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc12__a__ex7__sequence_8c_source.html b/Generated Documentation/html/adc12__a__ex7__sequence_8c_source.html new file mode 100644 index 0000000..8b0d7a2 --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex7__sequence_8c_source.html @@ -0,0 +1,328 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc12_a/adc12_a_ex7_sequence.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc12_a_ex7_sequence.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
75 //******************************************************************************
+
76 
+
77 #include "driverlib.h"
+
78 
+
79 //Needs to be global in this example
+
80 //Otherwise, the compiler removes it
+
81 //because it is not used for anything.
+
82 volatile uint16_t results[4];
+
83 
+
84 void main (void)
+
85 {
+
86  //Stop Watchdog Timer
+
87  WDT_A_hold(WDT_A_BASE);
+
88 
+
89  //Enable A/D channel inputs
+
90  GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P6,
+
91  GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN2 +
+
92  GPIO_PIN3 + GPIO_PIN4 + GPIO_PIN5 +
+
93  GPIO_PIN6 + GPIO_PIN7
+
94  );
+
95 
+
96  //Initialize the ADC12_A Module
+
97  /*
+
98  * Base address of ADC12_A Module
+
99  * Use internal ADC12_A bit as sample/hold signal to start conversion
+
100  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
101  * Use default clock divider of 1
+
102  */
+
103  ADC12_A_init(ADC12_A_BASE,
+
104  ADC12_A_SAMPLEHOLDSOURCE_SC,
+
105  ADC12_A_CLOCKSOURCE_ADC12OSC,
+
106  ADC12_A_CLOCKDIVIDER_1);
+
107 
+
108  ADC12_A_enable(ADC12_A_BASE);
+
109 
+
110  /*
+
111  * Base address of ADC12_A Module
+
112  * For memory buffers 0-7 sample/hold for 16 clock cycles
+
113  * For memory buffers 8-15 sample/hold for 4 clock cycles (default)
+
114  * Enable Multiple Sampling
+
115  */
+
116  ADC12_A_setupSamplingTimer(ADC12_A_BASE,
+
117  ADC12_A_CYCLEHOLD_16_CYCLES,
+
118  ADC12_A_CYCLEHOLD_4_CYCLES,
+
119  ADC12_A_MULTIPLESAMPLESENABLE);
+
120 
+
121  //Configure Memory Buffers
+
122  /*
+
123  * Base address of the ADC12_A Module
+
124  * Configure memory buffer 0
+
125  * Map input A0 to memory buffer 0
+
126  * Vref+ = AVcc
+
127  * Vref- = AVss
+
128  * Memory buffer 0 is not the end of a sequence
+
129  */
+
130  ADC12_A_configureMemoryParam param0 = {0};
+
131  param0.memoryBufferControlIndex = ADC12_A_MEMORY_0;
+
132  param0.inputSourceSelect = ADC12_A_INPUT_A0;
+
133  param0.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
+
134  param0.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
+
135  param0.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;
+
136  ADC12_A_configureMemory(ADC12_A_BASE ,&param0);
+
137 
+
138  /*
+
139  * Base address of the ADC12_A Module
+
140  * Configure memory buffer 1
+
141  * Map input A1 to memory buffer 1
+
142  * Vref+ = AVcc
+
143  * Vref- = AVss
+
144  * Memory buffer 1 is not the end of a sequence
+
145  */
+
146  ADC12_A_configureMemoryParam param1 = {0};
+
147  param1.memoryBufferControlIndex = ADC12_A_MEMORY_1;
+
148  param1.inputSourceSelect = ADC12_A_INPUT_A1;
+
149  param1.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
+
150  param1.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
+
151  param1.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;
+
152  ADC12_A_configureMemory(ADC12_A_BASE ,&param1);
+
153 
+
154  /*
+
155  * Base address of the ADC12_A Module
+
156  * Configure memory buffer 2
+
157  * Map input A2 to memory buffer 2
+
158  * Vref+ = AVcc
+
159  * Vref- = AVss
+
160  * Memory buffer 2 is not the end of a sequence
+
161  */
+
162  ADC12_A_configureMemoryParam param2 = {0};
+
163  param2.memoryBufferControlIndex = ADC12_A_MEMORY_2;
+
164  param2.inputSourceSelect = ADC12_A_INPUT_A2;
+
165  param2.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
+
166  param2.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
+
167  param2.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;
+
168  ADC12_A_configureMemory(ADC12_A_BASE ,&param2);
+
169 
+
170  /*
+
171  * Base address of the ADC12_A Module
+
172  * Configure memory buffer 3
+
173  * Map input A3 to memory buffer 3
+
174  * Vr+ = AVcc
+
175  * Vr- = AVss
+
176  * Memory buffer 3 IS the end of a sequence
+
177  */
+
178  ADC12_A_configureMemoryParam param3 = {0};
+
179  param3.memoryBufferControlIndex = ADC12_A_MEMORY_3;
+
180  param3.inputSourceSelect = ADC12_A_INPUT_A3;
+
181  param3.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
+
182  param3.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
+
183  param3.endOfSequence = ADC12_A_ENDOFSEQUENCE;
+
184  ADC12_A_configureMemory(ADC12_A_BASE ,&param3);
+
185 
+
186  //Enable memory buffer 3 interrupt
+
187  ADC12_A_clearInterrupt(ADC12_A_BASE,
+
188  ADC12IE3);
+
189  ADC12_A_enableInterrupt(ADC12_A_BASE,
+
190  ADC12IE3);
+
191 
+
192  while (1)
+
193  {
+
194  //Enable/Start first sampling and conversion cycle
+
195  /*
+
196  * Base address of ADC12_A Module
+
197  * Start the conversion into memory buffer 0
+
198  * Use the repeated sequence of channels
+
199  */
+
200  ADC12_A_startConversion(ADC12_A_BASE,
+
201  ADC12_A_MEMORY_0,
+
202  ADC12_A_SEQOFCHANNELS);
+
203 
+
204  //Enter LPM4, Enable interrupts
+
205  __bis_SR_register(LPM4_bits + GIE);
+
206  //For debugger
+
207  __no_operation();
+
208  }
+
209 }
+
210 
+
211 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
212 #pragma vector=ADC12_VECTOR
+
213 __interrupt
+
214 #elif defined(__GNUC__)
+
215 __attribute__((interrupt(ADC12_VECTOR)))
+
216 #endif
+
217 void ADC12ISR (void)
+
218 {
+
219  switch (__even_in_range(ADC12IV,34)){
+
220  case 0: break; //Vector 0: No interrupt
+
221  case 2: break; //Vector 2: ADC overflow
+
222  case 4: break; //Vector 4: ADC timing overflow
+
223  case 6: break; //Vector 6: ADC12IFG0
+
224  case 8: break; //Vector 8: ADC12IFG1
+
225  case 10: break; //Vector 10: ADC12IFG2
+
226  case 12: //Vector 12: ADC12IFG3
+
227  //Move results, IFG is cleared
+
228  results[0] =
+
229  ADC12_A_getResults(ADC12_A_BASE,
+
230  ADC12_A_MEMORY_0);
+
231  //Move results, IFG is cleared
+
232  results[1] =
+
233  ADC12_A_getResults(ADC12_A_BASE,
+
234  ADC12_A_MEMORY_1);
+
235  //Move results, IFG is cleared
+
236  results[2] =
+
237  ADC12_A_getResults(ADC12_A_BASE,
+
238  ADC12_A_MEMORY_2);
+
239  //Move results, IFG is cleared
+
240  results[3] =
+
241  ADC12_A_getResults(ADC12_A_BASE,
+
242  ADC12_A_MEMORY_3);
+
243 
+
244  //Exit active CPU, SET BREAKPOINT HERE
+
245  __bic_SR_register_on_exit(LPM4_bits);
+
246  case 14: break; //Vector 14: ADC12IFG4
+
247  case 16: break; //Vector 16: ADC12IFG5
+
248  case 18: break; //Vector 18: ADC12IFG6
+
249  case 20: break; //Vector 20: ADC12IFG7
+
250  case 22: break; //Vector 22: ADC12IFG8
+
251  case 24: break; //Vector 24: ADC12IFG9
+
252  case 26: break; //Vector 26: ADC12IFG10
+
253  case 28: break; //Vector 28: ADC12IFG11
+
254  case 30: break; //Vector 30: ADC12IFG12
+
255  case 32: break; //Vector 32: ADC12IFG13
+
256  case 34: break; //Vector 34: ADC12IFG14
+
257  default: break;
+
258  }
+
259 }
+
void main(void)
+
void ADC12ISR(void)
+
volatile uint16_t results[4]
+ +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__a__ex8__temp_sensor_8c.html b/Generated Documentation/html/adc12__a__ex8__temp_sensor_8c.html new file mode 100644 index 0000000..0a89f9b --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex8__temp_sensor_8c.html @@ -0,0 +1,244 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc12_a/adc12_a_ex8_tempSensor.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc12_a_ex8_tempSensor.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void ADC12ISR (void)
 
+ + + + + + + +

+Variables

long temp
 
volatile long IntDegF
 
volatile long IntDegC
 
+

Function Documentation

+ +

◆ ADC12ISR()

+ +
+
+ + + + + + + + +
void ADC12ISR (void )
+
+ +

Definition at line 183 of file adc12_a_ex8_tempSensor.c.

+ +

References __bic_SR_register_on_exit(), and temp.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 74 of file adc12_a_ex8_tempSensor.c.

+ +

References __delay_cycles(), __no_operation(), IntDegC, IntDegF, param, and temp.

+ +
+
+

Variable Documentation

+ +

◆ IntDegC

+ +
+
+ + + + +
volatile long IntDegC
+
+ +

Definition at line 72 of file adc12_a_ex8_tempSensor.c.

+ +

Referenced by main().

+ +
+
+ +

◆ IntDegF

+ +
+
+ + + + +
volatile long IntDegF
+
+ +

Definition at line 71 of file adc12_a_ex8_tempSensor.c.

+ +

Referenced by main().

+ +
+
+ +

◆ temp

+ +
+
+ + + + +
long temp
+
+

ADC12_A - Sample A10 Internal Temp Sensor as Input, AVcc Ref

+

A single sample is made on A10 with reference to internal 1.5V Vref. Software sets ADC12SC to start sample and conversion - ADC12SC automatically cleared at EOC. ADC12_A internal oscillator times sample and conversion. In Mainloop MSP430 waits in LPM4 to save power until ADC10_A conversion complete, ADC12_A_ISR will force exit from any LPMx in Mainloop on reti. ACLK = n/a, MCLK = SMCLK = default DCO ~ 1.045MHz, ADC12CLK = ADC12OSC

+

Uncalibrated temperature measured from device to device will vary do to slope and offset variance from device to device - please see datasheet.

          MSP430F5529
+       -----------------
+   /|\|                 |
+    | |                 |
+    --|RST              |
+      |Temp Sensor-->A10|
+      |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC12_A peripheral
  • +
  • A10
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • ADC12_A_VECTOR
  • +
+ +

Definition at line 70 of file adc12_a_ex8_tempSensor.c.

+ +

Referenced by ADC12ISR(), main(), and TIMER_A().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__a__ex8__temp_sensor_8c.js b/Generated Documentation/html/adc12__a__ex8__temp_sensor_8c.js new file mode 100644 index 0000000..1166409 --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex8__temp_sensor_8c.js @@ -0,0 +1,8 @@ +var adc12__a__ex8__temp_sensor_8c = +[ + [ "ADC12ISR", "adc12__a__ex8__temp_sensor_8c.html#ae0194f6cfda5bea946ec788350bcc32c", null ], + [ "main", "adc12__a__ex8__temp_sensor_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "IntDegC", "adc12__a__ex8__temp_sensor_8c.html#ac3dd4fad805ca2ed8552fa7390b12a23", null ], + [ "IntDegF", "adc12__a__ex8__temp_sensor_8c.html#ac62384b76dcc0fbfc648222dc1f8a162", null ], + [ "temp", "adc12__a__ex8__temp_sensor_8c.html#aaeb2e3fad6740eb2ca46ca8207cc286e", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc12__a__ex8__temp_sensor_8c_source.html b/Generated Documentation/html/adc12__a__ex8__temp_sensor_8c_source.html new file mode 100644 index 0000000..f3cfee2 --- /dev/null +++ b/Generated Documentation/html/adc12__a__ex8__temp_sensor_8c_source.html @@ -0,0 +1,296 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/adc12_a/adc12_a_ex8_tempSensor.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc12_a_ex8_tempSensor.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
68 //******************************************************************************
+
69 
+
70 long temp;
+
71 volatile long IntDegF;
+
72 volatile long IntDegC;
+
73 
+
74 void main (void)
+
75 {
+
76  //Stop Watchdog Timer
+
77  WDT_A_hold(WDT_A_BASE);
+
78 
+
79  //Initialize the ADC12_A Module
+
80  /*
+
81  * Base Address of ADC12_A Module
+
82  * Use internal ADC12_A bit as sample/hold signal to start conversion
+
83  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
84  * Use default clock divider of 1
+
85  */
+
86  ADC12_A_init(ADC12_A_BASE,
+
87  ADC12_A_SAMPLEHOLDSOURCE_SC,
+
88  ADC12_A_CLOCKSOURCE_ADC12OSC,
+
89  ADC12_A_CLOCKDIVIDER_1);
+
90 
+
91  ADC12_A_enable(ADC12_A_BASE);
+
92 
+
93  ADC12_A_enable(ADC12_A_BASE);
+
94 
+
95  /*
+
96  * Base Address of ADC12_A Module
+
97  * For memory buffers 0-7 sample/hold for 768 clock cycles
+
98  * For memory buffers 8-15 sample/hold for 4 clock cycles (default)
+
99  * Disable Multiple Sampling
+
100  *
+
101  * Note: ADC12_A may have a minimum sample rate of 30us or 100us.
+
102  * This example uses a sample time of ~154us to ensure it works.
+
103  * 256 cycles (51.2us) or 512 cycles (100.4us) may be used, but
+
104  * resulting readings may be less accurate.
+
105  */
+
106  ADC12_A_setupSamplingTimer(ADC12_A_BASE,
+
107  ADC12_A_CYCLEHOLD_768_CYCLES,
+
108  ADC12_A_CYCLEHOLD_4_CYCLES,
+
109  ADC12_A_MULTIPLESAMPLESDISABLE);
+
110 
+
111  //Configure Memory Buffer
+
112  /*
+
113  * Base Addres of ADC12_A Module
+
114  * Configure memory buffer 0
+
115  * Map temp sensor to memory buffer 0
+
116  * Vref+ = Vref+ (int)
+
117  * Vref- = AVss
+
118  * Memory buffer 0 is not the end of a sequence
+
119  */
+
120  ADC12_A_configureMemoryParam param = {0};
+
121  param.memoryBufferControlIndex = ADC12_A_MEMORY_0;
+
122  param.inputSourceSelect = ADC12_A_INPUT_TEMPSENSOR;
+
123  param.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_INT;
+
124  param.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
+
125  param.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;
+
126  ADC12_A_configureMemory(ADC12_A_BASE ,&param);
+
127 
+
128  //Enable memory buffer 0 interrupt
+
129  ADC12_A_clearInterrupt(ADC12_A_BASE,
+
130  ADC12IFG0);
+
131  ADC12_A_enableInterrupt(ADC12_A_BASE,
+
132  ADC12IE0);
+
133 
+
134  //Configure internal reference
+
135  //If ref generator busy, WAIT
+
136  while ( REF_ACTIVE == Ref_isRefGenBusy(REF_BASE) ) ;
+
137  //Select internal ref = 1.5V
+
138  Ref_setReferenceVoltage(REF_BASE,
+
139  REF_VREF1_5V);
+
140  //Internal Reference ON
+
141  Ref_enableReferenceVoltage(REF_BASE);
+
142 
+
143  //Delay (~75us) for Ref to settle
+
144  __delay_cycles(75);
+
145 
+
146  while (1)
+
147  {
+
148  //Enable/Start first sampling and conversion cycle
+
149  /*
+
150  * Base address of ADC12_A Module
+
151  * Start the conversion into memory buffer 0
+
152  * Use the repeated sequence of channels
+
153  */
+
154  ADC12_A_startConversion(ADC12_A_BASE,
+
155  ADC12_A_MEMORY_0,
+
156  ADC12_A_SEQOFCHANNELS);
+
157 
+
158  //LPM4 with interrupts enabled
+
159  __bis_SR_register(LPM4_bits + GIE);
+
160  __no_operation();
+
161 
+
162  //Temperature in Celsius
+
163  //((A10/4096*1500mV) - 680mV)*(1/2.25mV) = (A10/4096*667) - 302
+
164  //= (A10 - 1855) * (667 / 4096)
+
165  IntDegC = ((temp - 1855) * 667) / 4096;
+
166 
+
167  //Temperature in Fahrenheit
+
168  //((A10/4096*1500mV) - 640mV)*(1/1.25mV) = (A10/4096*1200) - 512
+
169  //= (A10 - 1748) * (1200 / 4096)
+
170  IntDegF = ((temp - 1748) * 1200) / 4096;
+
171 
+
172  //SET BREAKPOINT HERE and watch IntDegC and IntDegF
+
173  __no_operation();
+
174  }
+
175 }
+
176 
+
177 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
178 #pragma vector=ADC12_VECTOR
+
179 __interrupt
+
180 #elif defined(__GNUC__)
+
181 __attribute__((interrupt(ADC12_VECTOR)))
+
182 #endif
+
183 void ADC12ISR (void)
+
184 {
+
185  switch (__even_in_range(ADC12IV,34)){
+
186  case 0: break; //Vector 0: No interrupt
+
187  case 2: break; //Vector 2: ADC overflow
+
188  case 4: break; //Vector 4: ADC timing overflow
+
189  case 6: //Vector 6: ADC12IFG0
+
190  //Move results, IFG is cleared
+
191  temp = ADC12_A_getResults(ADC12_A_BASE,
+
192  ADC12_A_MEMORY_0);
+
193 
+
194  //Exit active CPU
+
195  __bic_SR_register_on_exit(LPM4_bits);
+
196  break;
+
197  case 8: break; //Vector 8: ADC12IFG1
+
198  case 10: break; //Vector 10: ADC12IFG2
+
199  case 12: break; //Vector 12: ADC12IFG3
+
200  case 14: break; //Vector 14: ADC12IFG4
+
201  case 16: break; //Vector 16: ADC12IFG5
+
202  case 18: break; //Vector 18: ADC12IFG6
+
203  case 20: break; //Vector 20: ADC12IFG7
+
204  case 22: break; //Vector 22: ADC12IFG8
+
205  case 24: break; //Vector 24: ADC12IFG9
+
206  case 26: break; //Vector 26: ADC12IFG10
+
207  case 28: break; //Vector 28: ADC12IFG11
+
208  case 30: break; //Vector 30: ADC12IFG12
+
209  case 32: break; //Vector 32: ADC12IFG13
+
210  case 34: break; //Vector 34: ADC12IFG14
+
211  default: break;
+
212  }
+
213 }
+
214 
+
MPU_initThreeSegmentsParam param
+
void main(void)
+
long temp
+
volatile long IntDegC
+
volatile long IntDegF
+
void ADC12ISR(void)
+ +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__b__ex1__avcc_ref_8c.html b/Generated Documentation/html/adc12__b__ex1__avcc_ref_8c.html new file mode 100644 index 0000000..fc29078 --- /dev/null +++ b/Generated Documentation/html/adc12__b__ex1__avcc_ref_8c.html @@ -0,0 +1,163 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/adc12_b/adc12_b_ex1_avccRef.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc12_b_ex1_avccRef.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void ADC12_ISR (void)
 
+

Function Documentation

+ +

◆ ADC12_ISR()

+ +
+
+ + + + + + + + +
void ADC12_ISR (void )
+
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 55 of file adc12_b_ex1_avccRef.c.

+ +

References __delay_cycles(), __no_operation(), and GPIO_setOutputLowOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__b__ex1__avcc_ref_8c.js b/Generated Documentation/html/adc12__b__ex1__avcc_ref_8c.js new file mode 100644 index 0000000..2cd03c2 --- /dev/null +++ b/Generated Documentation/html/adc12__b__ex1__avcc_ref_8c.js @@ -0,0 +1,5 @@ +var adc12__b__ex1__avcc_ref_8c = +[ + [ "ADC12_ISR", "adc12__b__ex1__avcc_ref_8c.html#a71ae1ee8921a88b884941fc4b87bc5ef", null ], + [ "main", "adc12__b__ex1__avcc_ref_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc12__b__ex1__avcc_ref_8c_source.html b/Generated Documentation/html/adc12__b__ex1__avcc_ref_8c_source.html new file mode 100644 index 0000000..cae20a6 --- /dev/null +++ b/Generated Documentation/html/adc12__b__ex1__avcc_ref_8c_source.html @@ -0,0 +1,371 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/adc12_b/adc12_b_ex1_avccRef.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc12_b_ex1_avccRef.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR59xx Demo - ADC12B, Sample A1, AVcc Ref, Set P1.0 if A1 > 0.5*AVcc
+
34 //
+
35 // Description: A single sample is made on A1 with reference to AVcc.
+
36 // Software sets ADC12BSC to start sample and conversion - ADC12BSC
+
37 // automatically cleared at EOC. ADC12B internal oscillator times sample (16x)
+
38 // and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC12B
+
39 // conversion complete, ADC12_B_ISR will force exit from LPM0 in Mainloop on
+
40 // reti. If A0 > 0.5*AVcc, P1.0 set, else reset. The full, correct handling of
+
41 // and ADC12B interrupt is shown as well.
+
42 //
+
43 //
+
44 // MSP430FR5969
+
45 // -----------------
+
46 // /|\| XIN|-
+
47 // | | |
+
48 // --|RST XOUT|-
+
49 // | |
+
50 // >---|P1.1/A1 P1.0|-->LED
+
51 //
+
52 //******************************************************************************
+
53 #include "driverlib.h"
+
54 
+
55 void main(void)
+
56 {
+
57  // Stop WDT
+
58  WDT_A_hold(WDT_A_BASE);
+
59 
+
60  //Set P1.0 as an output pin.
+
61  /*
+
62 
+
63  * Select Port 1
+
64  * Set Pin 0 as output
+
65  */
+
66  GPIO_setAsOutputPin(
+
67  GPIO_PORT_P1,
+
68  GPIO_PIN0
+
69  );
+
70 
+
71  //Set P1.0 as Output Low.
+
72  /*
+
73 
+
74  * Select Port 1
+
75  * Set Pin 0 to output Low.
+
76  */
+ +
78  GPIO_PORT_P1,
+
79  GPIO_PIN0
+
80  );
+
81  //Set P1.1 as Ternary Module Function Output.
+
82  /*
+
83 
+
84  * Select Port 1
+
85  * Set Pin 1 to output Ternary Module Function, (A1, C1, VREF+, VeREF+).
+
86  */
+
87  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
88  GPIO_PORT_P1,
+
89  GPIO_PIN1,
+
90  GPIO_TERNARY_MODULE_FUNCTION
+
91  );
+
92 
+
93  /*
+
94  * Disable the GPIO power-on default high-impedance mode to activate
+
95  * previously configured port settings
+
96  */
+
97  PMM_unlockLPM5();
+
98 
+
99  //Initialize the ADC12B Module
+
100  /*
+
101  * Base address of ADC12B Module
+
102  * Use internal ADC12B bit as sample/hold signal to start conversion
+
103  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
104  * Use default clock divider/pre-divider of 1
+
105  * Not use internal channel
+
106  */
+
107  ADC12_B_initParam initParam = {0};
+
108  initParam.sampleHoldSignalSourceSelect = ADC12_B_SAMPLEHOLDSOURCE_SC;
+
109  initParam.clockSourceSelect = ADC12_B_CLOCKSOURCE_ADC12OSC;
+
110  initParam.clockSourceDivider = ADC12_B_CLOCKDIVIDER_1;
+
111  initParam.clockSourcePredivider = ADC12_B_CLOCKPREDIVIDER__1;
+
112  initParam.internalChannelMap = ADC12_B_NOINTCH;
+
113  ADC12_B_init(ADC12_B_BASE, &initParam);
+
114 
+
115  //Enable the ADC12B module
+
116  ADC12_B_enable(ADC12_B_BASE);
+
117 
+
118  /*
+
119  * Base address of ADC12B Module
+
120  * For memory buffers 0-7 sample/hold for 64 clock cycles
+
121  * For memory buffers 8-15 sample/hold for 4 clock cycles (default)
+
122  * Disable Multiple Sampling
+
123  */
+
124  ADC12_B_setupSamplingTimer(ADC12_B_BASE,
+
125  ADC12_B_CYCLEHOLD_16_CYCLES,
+
126  ADC12_B_CYCLEHOLD_4_CYCLES,
+
127  ADC12_B_MULTIPLESAMPLESDISABLE);
+
128 
+
129  //Configure Memory Buffer
+
130  /*
+
131  * Base address of the ADC12B Module
+
132  * Configure memory buffer 0
+
133  * Map input A1 to memory buffer 0
+
134  * Vref+ = AVcc
+
135  * Vref- = AVss
+
136  * Memory buffer 0 is not the end of a sequence
+
137  */
+
138  ADC12_B_configureMemoryParam configureMemoryParam = {0};
+
139  configureMemoryParam.memoryBufferControlIndex = ADC12_B_MEMORY_0;
+
140  configureMemoryParam.inputSourceSelect = ADC12_B_INPUT_A1;
+
141  configureMemoryParam.refVoltageSourceSelect = ADC12_B_VREFPOS_AVCC_VREFNEG_VSS;
+
142  configureMemoryParam.endOfSequence = ADC12_B_NOTENDOFSEQUENCE;
+
143  configureMemoryParam.windowComparatorSelect = ADC12_B_WINDOW_COMPARATOR_DISABLE;
+
144  configureMemoryParam.differentialModeSelect = ADC12_B_DIFFERENTIAL_MODE_DISABLE;
+
145  ADC12_B_configureMemory(ADC12_B_BASE, &configureMemoryParam);
+
146 
+
147 
+
148  ADC12_B_clearInterrupt(ADC12_B_BASE,
+
149  0,
+
150  ADC12_B_IFG0
+
151  );
+
152 
+
153  //Enable memory buffer 0 interrupt
+
154  ADC12_B_enableInterrupt(ADC12_B_BASE,
+
155  ADC12_B_IE0,
+
156  0,
+
157  0);
+
158 
+
159 
+
160  while (1)
+
161  {
+
162  __delay_cycles(5000);
+
163 
+
164  //Enable/Start sampling and conversion
+
165  /*
+
166  * Base address of ADC12B Module
+
167  * Start the conversion into memory buffer 0
+
168  * Use the single-channel, single-conversion mode
+
169  */
+
170  ADC12_B_startConversion(ADC12_B_BASE,
+
171  ADC12_B_MEMORY_0,
+
172  ADC12_B_SINGLECHANNEL);
+
173 
+
174  __bis_SR_register(LPM0_bits + GIE); // LPM0, ADC12_B_ISR will force exit
+
175  __no_operation(); // For debugger
+
176  }
+
177 }
+
178 
+
179 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
180 #pragma vector=ADC12_VECTOR
+
181 __interrupt
+
182 #elif defined(__GNUC__)
+
183 __attribute__((interrupt(ADC12_VECTOR)))
+
184 #endif
+
185 void ADC12_ISR(void)
+
186 {
+
187  switch(__even_in_range(ADC12IV,12))
+
188  {
+
189  case 0: break; // Vector 0: No interrupt
+
190  case 2: break; // Vector 2: ADC12BMEMx Overflow
+
191  case 4: break; // Vector 4: Conversion time overflow
+
192  case 6: break; // Vector 6: ADC12BHI
+
193  case 8: break; // Vector 8: ADC12BLO
+
194  case 10: break; // Vector 10: ADC12BIN
+
195  case 12: // Vector 12: ADC12BMEM0 Interrupt
+
196  if (ADC12_B_getResults(ADC12_B_BASE, ADC12_B_MEMORY_0) >= 0x7ff)
+
197  {
+
198  //Set P1.0 LED on
+
199  /*
+
200 
+
201  * Select Port 1
+
202  * Set Pin 0 to output high.
+
203  */
+ +
205  GPIO_PORT_P1,
+
206  GPIO_PIN0
+
207  );
+
208  }
+
209  else
+
210  {
+
211  //Set P1.0 LED off
+
212  /*
+
213 
+
214  * Select Port 1
+
215  * Set Pin 0 to output high.
+
216  */
+ +
218  GPIO_PORT_P1,
+
219  GPIO_PIN0
+
220  );
+
221  }
+
222  __bic_SR_register_on_exit(LPM0_bits); // Exit active CPU
+
223  break; // Clear CPUOFF bit from 0(SR)
+
224  case 14: break; // Vector 14: ADC12BMEM1
+
225  case 16: break; // Vector 16: ADC12BMEM2
+
226  case 18: break; // Vector 18: ADC12BMEM3
+
227  case 20: break; // Vector 20: ADC12BMEM4
+
228  case 22: break; // Vector 22: ADC12BMEM5
+
229  case 24: break; // Vector 24: ADC12BMEM6
+
230  case 26: break; // Vector 26: ADC12BMEM7
+
231  case 28: break; // Vector 28: ADC12BMEM8
+
232  case 30: break; // Vector 30: ADC12BMEM9
+
233  case 32: break; // Vector 32: ADC12BMEM10
+
234  case 34: break; // Vector 34: ADC12BMEM11
+
235  case 36: break; // Vector 36: ADC12BMEM12
+
236  case 38: break; // Vector 38: ADC12BMEM13
+
237  case 40: break; // Vector 40: ADC12BMEM14
+
238  case 42: break; // Vector 42: ADC12BMEM15
+
239  case 44: break; // Vector 44: ADC12BMEM16
+
240  case 46: break; // Vector 46: ADC12BMEM17
+
241  case 48: break; // Vector 48: ADC12BMEM18
+
242  case 50: break; // Vector 50: ADC12BMEM19
+
243  case 52: break; // Vector 52: ADC12BMEM20
+
244  case 54: break; // Vector 54: ADC12BMEM21
+
245  case 56: break; // Vector 56: ADC12BMEM22
+
246  case 58: break; // Vector 58: ADC12BMEM23
+
247  case 60: break; // Vector 60: ADC12BMEM24
+
248  case 62: break; // Vector 62: ADC12BMEM25
+
249  case 64: break; // Vector 64: ADC12BMEM26
+
250  case 66: break; // Vector 66: ADC12BMEM27
+
251  case 68: break; // Vector 68: ADC12BMEM28
+
252  case 70: break; // Vector 70: ADC12BMEM29
+
253  case 72: break; // Vector 72: ADC12BMEM30
+
254  case 74: break; // Vector 74: ADC12BMEM31
+
255  case 76: break; // Vector 76: ADC12BRDY
+
256  default: break;
+
257  }
+
258 }
+
void main(void)
+
void ADC12_ISR(void)
+ +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__b__ex2__shared_ref_8c.html b/Generated Documentation/html/adc12__b__ex2__shared_ref_8c.html new file mode 100644 index 0000000..89d0fe8 --- /dev/null +++ b/Generated Documentation/html/adc12__b__ex2__shared_ref_8c.html @@ -0,0 +1,163 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/adc12_b/adc12_b_ex2_sharedRef.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc12_b_ex2_sharedRef.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void ADC12_ISR (void)
 
+

Function Documentation

+ +

◆ ADC12_ISR()

+ +
+
+ + + + + + + + +
void ADC12_ISR (void )
+
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 53 of file adc12_b_ex2_sharedRef.c.

+ +

References __delay_cycles(), __no_operation(), and GPIO_setOutputLowOnPin().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__b__ex2__shared_ref_8c.js b/Generated Documentation/html/adc12__b__ex2__shared_ref_8c.js new file mode 100644 index 0000000..b4845e7 --- /dev/null +++ b/Generated Documentation/html/adc12__b__ex2__shared_ref_8c.js @@ -0,0 +1,5 @@ +var adc12__b__ex2__shared_ref_8c = +[ + [ "ADC12_ISR", "adc12__b__ex2__shared_ref_8c.html#a71ae1ee8921a88b884941fc4b87bc5ef", null ], + [ "main", "adc12__b__ex2__shared_ref_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc12__b__ex2__shared_ref_8c_source.html b/Generated Documentation/html/adc12__b__ex2__shared_ref_8c_source.html new file mode 100644 index 0000000..ca7b198 --- /dev/null +++ b/Generated Documentation/html/adc12__b__ex2__shared_ref_8c_source.html @@ -0,0 +1,378 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/adc12_b/adc12_b_ex2_sharedRef.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc12_b_ex2_sharedRef.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR59xx Demo - ADC12B, Sample A1, 1.2V Shared Ref, Set P1.0 if A1 > 0.5V
+
34 //
+
35 // Description: A single sample is made on A1 with reference to internal
+
36 // 1.2V Vref. Software sets ADC12BSC to start sample and conversion - ADC10SC
+
37 // automatically cleared at EOC. ADC12B internal oscillator times sample (16x)
+
38 // and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC10
+
39 // conversion complete, ADC12_B_ISR will force exit from LPM0 in Mainloop on
+
40 // reti. If A1 > 0.5V, P1.0 set, else reset.
+
41 //
+
42 // MSP430FR5969
+
43 // -----------------
+
44 // /|\| XIN|-
+
45 // | | |
+
46 // --|RST XOUT|-
+
47 // | |
+
48 // >---|P1.1/A1 P1.0|-->LED
+
49 //
+
50 //******************************************************************************
+
51 #include "driverlib.h"
+
52 
+
53 void main(void)
+
54 {
+
55  // Stop WDT
+
56  WDT_A_hold(WDT_A_BASE);
+
57  //Set P1.0 as an output pin.
+
58  /*
+
59 
+
60  * Select Port 1
+
61  * Set Pin 0 as output
+
62  */
+
63  GPIO_setAsOutputPin(
+
64  GPIO_PORT_P1,
+
65  GPIO_PIN0
+
66  );
+
67 
+
68  //Set P1.0 as Output Low.
+
69  /*
+
70 
+
71  * Select Port 1
+
72  * Set Pin 0 to output Low.
+
73  */
+ +
75  GPIO_PORT_P1,
+
76  GPIO_PIN0
+
77  );
+
78  //Set P1.1 as Ternary Module Function Output.
+
79  /*
+
80 
+
81  * Select Port 1
+
82  * Set Pin 1 to output Ternary Module Function, (A1, C1, VREF+, VeREF+).
+
83  */
+
84  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
85  GPIO_PORT_P1,
+
86  GPIO_PIN1,
+
87  GPIO_TERNARY_MODULE_FUNCTION
+
88  );
+
89 
+
90  /*
+
91  * Disable the GPIO power-on default high-impedance mode to activate
+
92  * previously configured port settings
+
93  */
+
94  PMM_unlockLPM5();
+
95 
+
96  //If ref generator busy, WAIT
+
97  while (Ref_A_isRefGenBusy(REF_A_BASE)) ;
+
98 
+
99  //Select internal ref = 1.2V
+
100  Ref_A_setReferenceVoltage(REF_A_BASE,
+
101  REF_A_VREF1_2V);
+
102 
+
103  //Turn on Reference Voltage
+
104  Ref_A_enableReferenceVoltage(REF_A_BASE);
+
105 
+
106  //Initialize the ADC12B Module
+
107  /*
+
108  * Base address of ADC12B Module
+
109  * Use internal ADC12B bit as sample/hold signal to start conversion
+
110  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
111  * Use default clock divider/pre-divider of 1
+
112  * Not use internal channel
+
113  */
+
114  ADC12_B_initParam initParam = {0};
+
115  initParam.sampleHoldSignalSourceSelect = ADC12_B_SAMPLEHOLDSOURCE_SC;
+
116  initParam.clockSourceSelect = ADC12_B_CLOCKSOURCE_ADC12OSC;
+
117  initParam.clockSourceDivider = ADC12_B_CLOCKDIVIDER_1;
+
118  initParam.clockSourcePredivider = ADC12_B_CLOCKPREDIVIDER__1;
+
119  initParam.internalChannelMap = ADC12_B_NOINTCH;
+
120  ADC12_B_init(ADC12_B_BASE, &initParam);
+
121 
+
122  //Enable the ADC12B module
+
123  ADC12_B_enable(ADC12_B_BASE);
+
124 
+
125  /*
+
126  * Base address of ADC12B Module
+
127  * For memory buffers 0-7 sample/hold for 64 clock cycles
+
128  * For memory buffers 8-15 sample/hold for 4 clock cycles (default)
+
129  * Disable Multiple Sampling
+
130  */
+
131  ADC12_B_setupSamplingTimer(ADC12_B_BASE,
+
132  ADC12_B_CYCLEHOLD_16_CYCLES,
+
133  ADC12_B_CYCLEHOLD_4_CYCLES,
+
134  ADC12_B_MULTIPLESAMPLESDISABLE);
+
135 
+
136  //Configure Memory Buffer
+
137  /*
+
138  * Base address of the ADC12B Module
+
139  * Configure memory buffer 0
+
140  * Map input A1 to memory buffer 0
+
141  * Vref+ = IntBuffer
+
142  * Vref- = AVss
+
143  * Memory buffer 0 is not the end of a sequence
+
144  */
+
145  ADC12_B_configureMemoryParam configureMemoryParam = {0};
+
146  configureMemoryParam.memoryBufferControlIndex = ADC12_B_MEMORY_0;
+
147  configureMemoryParam.inputSourceSelect = ADC12_B_INPUT_A1;
+
148  configureMemoryParam.refVoltageSourceSelect = ADC12_B_VREFPOS_INTBUF_VREFNEG_VSS;
+
149  configureMemoryParam.endOfSequence = ADC12_B_NOTENDOFSEQUENCE;
+
150  configureMemoryParam.windowComparatorSelect = ADC12_B_WINDOW_COMPARATOR_DISABLE;
+
151  configureMemoryParam.differentialModeSelect = ADC12_B_DIFFERENTIAL_MODE_DISABLE;
+
152  ADC12_B_configureMemory(ADC12_B_BASE, &configureMemoryParam);
+
153 
+
154  ADC12_B_clearInterrupt(ADC12_B_BASE,
+
155  0,
+
156  ADC12_B_IFG0
+
157  );
+
158 
+
159  //Enable memory buffer 0 interrupt
+
160  ADC12_B_enableInterrupt(ADC12_B_BASE,
+
161  ADC12_B_IE0,
+
162  0,
+
163  0);
+
164 
+
165  __delay_cycles(75); // reference settling ~75us
+
166 
+
167  while(1)
+
168  {
+
169  __delay_cycles(5000); // Delay between conversions
+
170 
+
171  //Enable/Start sampling and conversion
+
172  /*
+
173  * Base address of ADC12B Module
+
174  * Start the conversion into memory buffer 0
+
175  * Use the single-channel, single-conversion mode
+
176  */
+
177  ADC12_B_startConversion(ADC12_B_BASE,
+
178  ADC12_B_MEMORY_0,
+
179  ADC12_B_SINGLECHANNEL);
+
180 
+
181  __bis_SR_register(LPM0_bits + GIE); // LPM0, ADC10_ISR will force exit
+
182  __no_operation(); // For debug only
+
183  }
+
184 }
+
185 
+
186 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
187 #pragma vector=ADC12_VECTOR
+
188 __interrupt
+
189 #elif defined(__GNUC__)
+
190 __attribute__((interrupt(ADC12_VECTOR)))
+
191 #endif
+
192 void ADC12_ISR(void)
+
193 {
+
194  switch(__even_in_range(ADC12IV,12))
+
195  {
+
196  case 0: break; // Vector 0: No interrupt
+
197  case 2: break; // Vector 2: ADC12BMEMx Overflow
+
198  case 4: break; // Vector 4: Conversion time overflow
+
199  case 6: break; // Vector 6: ADC12BHI
+
200  case 8: break; // Vector 8: ADC12BLO
+
201  case 10: break; // Vector 10: ADC12BIN
+
202  case 12: // Vector 12: ADC12BMEM0 Interrupt
+
203  if (ADC12_B_getResults(ADC12_B_BASE, ADC12_B_MEMORY_0) >= 0x6B4)
+
204  {
+
205  //Set P1.0 LED on
+
206  /*
+
207 
+
208  * Select Port 1
+
209  * Set Pin 0 to output high.
+
210  */
+ +
212  GPIO_PORT_P1,
+
213  GPIO_PIN0
+
214  );
+
215  }
+
216  else
+
217  {
+
218  //Set P1.0 LED off
+
219  /*
+
220 
+
221  * Select Port 1
+
222  * Set Pin 0 to output high.
+
223  */
+ +
225  GPIO_PORT_P1,
+
226  GPIO_PIN0
+
227  );
+
228  }
+
229  __bic_SR_register_on_exit(LPM0_bits); // Exit active CPU
+
230  break; // Clear CPUOFF bit from 0(SR)
+
231  case 14: break; // Vector 14: ADC12BMEM1
+
232  case 16: break; // Vector 16: ADC12BMEM2
+
233  case 18: break; // Vector 18: ADC12BMEM3
+
234  case 20: break; // Vector 20: ADC12BMEM4
+
235  case 22: break; // Vector 22: ADC12BMEM5
+
236  case 24: break; // Vector 24: ADC12BMEM6
+
237  case 26: break; // Vector 26: ADC12BMEM7
+
238  case 28: break; // Vector 28: ADC12BMEM8
+
239  case 30: break; // Vector 30: ADC12BMEM9
+
240  case 32: break; // Vector 32: ADC12BMEM10
+
241  case 34: break; // Vector 34: ADC12BMEM11
+
242  case 36: break; // Vector 36: ADC12BMEM12
+
243  case 38: break; // Vector 38: ADC12BMEM13
+
244  case 40: break; // Vector 40: ADC12BMEM14
+
245  case 42: break; // Vector 42: ADC12BMEM15
+
246  case 44: break; // Vector 44: ADC12BMEM16
+
247  case 46: break; // Vector 46: ADC12BMEM17
+
248  case 48: break; // Vector 48: ADC12BMEM18
+
249  case 50: break; // Vector 50: ADC12BMEM19
+
250  case 52: break; // Vector 52: ADC12BMEM20
+
251  case 54: break; // Vector 54: ADC12BMEM21
+
252  case 56: break; // Vector 56: ADC12BMEM22
+
253  case 58: break; // Vector 58: ADC12BMEM23
+
254  case 60: break; // Vector 60: ADC12BMEM24
+
255  case 62: break; // Vector 62: ADC12BMEM25
+
256  case 64: break; // Vector 64: ADC12BMEM26
+
257  case 66: break; // Vector 66: ADC12BMEM27
+
258  case 68: break; // Vector 68: ADC12BMEM28
+
259  case 70: break; // Vector 70: ADC12BMEM29
+
260  case 72: break; // Vector 72: ADC12BMEM30
+
261  case 74: break; // Vector 74: ADC12BMEM31
+
262  case 76: break; // Vector 76: ADC12BRDY
+
263  default: break;
+
264  }
+
265 }
+
void main(void)
+
void ADC12_ISR(void)
+ +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__b__ex3__ext_ref_8c.html b/Generated Documentation/html/adc12__b__ex3__ext_ref_8c.html new file mode 100644 index 0000000..d909711 --- /dev/null +++ b/Generated Documentation/html/adc12__b__ex3__ext_ref_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/adc12_b/adc12_b_ex3_extRef.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc12_b_ex3_extRef.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 62 of file adc12_b_ex3_extRef.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc12__b__ex3__ext_ref_8c.js b/Generated Documentation/html/adc12__b__ex3__ext_ref_8c.js new file mode 100644 index 0000000..d579dda --- /dev/null +++ b/Generated Documentation/html/adc12__b__ex3__ext_ref_8c.js @@ -0,0 +1,4 @@ +var adc12__b__ex3__ext_ref_8c = +[ + [ "main", "adc12__b__ex3__ext_ref_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc12__b__ex3__ext_ref_8c_source.html b/Generated Documentation/html/adc12__b__ex3__ext_ref_8c_source.html new file mode 100644 index 0000000..6161af5 --- /dev/null +++ b/Generated Documentation/html/adc12__b__ex3__ext_ref_8c_source.html @@ -0,0 +1,260 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/adc12_b/adc12_b_ex3_extRef.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc12_b_ex3_extRef.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR59xx Demo - ADC12B, Using an External Reference
+
34 //
+
35 // Description: This example shows how to use an external positive reference for
+
36 // the ADC12B. The external reference is applied to the VeREF+ pin. AVss is used
+
37 // for the negative reference. A single conversion is performed on channel A0.
+
38 // The conversion results are stored in ADC12BMEM0 and Test by applying a voltage
+
39 // to channel A0, then setting and running to a break point at the "_NOP()"
+
40 // instruction. To view the conversion results, open an SFR window in debugger
+
41 // and view the contents of ADC12BMEM0.
+
42 // NOTE: VeREF+ range: 1.4V (min) to AVCC (max)
+
43 // VeREF- range: 0V (min) to 1.2V (max)
+
44 // Differential ref voltage range: 1.4V(min) to AVCC(max)
+
45 // (see datasheet for device specific information)
+
46 //
+
47 //
+
48 // MSP430FR5969
+
49 // -------------------
+
50 // /|\| |
+
51 // | | |
+
52 // --|RST |
+
53 // | |
+
54 // Vin -->|P1.0/A0 |
+
55 // | |
+
56 // REF -->|P1.1/VREF+/VeREF+ |
+
57 // | |
+
58 //
+
59 //******************************************************************************
+
60 #include "driverlib.h"
+
61 
+
62 void main(void)
+
63 {
+
64  // Stop WDT
+
65  WDT_A_hold(WDT_A_BASE);
+
66 
+
67  //Set P1.0 as Ternary Module Function Output.
+
68  /*
+
69 
+
70  * Select Port 1
+
71  * Set Pin 0 to output Ternary Module Function, (A0, C0, VREF-, VeREF-).
+
72  */
+
73  GPIO_setAsPeripheralModuleFunctionInputPin(
+
74  GPIO_PORT_P1,
+
75  GPIO_PIN0,
+
76  GPIO_TERNARY_MODULE_FUNCTION
+
77  );
+
78 
+
79  /*
+
80  * Disable the GPIO power-on default high-impedance mode to activate
+
81  * previously configured port settings
+
82  */
+
83  PMM_unlockLPM5();
+
84 
+
85  //Initialize the ADC12B Module
+
86  /*
+
87  * Base address of ADC12B Module
+
88  * Use internal ADC12B bit as sample/hold signal to start conversion
+
89  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
90  * Use default clock divider/pre-divider of 1
+
91  * Not use internal channel
+
92  */
+
93  ADC12_B_initParam initParam = {0};
+
94  initParam.sampleHoldSignalSourceSelect = ADC12_B_SAMPLEHOLDSOURCE_SC;
+
95  initParam.clockSourceSelect = ADC12_B_CLOCKSOURCE_ADC12OSC;
+
96  initParam.clockSourceDivider = ADC12_B_CLOCKDIVIDER_1;
+
97  initParam.clockSourcePredivider = ADC12_B_CLOCKPREDIVIDER__1;
+
98  initParam.internalChannelMap = ADC12_B_NOINTCH;
+
99  ADC12_B_init(ADC12_B_BASE, &initParam);
+
100 
+
101  //Enable the ADC12B module
+
102  ADC12_B_enable(ADC12_B_BASE);
+
103 
+
104  /*
+
105  * Base address of ADC12B Module
+
106  * For memory buffers 0-7 sample/hold for 16 clock cycles
+
107  * For memory buffers 8-15 sample/hold for 4 clock cycles (default)
+
108  * Disable Multiple Sampling
+
109  */
+
110  ADC12_B_setupSamplingTimer(ADC12_B_BASE,
+
111  ADC12_B_CYCLEHOLD_16_CYCLES,
+
112  ADC12_B_CYCLEHOLD_4_CYCLES,
+
113  ADC12_B_MULTIPLESAMPLESDISABLE);
+
114 
+
115  //Configure Memory Buffer
+
116  /*
+
117  * Base address of the ADC12B Module
+
118  * Configure memory buffer 0
+
119  * Map input A0 to memory buffer 0
+
120  * Vref+ = AVcc
+
121  * Vref- = EXT Positive
+
122  * Memory buffer 0 is not the end of a sequence
+
123  */
+
124  ADC12_B_configureMemoryParam configureMemoryParam = {0};
+
125  configureMemoryParam.memoryBufferControlIndex = ADC12_B_MEMORY_0;
+
126  configureMemoryParam.inputSourceSelect = ADC12_B_INPUT_A0;
+
127  configureMemoryParam.refVoltageSourceSelect = ADC12_B_VREFPOS_EXTPOS_VREFNEG_VSS;
+
128  configureMemoryParam.endOfSequence = ADC12_B_NOTENDOFSEQUENCE;
+
129  configureMemoryParam.windowComparatorSelect = ADC12_B_WINDOW_COMPARATOR_DISABLE;
+
130  configureMemoryParam.differentialModeSelect = ADC12_B_DIFFERENTIAL_MODE_DISABLE;
+
131  ADC12_B_configureMemory(ADC12_B_BASE, &configureMemoryParam);
+
132 
+
133  while (1)
+
134  {
+
135  //Enable/Start first sampling and conversion cycle
+
136  /*
+
137  * Base address of ADC12B Module
+
138  * Start the conversion into memory buffer 0
+
139  * Use the single-channel, single-conversion mode
+
140  */
+
141  ADC12_B_startConversion(ADC12_B_BASE,
+
142  ADC12_B_MEMORY_0,
+
143  ADC12_B_SINGLECHANNEL);
+
144 
+
145  //Poll for interrupt on memory buffer 0
+
146  while (!ADC12_B_getInterruptStatus(ADC12_B_BASE,
+
147  0,
+
148  ADC12_B_IFG0));
+
149 
+
150  __no_operation(); // SET BREAKPOINT HERE
+
151  }
+
152 }
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/adc__ex1__avcc_ref_8c.html b/Generated Documentation/html/adc__ex1__avcc_ref_8c.html new file mode 100644 index 0000000..a372480 --- /dev/null +++ b/Generated Documentation/html/adc__ex1__avcc_ref_8c.html @@ -0,0 +1,177 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/adc/adc_ex1_avccRef.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc_ex1_avccRef.c File Reference
+
+
+
#include "driverlib.h"
+#include "Board.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void ADC_ISR (void)
 
+

Function Documentation

+ +

◆ ADC_ISR()

+ +
+
+ + + + + + + + +
void ADC_ISR (void )
+
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

ADC - Sample A7 Input, AVcc Ref, LED1 and LED2 is set if A7 > 0.5AVcc

+

MSP430FR4133 Demo A single sample is made on A7 with reference to AVcc. Software sets ADC10SC to start sample and conversion - ADC10SC automatically cleared at EOC.ADC internal oscillator times sample (16x) and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC conversion complete, ADC10_ISR will force exit from LPM0 in Mainloop on reti. If A7 > 0.5*AVcc, LED1 and LED2 set, else reset.

+

+MSP430FR2xx_4xx Board

+

/|| XIN|- | | | –|RST XOUT|- | | >—|A7 |-->LED1 | |-->LED2

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC10 peripheral
  • +
  • GPIO Port peripheral
  • +
  • A7
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • ADC10_VECTOR
  • +
+ +

Definition at line 67 of file adc_ex1_avccRef.c.

+ +

References __delay_cycles(), and __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc__ex1__avcc_ref_8c.js b/Generated Documentation/html/adc__ex1__avcc_ref_8c.js new file mode 100644 index 0000000..35bfb85 --- /dev/null +++ b/Generated Documentation/html/adc__ex1__avcc_ref_8c.js @@ -0,0 +1,5 @@ +var adc__ex1__avcc_ref_8c = +[ + [ "ADC_ISR", "adc__ex1__avcc_ref_8c.html#a6ed0a222ba29d6365791b9cc27d9af14", null ], + [ "main", "adc__ex1__avcc_ref_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc__ex1__avcc_ref_8c_source.html b/Generated Documentation/html/adc__ex1__avcc_ref_8c_source.html new file mode 100644 index 0000000..685a69c --- /dev/null +++ b/Generated Documentation/html/adc__ex1__avcc_ref_8c_source.html @@ -0,0 +1,292 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/adc/adc_ex1_avccRef.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc_ex1_avccRef.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
63 //******************************************************************************
+
64 #include "driverlib.h"
+
65 #include "Board.h"
+
66 
+
67 void main (void)
+
68 {
+
69  //Stop Watchdog Timer
+
70  WDT_A_hold(WDT_A_BASE);
+
71 
+
72  //Set A7 as an input pin.
+
73  //Set appropriate module function
+
74  GPIO_setAsPeripheralModuleFunctionInputPin(
+
75  GPIO_PORT_ADC7,
+
76  GPIO_PIN_ADC7,
+
77  GPIO_FUNCTION_ADC7);
+
78 
+
79  //Set LED1 as an output pin.
+
80  GPIO_setAsOutputPin(
+
81  GPIO_PORT_LED1,
+
82  GPIO_PIN_LED1);
+
83 
+
84  //Set LED2 as an output pin.
+
85  GPIO_setAsOutputPin(
+
86  GPIO_PORT_LED2,
+
87  GPIO_PIN_LED2);
+
88 
+
89  /*
+
90  * Disable the GPIO power-on default high-impedance mode to activate
+
91  * previously configured port settings
+
92  */
+
93  PMM_unlockLPM5();
+
94 
+
95  //Initialize the ADC Module
+
96  /*
+
97  * Base Address for the ADC Module
+
98  * Use internal ADC bit as sample/hold signal to start conversion
+
99  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
100  * Use default clock divider of 1
+
101  */
+
102  ADC_init(ADC_BASE,
+
103  ADC_SAMPLEHOLDSOURCE_SC,
+
104  ADC_CLOCKSOURCE_ADCOSC,
+
105  ADC_CLOCKDIVIDER_1);
+
106 
+
107  ADC_enable(ADC_BASE);
+
108 
+
109  /*
+
110  * Base Address for the ADC Module
+
111  * Sample/hold for 16 clock cycles
+
112  * Do not enable Multiple Sampling
+
113  */
+
114  ADC_setupSamplingTimer(ADC_BASE,
+
115  ADC_CYCLEHOLD_16_CYCLES,
+
116  ADC_MULTIPLESAMPLESDISABLE);
+
117 
+
118  //Configure Memory Buffer
+
119  /*
+
120  * Base Address for the ADC Module
+
121  * Use input A7
+
122  * Use positive reference of AVcc
+
123  * Use negative reference of AVss
+
124  */
+
125  ADC_configureMemory(ADC_BASE,
+
126  ADC_INPUT_A7,
+
127  ADC_VREFPOS_AVCC,
+
128  ADC_VREFNEG_AVSS);
+
129 
+
130  ADC_clearInterrupt(ADC_BASE,
+
131  ADC_COMPLETED_INTERRUPT);
+
132 
+
133  //Enable Memory Buffer interrupt
+
134  ADC_enableInterrupt(ADC_BASE,
+
135  ADC_COMPLETED_INTERRUPT);
+
136 
+
137  for (;;)
+
138  {
+
139  //Delay between conversions
+
140  __delay_cycles(5000);
+
141 
+
142  //Enable and Start the conversion
+
143  //in Single-Channel, Single Conversion Mode
+
144  ADC_startConversion(ADC_BASE,
+
145  ADC_SINGLECHANNEL);
+
146 
+
147  //LPM0, ADC10_ISR will force exit
+
148  __bis_SR_register(CPUOFF + GIE);
+
149  //For debug only
+
150  __no_operation();
+
151 
+
152 
+
153  }
+
154 }
+
155 
+
156 //ADC10 interrupt service routine
+
157 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
158 #pragma vector=ADC_VECTOR
+
159 __interrupt
+
160 #elif defined(__GNUC__)
+
161 __attribute__((interrupt(ADC_VECTOR)))
+
162 #endif
+
163 void ADC_ISR (void)
+
164 {
+
165  switch (__even_in_range(ADCIV,12)){
+
166  case 0: break; //No interrupt
+
167  case 2: break; //conversion result overflow
+
168  case 4: break; //conversion time overflow
+
169  case 6: break; //ADC10HI
+
170  case 8: break; //ADC10LO
+
171  case 10: break; //ADC10IN
+
172  case 12: //ADC10IFG0
+
173  //(Automatically clears ADC10IFG0 by reading memory buffer)
+
174  if (ADC_getResults(ADC_BASE) < 0x1FF){
+
175 
+
176  //Turn LED1 off
+ +
178  GPIO_PORT_LED1,
+
179  GPIO_PIN_LED1
+
180  );
+
181 
+
182  //Turn LED2 off
+ +
184  GPIO_PORT_LED2,
+
185  GPIO_PIN_LED2
+
186  );
+
187  }
+
188  else {
+
189  //Turn LED1 on
+ +
191  GPIO_PORT_LED1,
+
192  GPIO_PIN_LED1
+
193  );
+
194 
+
195  //Turn LED2 on
+ +
197  GPIO_PORT_LED2,
+
198  GPIO_PIN_LED2
+
199  );
+
200  }
+
201 
+
202  //Clear CPUOFF bit from 0(SR)
+
203  //Breakpoint here and watch ADC_Result
+ +
205  break;
+
206  default: break;
+
207  }
+
208 }
+ +
void main(void)
+
void ADC_ISR(void)
+ +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/adc__ex2__int_ref_8c.html b/Generated Documentation/html/adc__ex2__int_ref_8c.html new file mode 100644 index 0000000..9d7441b --- /dev/null +++ b/Generated Documentation/html/adc__ex2__int_ref_8c.html @@ -0,0 +1,228 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/adc/adc_ex2_intRef.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
adc_ex2_intRef.c File Reference
+
+
+
#include "driverlib.h"
+#include "Board.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define TIMER_PERIOD   80
 
+ + + + + + + +

+Functions

void main (void)
 
void ADC_ISR (void)
 
void TA0_ISR (void)
 
+

Macro Definition Documentation

+ +

◆ TIMER_PERIOD

+ +
+
+ + + + +
#define TIMER_PERIOD   80
+
+

ADC - Sample A7 input, 1.5V Shared Ref, LED ON if A7 > 0.5V

+

MSP430FR4133 Demo A single sample is made on A7 with reference to internal 1.5V Vref.Software sets ADCSC to start sample and conversion - ADCSC automatically cleared at EOC. ADC internal oscillator times sample (16x) and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC conversion complete, ADC_ISR will force exit from LPM0 in Mainloop on reti. If A7 > 0.5V, P1.0 set, else reset.

     MSP430FR2xx_4xx Board
+       -----------------
+   /|\|              XIN|-
+    | |                 |
+    --|RST          XOUT|-
+      |               A7|<-- Sample Signal
+      |                 |-->LED1
+      |                 |-->LED2
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • ADC peripheral
  • +
  • REF peripheral
  • +
  • Timer_A/Timer_B peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • ADC_VECTOR
  • +
  • TIMER0_A0_VECTOR/TIMER0_B0_VECTOR
  • +
+ +

Definition at line 70 of file adc_ex2_intRef.c.

+ +
+
+

Function Documentation

+ +

◆ ADC_ISR()

+ +
+
+ + + + + + + + +
void ADC_ISR (void )
+
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 72 of file adc_ex2_intRef.c.

+ +

References __delay_cycles(), __no_operation(), initUpModeParam, and TIMER_PERIOD.

+ +
+
+ +

◆ TA0_ISR()

+ +
+
+ + + + + + + + +
void TA0_ISR (void )
+
+ +

Definition at line 270 of file adc_ex2_intRef.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/adc__ex2__int_ref_8c.js b/Generated Documentation/html/adc__ex2__int_ref_8c.js new file mode 100644 index 0000000..c9eaa2b --- /dev/null +++ b/Generated Documentation/html/adc__ex2__int_ref_8c.js @@ -0,0 +1,7 @@ +var adc__ex2__int_ref_8c = +[ + [ "TIMER_PERIOD", "adc__ex2__int_ref_8c.html#ad888acf7c13a4bedd6541ceb5cf9bf6d", null ], + [ "ADC_ISR", "adc__ex2__int_ref_8c.html#a6ed0a222ba29d6365791b9cc27d9af14", null ], + [ "main", "adc__ex2__int_ref_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TA0_ISR", "adc__ex2__int_ref_8c.html#a7ac362134b9424264b6e1b6d401e9da7", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/adc__ex2__int_ref_8c_source.html b/Generated Documentation/html/adc__ex2__int_ref_8c_source.html new file mode 100644 index 0000000..aa77011 --- /dev/null +++ b/Generated Documentation/html/adc__ex2__int_ref_8c_source.html @@ -0,0 +1,358 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/adc/adc_ex2_intRef.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
adc_ex2_intRef.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
67 //******************************************************************************
+
68 #include "driverlib.h"
+
69 #include "Board.h"
+
70 #define TIMER_PERIOD 80
+
71 
+
72 void main (void)
+
73 {
+
74  //Stop Watchdog Timer
+
75  WDT_A_hold(WDT_A_BASE);
+
76 
+
77  //Set A7 as an input pin.
+
78  //Set appropriate module function
+
79  GPIO_setAsPeripheralModuleFunctionInputPin(
+
80  GPIO_PORT_ADC7,
+
81  GPIO_PIN_ADC7,
+
82  GPIO_FUNCTION_ADC7);
+
83 
+
84  //Set LED1 as an output pin.
+
85  GPIO_setAsOutputPin(
+
86  GPIO_PORT_LED1,
+
87  GPIO_PIN_LED1);
+
88 
+
89  //Set LED2 as an output pin.
+
90  GPIO_setAsOutputPin(
+
91  GPIO_PORT_LED2,
+
92  GPIO_PIN_LED2);
+
93 
+
94  /*
+
95  * Disable the GPIO power-on default high-impedance mode to activate
+
96  * previously configured port settings
+
97  */
+
98  PMM_unlockLPM5();
+
99 
+
100  //Initialize the ADC Module
+
101  /*
+
102  * Base Address for the ADC Module
+
103  * Use internal ADC bit as sample/hold signal to start conversion
+
104  * USE MODOSC 5MHZ Digital Oscillator as clock source
+
105  * Use default clock divider of 1
+
106  */
+
107  ADC_init(ADC_BASE,
+
108  ADC_SAMPLEHOLDSOURCE_SC,
+
109  ADC_CLOCKSOURCE_ADCOSC,
+
110  ADC_CLOCKDIVIDER_1);
+
111 
+
112  ADC_enable(ADC_BASE);
+
113 
+
114  /*
+
115  * Base Address for the ADC Module
+
116  * Sample/hold for 16 clock cycles
+
117  * Do not enable Multiple Sampling
+
118  */
+
119  ADC_setupSamplingTimer(ADC_BASE,
+
120  ADC_CYCLEHOLD_16_CYCLES,
+
121  ADC_MULTIPLESAMPLESDISABLE);
+
122 
+
123  //Configure Memory Buffer
+
124  /*
+
125  * Base Address for the ADC Module
+
126  * Use input A7
+
127  * Use positive reference of Internally generated Vref
+
128  * Use negative reference of AVss
+
129  */
+
130  ADC_configureMemory(ADC_BASE,
+
131  ADC_INPUT_A7,
+
132  ADC_VREFPOS_INT,
+
133  ADC_VREFNEG_AVSS);
+
134 
+
135  ADC_clearInterrupt(ADC_BASE,
+
136  ADC_COMPLETED_INTERRUPT);
+
137 
+
138  //Enable Memory Buffer interrupt
+
139  ADC_enableInterrupt(ADC_BASE,
+
140  ADC_COMPLETED_INTERRUPT);
+
141 
+
142  //Internal Reference ON
+
143  PMM_enableInternalReference();
+
144 
+
145  //Configure internal reference
+
146  //If ref voltage no ready, WAIT
+
147  while (PMM_REFGEN_NOTREADY == PMM_getVariableReferenceVoltageStatus());
+
148 
+
149 #ifdef __MSP430_HAS_TBx__
+
150  // Configure TB0 to provide delay for reference settling ~75us
+
151  Timer_B_initUpModeParam initUpModeParam = {0};
+
152  initUpModeParam.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
153  initUpModeParam.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
154  initUpModeParam.timerPeriod = TIMER_PERIOD;
+
155  initUpModeParam.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_DISABLE;
+
156  initUpModeParam.captureCompareInterruptEnable_CCR0_CCIE =
+
157  TIMER_B_CCIE_CCR0_INTERRUPT_ENABLE;
+
158  initUpModeParam.timerClear = TIMER_B_DO_CLEAR;
+
159  initUpModeParam.startTimer = true;
+
160  Timer_B_initUpMode(TB0_BASE, &initUpModeParam);
+
161 #else
+
162  // Configure TA0 to provide delay for reference settling ~75us
+
163  Timer_A_initUpModeParam initUpModeParam = {0};
+
164  initUpModeParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
165  initUpModeParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
166  initUpModeParam.timerPeriod = TIMER_PERIOD;
+
167  initUpModeParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
168  initUpModeParam.captureCompareInterruptEnable_CCR0_CCIE =
+
169  TIMER_A_CAPTURECOMPARE_INTERRUPT_ENABLE;
+
170  initUpModeParam.timerClear = TIMER_A_DO_CLEAR;
+
171  initUpModeParam.startTimer = true;
+
172  Timer_A_initUpMode(TIMER_A0_BASE, &initUpModeParam);
+
173 #endif // __MSP430_HAS_TBx__
+
174 
+
175  __bis_SR_register(CPUOFF + GIE); // LPM0, TA0_ISR will force exit
+
176 
+
177  for (;;)
+
178  {
+
179  //Delay between conversions
+
180  __delay_cycles(5000);
+
181 
+
182  //Enable and Start the conversion
+
183  //in Single-Channel, Single Conversion Mode
+
184  ADC_startConversion(ADC_BASE,
+
185  ADC_SINGLECHANNEL);
+
186 
+
187  //LPM0, ADC_ISR will force exit
+
188  __bis_SR_register(CPUOFF + GIE);
+
189  //For debug only
+
190  __no_operation();
+
191 
+
192 
+
193  }
+
194 }
+
195 
+
196 //ADC interrupt service routine
+
197 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
198 #pragma vector=ADC_VECTOR
+
199 __interrupt
+
200 #elif defined(__GNUC__)
+
201 __attribute__((interrupt(ADC_VECTOR)))
+
202 #endif
+
203 void ADC_ISR (void)
+
204 {
+
205  switch (__even_in_range(ADCIV,12)){
+
206  case 0: break; //No interrupt
+
207  case 2: break; //conversion result overflow
+
208  case 4: break; //conversion time overflow
+
209  case 6: break; //ADCHI
+
210  case 8: break; //ADCLO
+
211  case 10: break; //ADCIN
+
212  case 12: //ADCIFG0
+
213 
+
214  //Automatically clears ADCIFG0 by reading memory buffer
+
215  //ADCMEM = A0 > 0.5V?
+
216  if (ADC_getResults(ADC_BASE) < 0x155) {
+
217  //Turn LED1 off
+ +
219  GPIO_PORT_LED1,
+
220  GPIO_PIN_LED1
+
221  );
+
222 
+
223  //Turn LED2 off
+ +
225  GPIO_PORT_LED2,
+
226  GPIO_PIN_LED2
+
227  );
+
228  }
+
229  else {
+
230  //Turn LED1 on
+ +
232  GPIO_PORT_LED1,
+
233  GPIO_PIN_LED1
+
234  );
+
235 
+
236  //Turn LED2 on
+ +
238  GPIO_PORT_LED2,
+
239  GPIO_PIN_LED2
+
240  );
+
241  }
+
242 
+
243  //Clear CPUOFF bit from 0(SR)
+
244  //Breakpoint here and watch ADC_Result
+ +
246  break;
+
247  default: break;
+
248  }
+
249 }
+
250 
+
251 #ifdef __MSP430_HAS_TBx__
+
252 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
253 #pragma vector=TIMER0_B0_VECTOR
+
254 __interrupt
+
255 #elif defined(__GNUC__)
+
256 __attribute__((interrupt(TIMER0_B0_VECTOR)))
+
257 #endif
+
258 void TB0_ISR (void)
+
259 {
+
260  TB0CTL = 0;
+
261  LPM0_EXIT; // Exit LPM0 on return
+
262 }
+
263 #else
+
264 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
265 #pragma vector=TIMER0_A0_VECTOR
+
266 __interrupt
+
267 #elif defined(__GNUC__)
+
268 __attribute__((interrupt(TIMER0_A0_VECTOR)))
+
269 #endif
+
270 void TA0_ISR (void)
+
271 {
+
272  TA0CTL = 0;
+
273  LPM0_EXIT; // Exit LPM0 on return
+
274 }
+
275 #endif // __MSP430_HAS_TBx__
+ +
void main(void)
+
void ADC_ISR(void)
+
void TA0_ISR(void)
+
#define TIMER_PERIOD
+
Timer_A_initUpModeParam initUpModeParam
+ +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/aes256__ex1__encrypt_decrypt_8c.html b/Generated Documentation/html/aes256__ex1__encrypt_decrypt_8c.html new file mode 100644 index 0000000..762ba2f --- /dev/null +++ b/Generated Documentation/html/aes256__ex1__encrypt_decrypt_8c.html @@ -0,0 +1,269 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/aes256/aes256_ex1_encryptDecrypt.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
aes256_ex1_encryptDecrypt.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + + + + + + + +

+Variables

uint8_t Data [16]
 
uint8_t CipherKey [32]
 
uint8_t DataAESencrypted [16]
 
uint8_t DataAESdecrypted [16]
 
int i = 0
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 78 of file aes256_ex1_encryptDecrypt.c.

+ +

References CipherKey, Data, DataAESdecrypted, and DataAESencrypted.

+ +
+
+

Variable Documentation

+ +

◆ CipherKey

+ +
+
+ + + + +
uint8_t CipherKey[32]
+
+Initial value:
=
+
{0x00, 0x01, 0x02, 0x03,
+
0x04, 0x05, 0x06, 0x07,
+
0x08, 0x09, 0x0a, 0x0b,
+
0x0c, 0x0d, 0x0e, 0x0f,
+
0x10, 0x11, 0x12, 0x13,
+
0x14, 0x15, 0x16, 0x17,
+
0x18, 0x19, 0x1a, 0x1b,
+
0x1c, 0x1d, 0x1e, 0x1f
+
}
+
+

Definition at line 63 of file aes256_ex1_encryptDecrypt.c.

+ +

Referenced by main().

+ +
+
+ +

◆ Data

+ +
+
+ + + + +
uint8_t Data[16]
+
+Initial value:
=
+
{0x00, 0x11, 0x22, 0x33,
+
0x44, 0x55, 0x66, 0x77,
+
0x88, 0x99, 0xaa, 0xbb,
+
0xcc, 0xdd, 0xee, 0xff
+
}
+

AES256 Encryption and Decryption Example

+

Description: This demo shows how to use the AES Encryption and Decryption

         MSP430FR5969
+       -----------------
+

Key: 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f Plaintext: 00112233445566778899aabbccddeeff Ciphertext: 8ea2b7ca516745bfeafc49904b496089

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT peripheral
  • +
  • AES256
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 56 of file aes256_ex1_encryptDecrypt.c.

+ +

Referenced by main().

+ +
+
+ +

◆ DataAESdecrypted

+ +
+
+ + + + +
uint8_t DataAESdecrypted[16]
+
+ +

Definition at line 75 of file aes256_ex1_encryptDecrypt.c.

+ +

Referenced by main().

+ +
+
+ +

◆ DataAESencrypted

+ +
+
+ + + + +
uint8_t DataAESencrypted[16]
+
+ +

Definition at line 74 of file aes256_ex1_encryptDecrypt.c.

+ +

Referenced by main().

+ +
+
+ +

◆ i

+ +
+
+ + + + +
int i = 0
+
+ +

Definition at line 76 of file aes256_ex1_encryptDecrypt.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/aes256__ex1__encrypt_decrypt_8c.js b/Generated Documentation/html/aes256__ex1__encrypt_decrypt_8c.js new file mode 100644 index 0000000..9813247 --- /dev/null +++ b/Generated Documentation/html/aes256__ex1__encrypt_decrypt_8c.js @@ -0,0 +1,9 @@ +var aes256__ex1__encrypt_decrypt_8c = +[ + [ "main", "aes256__ex1__encrypt_decrypt_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "CipherKey", "aes256__ex1__encrypt_decrypt_8c.html#ae94e4902466748fb3ed511b3ff2cc99a", null ], + [ "Data", "aes256__ex1__encrypt_decrypt_8c.html#a21b63e78d18ffd83c9093e74a6d8b2aa", null ], + [ "DataAESdecrypted", "aes256__ex1__encrypt_decrypt_8c.html#a02da6823437b3649f1432ec3442ce001", null ], + [ "DataAESencrypted", "aes256__ex1__encrypt_decrypt_8c.html#a332eb6f5f6eee4eb22b9ddddfde4ff90", null ], + [ "i", "aes256__ex1__encrypt_decrypt_8c.html#acb559820d9ca11295b4500f179ef6392", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/aes256__ex1__encrypt_decrypt_8c_source.html b/Generated Documentation/html/aes256__ex1__encrypt_decrypt_8c_source.html new file mode 100644 index 0000000..1e1f5ff --- /dev/null +++ b/Generated Documentation/html/aes256__ex1__encrypt_decrypt_8c_source.html @@ -0,0 +1,190 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/aes256/aes256_ex1_encryptDecrypt.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
aes256_ex1_encryptDecrypt.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
53 //******************************************************************************
+
54 #include "driverlib.h"
+
55 
+
56 uint8_t Data[16] =
+
57  {0x00, 0x11, 0x22, 0x33,
+
58  0x44, 0x55, 0x66, 0x77,
+
59  0x88, 0x99, 0xaa, 0xbb,
+
60  0xcc, 0xdd, 0xee, 0xff
+
61  };
+
62 
+
63 uint8_t CipherKey[32] =
+
64  {0x00, 0x01, 0x02, 0x03,
+
65  0x04, 0x05, 0x06, 0x07,
+
66  0x08, 0x09, 0x0a, 0x0b,
+
67  0x0c, 0x0d, 0x0e, 0x0f,
+
68  0x10, 0x11, 0x12, 0x13,
+
69  0x14, 0x15, 0x16, 0x17,
+
70  0x18, 0x19, 0x1a, 0x1b,
+
71  0x1c, 0x1d, 0x1e, 0x1f
+
72  };
+
73 
+
74 uint8_t DataAESencrypted[16]; // Encrypted data
+
75 uint8_t DataAESdecrypted[16]; // Decrypted data
+
76 int i = 0;
+
77 
+
78 void main(void){
+
79  // stop watchdog
+
80  WDT_A_hold(WDT_A_BASE);
+
81 
+
82  // Load a cipher key to module
+
83  AES256_setCipherKey(AES256_BASE, CipherKey, AES256_KEYLENGTH_256BIT);
+
84 
+
85  // Encrypt data with preloaded cipher key
+
86  AES256_encryptData(AES256_BASE, Data, DataAESencrypted);
+
87 
+
88  // Load a cipher key to module
+
89  AES256_setDecipherKey(AES256_BASE, CipherKey, AES256_KEYLENGTH_256BIT);
+
90 
+
91  // Decrypt data
+
92  AES256_decryptData(AES256_BASE, DataAESencrypted, DataAESdecrypted);
+
93 
+
94  // Array DataunAES should now contain the same data as array Data
+
95 
+
96  while(1){};
+
97 }
+
98 
+
uint8_t DataAESdecrypted[16]
+
uint8_t Data[16]
+
uint8_t DataAESencrypted[16]
+
void main(void)
+ +
uint8_t CipherKey[32]
+ +
+
+ + + + diff --git a/Generated Documentation/html/aes_8c.html b/Generated Documentation/html/aes_8c.html index 3bcfb3a..722c945 100644 --- a/Generated Documentation/html/aes_8c.html +++ b/Generated Documentation/html/aes_8c.html @@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('aes_8c.html',''); initResizable(); }); diff --git a/Generated Documentation/html/aes_8c_source.html b/Generated Documentation/html/aes_8c_source.html index 3a7d48f..d3b72d4 100644 --- a/Generated Documentation/html/aes_8c_source.html +++ b/Generated Documentation/html/aes_8c_source.html @@ -111,19 +111,19 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
19 #include <assert.h>
20 
21 uint8_t AES_setCipherKey (uint16_t baseAddress,
-
22  const uint8_t * CipherKey
+
22  const uint8_t * CipherKey
23  )
24 {
-
25  uint8_t i = 0;
+
25  uint8_t i = 0;
26  uint16_t tempVariable = 0;
27 
28  // Wait until AES accelerator is busy
29  while(AESBUSY == (HWREG16(baseAddress + OFS_AESASTAT) & AESBUSY) );
30 
-
31  for (i = 0; i < 16; i = i + 2)
+
31  for (i = 0; i < 16; i = i + 2)
32  {
-
33  tempVariable = (uint16_t)(CipherKey[i]);
-
34  tempVariable = tempVariable | ((uint16_t)(CipherKey[i + 1]) << 8);
+
33  tempVariable = (uint16_t)(CipherKey[i]);
+
34  tempVariable = tempVariable | ((uint16_t)(CipherKey[i + 1]) << 8);
35  HWREG16(baseAddress + OFS_AESAKEY) = tempVariable;
36  }
37 
@@ -134,10 +134,10 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
42 }
43 
44 uint8_t AES_encryptData (uint16_t baseAddress,
-
45  const uint8_t * Data,
+
45  const uint8_t * Data,
46  uint8_t * encryptedData)
47 {
-
48  uint8_t i;
+
48  uint8_t i;
49  uint16_t tempData = 0;
50  uint16_t tempVariable = 0;
51 
@@ -145,11 +145,11 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
53  HWREG16(baseAddress + OFS_AESACTL0) &= ~AESOP_3;
54 
55  // Write data to encrypt to module
-
56  for (i = 0; i < 16; i = i + 2)
+
56  for (i = 0; i < 16; i = i + 2)
57  {
58 
-
59  tempVariable = (uint16_t)(Data[i]);
-
60  tempVariable = tempVariable | ((uint16_t)(Data[i+1]) << 8);
+
59  tempVariable = (uint16_t)(Data[i]);
+
60  tempVariable = tempVariable | ((uint16_t)(Data[i+1]) << 8);
61  HWREG16(baseAddress + OFS_AESADIN) = tempVariable;
62  }
63 
@@ -161,11 +161,11 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
69  while(AESBUSY == (HWREG16(baseAddress + OFS_AESASTAT) & AESBUSY) );
70 
71  // Write encrypted data back to variable
-
72  for (i = 0; i < 16; i = i + 2)
+
72  for (i = 0; i < 16; i = i + 2)
73  {
74  tempData = HWREG16(baseAddress + OFS_AESADOUT);
-
75  *(encryptedData + i) = (uint8_t)tempData;
-
76  *(encryptedData +i + 1) = (uint8_t)(tempData >> 8);
+
75  *(encryptedData + i) = (uint8_t)tempData;
+
76  *(encryptedData +i + 1) = (uint8_t)(tempData >> 8);
77 
78  }
79 
@@ -173,10 +173,10 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
81 }
82 
83 uint8_t AES_decryptData (uint16_t baseAddress,
-
84  const uint8_t * Data,
+
84  const uint8_t * Data,
85  uint8_t * decryptedData)
86 {
-
87  uint8_t i;
+
87  uint8_t i;
88  uint16_t tempData = 0;
89  uint16_t tempVariable = 0;
90 
@@ -184,10 +184,10 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
92  HWREG16(baseAddress + OFS_AESACTL0) |= (AESOP_3);
93 
94  // Write data to decrypt to module
-
95  for (i = 0; i < 16; i = i + 2)
+
95  for (i = 0; i < 16; i = i + 2)
96  {
-
97  tempVariable = (uint16_t)(Data[i+1] << 8);
-
98  tempVariable = tempVariable | ((uint16_t)(Data[i]));
+
97  tempVariable = (uint16_t)(Data[i+1] << 8);
+
98  tempVariable = tempVariable | ((uint16_t)(Data[i]));
99  HWREG16(baseAddress + OFS_AESADIN) = tempVariable;
100  }
101 
@@ -199,20 +199,20 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
107  while(AESBUSY == (HWREG16(baseAddress + OFS_AESASTAT) & AESBUSY ));
108 
109  // Write encrypted data back to variable
-
110  for (i = 0; i < 16; i = i + 2)
+
110  for (i = 0; i < 16; i = i + 2)
111  {
112  tempData = HWREG16(baseAddress + OFS_AESADOUT);
-
113  *(decryptedData + i ) = (uint8_t)tempData;
-
114  *(decryptedData +i + 1) = (uint8_t)(tempData >> 8);
+
113  *(decryptedData + i ) = (uint8_t)tempData;
+
114  *(decryptedData +i + 1) = (uint8_t)(tempData >> 8);
115  }
116 
117  return STATUS_SUCCESS;
118 }
119 
120 uint8_t AES_setDecipherKey (uint16_t baseAddress,
-
121  const uint8_t * CipherKey)
+
121  const uint8_t * CipherKey)
122 {
-
123  uint8_t i;
+
123  uint8_t i;
124  uint16_t tempVariable = 0;
125 
126  // Set module to decrypt mode
@@ -220,10 +220,10 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
128  HWREG16(baseAddress + OFS_AESACTL0) |= AESOP1;
129 
130  // Write cipher key to key register
-
131  for (i = 0; i < 16; i = i + 2)
+
131  for (i = 0; i < 16; i = i + 2)
132  {
-
133  tempVariable = (uint16_t)(CipherKey[i]);
-
134  tempVariable = tempVariable | ((uint16_t)(CipherKey[i + 1]) << 8);
+
133  tempVariable = (uint16_t)(CipherKey[i]);
+
134  tempVariable = tempVariable | ((uint16_t)(CipherKey[i + 1]) << 8);
135  HWREG16(baseAddress + OFS_AESAKEY) = tempVariable;
136  }
137 
@@ -259,20 +259,20 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
167 }
168 
169 uint8_t AES_startEncryptData (uint16_t baseAddress,
-
170  const uint8_t * Data,
+
170  const uint8_t * Data,
171  uint8_t * encryptedData)
172 {
-
173  uint8_t i;
+
173  uint8_t i;
174  uint16_t tempVariable = 0;
175 
176  // Set module to encrypt mode
177  HWREG16(baseAddress + OFS_AESACTL0) &= ~AESOP_3;
178 
179  // Write data to encrypt to module
-
180  for (i = 0; i < 16; i = i + 2)
+
180  for (i = 0; i < 16; i = i + 2)
181  {
-
182  tempVariable = (uint16_t)(Data[i]);
-
183  tempVariable = tempVariable | ((uint16_t)(Data[i+1]) << 8);
+
182  tempVariable = (uint16_t)(Data[i]);
+
183  tempVariable = tempVariable | ((uint16_t)(Data[i+1]) << 8);
184  HWREG16(baseAddress + OFS_AESADIN) = tempVariable;
185  }
186 
@@ -284,19 +284,19 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
192 }
193 
194 uint8_t AES_startDecryptData (uint16_t baseAddress,
-
195  const uint8_t * Data)
+
195  const uint8_t * Data)
196 {
-
197  uint8_t i;
+
197  uint8_t i;
198  uint16_t tempVariable = 0;
199 
200  // Set module to decrypt mode
201  HWREG16(baseAddress + OFS_AESACTL0) |= (AESOP_3);
202 
203  // Write data to decrypt to module
-
204  for (i = 0; i < 16; i = i + 2)
+
204  for (i = 0; i < 16; i = i + 2)
205  {
-
206  tempVariable = (uint16_t)(Data[i+1] << 8);
-
207  tempVariable = tempVariable | ((uint16_t)(Data[i]));
+
206  tempVariable = (uint16_t)(Data[i+1] << 8);
+
207  tempVariable = tempVariable | ((uint16_t)(Data[i]));
208  HWREG16(baseAddress + OFS_AESADIN) = tempVariable;
209  }
210 
@@ -308,19 +308,19 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
216 }
217 
218 uint8_t AES_startSetDecipherKey (uint16_t baseAddress,
-
219  const uint8_t * CipherKey)
+
219  const uint8_t * CipherKey)
220 {
-
221  uint8_t i;
+
221  uint8_t i;
222  uint16_t tempVariable = 0;
223 
224  HWREG16(baseAddress + OFS_AESACTL0) &= ~(AESOP0);
225  HWREG16(baseAddress + OFS_AESACTL0) |= AESOP1;
226 
227  // Write cipher key to key register
-
228  for (i = 0; i < 16; i = i + 2)
+
228  for (i = 0; i < 16; i = i + 2)
229  {
-
230  tempVariable = (uint16_t)(CipherKey[i]);
-
231  tempVariable = tempVariable | ((uint16_t)(CipherKey[i+1]) << 8);
+
230  tempVariable = (uint16_t)(CipherKey[i]);
+
231  tempVariable = tempVariable | ((uint16_t)(CipherKey[i+1]) << 8);
232  HWREG16(baseAddress + OFS_AESAKEY) = tempVariable;
233  }
234 
@@ -331,7 +331,7 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
239  uint8_t *OutputData
240  )
241 {
-
242  uint8_t i;
+
242  uint8_t i;
243  uint16_t tempData = 0;
244 
245  // If module is busy, exit and return failure
@@ -339,11 +339,11 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
247  return STATUS_FAIL;
248 
249  // Write encrypted data back to variable
-
250  for (i = 0; i < 16; i = i + 2)
+
250  for (i = 0; i < 16; i = i + 2)
251  {
252  tempData = HWREG16(baseAddress + OFS_AESADOUT);
-
253  *(OutputData + i) = (uint8_t)tempData;
-
254  *(OutputData +i + 1) = (uint8_t)(tempData >> 8);
+
253  *(OutputData + i) = (uint8_t)tempData;
+
254  *(OutputData +i + 1) = (uint8_t)(tempData >> 8);
255  }
256 
257  return STATUS_SUCCESS;
@@ -366,9 +366,9 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
274 
275 uint8_t AES_startDecryptDataUsingEncryptionKey (
276  uint16_t baseAddress,
-
277  const uint8_t * Data)
+
277  const uint8_t * Data)
278 {
-
279  uint8_t i;
+
279  uint8_t i;
280  uint16_t tempVariable = 0;
281 
282  // Set module to decrypt mode
@@ -376,10 +376,10 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
284  HWREG16(baseAddress + OFS_AESACTL0) |= AESOP0;
285 
286  // Write data to decrypt to module
-
287  for (i = 0; i < 16; i = i + 2)
+
287  for (i = 0; i < 16; i = i + 2)
288  {
-
289  tempVariable = (uint16_t)(Data[i+1] << 8);
-
290  tempVariable = tempVariable | ((uint16_t)(Data[i]));
+
289  tempVariable = (uint16_t)(Data[i+1] << 8);
+
290  tempVariable = tempVariable | ((uint16_t)(Data[i]));
291  HWREG16(baseAddress + OFS_AESADIN) = tempVariable;
292  }
293 
@@ -391,10 +391,10 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
299 }
300 
301 uint8_t AES_decryptDataUsingEncryptionKey (uint16_t baseAddress,
-
302  const uint8_t * Data,
+
302  const uint8_t * Data,
303  uint8_t * decryptedData)
304 {
-
305  uint8_t i;
+
305  uint8_t i;
306  uint16_t tempData = 0;
307  uint16_t tempVariable = 0;
308 
@@ -403,10 +403,10 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
311  HWREG16(baseAddress + OFS_AESACTL0) |= AESOP0;
312 
313  // Write data to decrypt to module
-
314  for (i = 0; i < 16; i = i + 2)
+
314  for (i = 0; i < 16; i = i + 2)
315  {
-
316  tempVariable = (uint16_t)(Data[i+1] << 8);
-
317  tempVariable = tempVariable | ((uint16_t)(Data[i]));
+
316  tempVariable = (uint16_t)(Data[i+1] << 8);
+
317  tempVariable = tempVariable | ((uint16_t)(Data[i]));
318  HWREG16(baseAddress + OFS_AESADIN) = tempVariable;
319  }
320 
@@ -418,11 +418,11 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
326  while(AESBUSY == (HWREG16(baseAddress + OFS_AESASTAT) & AESBUSY) );
327 
328  // Write encrypted data back to variable
-
329  for (i = 0; i < 16; i = i + 2)
+
329  for (i = 0; i < 16; i = i + 2)
330  {
331  tempData = HWREG16(baseAddress + OFS_AESADOUT);
-
332  *(decryptedData + i ) = (uint8_t)tempData;
-
333  *(decryptedData +i + 1) = (uint8_t)(tempData >> 8);
+
332  *(decryptedData + i ) = (uint8_t)tempData;
+
333  *(decryptedData +i + 1) = (uint8_t)(tempData >> 8);
334  }
335 
336  return STATUS_SUCCESS;
@@ -433,7 +433,10 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable
341 //
344 //
345 //*****************************************************************************
+
uint16_t Data
+
uint8_t CipherKey[32]
+
uint8_t i
#define HWREG8(x)
Definition: hw_memmap.h:41
#define HWREG16(x)
Definition: hw_memmap.h:39
@@ -445,7 +448,7 @@ $(document).ready(function(){initNavTree('aes_8c_source.html',''); initResizable diff --git a/Generated Documentation/html/aes_8h.html b/Generated Documentation/html/aes_8h.html index 1792395..73f2e38 100644 --- a/Generated Documentation/html/aes_8h.html +++ b/Generated Documentation/html/aes_8h.html @@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('aes_8h.html',''); initResizable(); }); diff --git a/Generated Documentation/html/aes_8h_source.html b/Generated Documentation/html/aes_8h_source.html index 15d2a48..4ed2438 100644 --- a/Generated Documentation/html/aes_8h_source.html +++ b/Generated Documentation/html/aes_8h_source.html @@ -145,14 +145,14 @@ $(document).ready(function(){initNavTree('aes_8h_source.html',''); initResizable
60 //
61 //*****************************************************************************
62 extern uint8_t AES_setCipherKey(uint16_t baseAddress,
-
63  const uint8_t *CipherKey);
+
63  const uint8_t *CipherKey);
64 
65 //*****************************************************************************
66 //
79 //
80 //*****************************************************************************
81 extern uint8_t AES_encryptData(uint16_t baseAddress,
-
82  const uint8_t *Data,
+
82  const uint8_t *Data,
83  uint8_t *encryptedData);
84 
85 //*****************************************************************************
@@ -160,7 +160,7 @@ $(document).ready(function(){initNavTree('aes_8h_source.html',''); initResizable
100 //
101 //*****************************************************************************
102 extern uint8_t AES_decryptData(uint16_t baseAddress,
-
103  const uint8_t *Data,
+
103  const uint8_t *Data,
104  uint8_t *decryptedData);
105 
106 //*****************************************************************************
@@ -168,7 +168,7 @@ $(document).ready(function(){initNavTree('aes_8h_source.html',''); initResizable
118 //
119 //*****************************************************************************
120 extern uint8_t AES_setDecipherKey(uint16_t baseAddress,
-
121  const uint8_t *CipherKey);
+
121  const uint8_t *CipherKey);
122 
123 //*****************************************************************************
124 //
@@ -205,7 +205,7 @@ $(document).ready(function(){initNavTree('aes_8h_source.html',''); initResizable
221 //
222 //*****************************************************************************
223 extern uint8_t AES_startEncryptData(uint16_t baseAddress,
-
224  const uint8_t *Data,
+
224  const uint8_t *Data,
225  uint8_t *encryptedData);
226 
227 //*****************************************************************************
@@ -213,14 +213,14 @@ $(document).ready(function(){initNavTree('aes_8h_source.html',''); initResizable
243 //
244 //*****************************************************************************
245 extern uint8_t AES_startDecryptData(uint16_t baseAddress,
-
246  const uint8_t *Data);
+
246  const uint8_t *Data);
247 
248 //*****************************************************************************
249 //
261 //
262 //*****************************************************************************
263 extern uint8_t AES_startSetDecipherKey(uint16_t baseAddress,
-
264  const uint8_t *CipherKey);
+
264  const uint8_t *CipherKey);
265 
266 //*****************************************************************************
267 //
@@ -252,14 +252,14 @@ $(document).ready(function(){initNavTree('aes_8h_source.html',''); initResizable
352 //
353 //*****************************************************************************
354 extern uint8_t AES_startDecryptDataUsingEncryptionKey(uint16_t baseAddress,
-
355  const uint8_t *Data);
+
355  const uint8_t *Data);
356 
357 //*****************************************************************************
358 //
371 //
372 //*****************************************************************************
373 extern uint8_t AES_decryptDataUsingEncryptionKey(uint16_t baseAddress,
-
374  const uint8_t *Data,
+
374  const uint8_t *Data,
375  uint8_t *decryptedData);
376 
377 //*****************************************************************************
@@ -273,6 +273,8 @@ $(document).ready(function(){initNavTree('aes_8h_source.html',''); initResizable
385 
386 #endif
387 #endif // __MSP430WARE_AES_H__
+
uint16_t Data
+
uint8_t CipherKey[32]
@@ -280,7 +282,7 @@ $(document).ready(function(){initNavTree('aes_8h_source.html',''); initResizable diff --git a/Generated Documentation/html/aes__ex1__encrypt_decrypt_8c.html b/Generated Documentation/html/aes__ex1__encrypt_decrypt_8c.html new file mode 100644 index 0000000..5d938be --- /dev/null +++ b/Generated Documentation/html/aes__ex1__encrypt_decrypt_8c.html @@ -0,0 +1,207 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/aes/aes_ex1_encryptDecrypt.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
aes_ex1_encryptDecrypt.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + +

+Variables

uint8_t DataAESencrypted [16]
 
uint8_t DataAESdecrypted [16]
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 73 of file aes_ex1_encryptDecrypt.c.

+ +

References CipherKey, Data, DataAESdecrypted, and DataAESencrypted.

+ +
+
+

Variable Documentation

+ +

◆ DataAESdecrypted

+ +
+
+ + + + +
uint8_t DataAESdecrypted[16]
+
+Initial value:
= {
+
0x00, 0x00, 0x00, 0x00,
+
0x00, 0x00, 0x00, 0x00,
+
0x00, 0x00, 0x00, 0x00,
+
0x00, 0x00, 0x00, 0x00
+
}
+
+

Definition at line 65 of file aes_ex1_encryptDecrypt.c.

+ +

Referenced by main().

+ +
+
+ +

◆ DataAESencrypted

+ +
+
+ + + + +
uint8_t DataAESencrypted[16]
+
+Initial value:
= {
+
0x00, 0x00, 0x00, 0x00,
+
0x00, 0x00, 0x00, 0x00,
+
0x00, 0x00, 0x00, 0x00,
+
0x00, 0x00, 0x00, 0x00
+
}
+

AES Encryption and Decryption Example

+

Description: This demo shows how to use the AES Encryption and Decryption

         CC430F5137
+       -----------------
+

Key: 000102030405060708090a0b0c0d0e0f Plaintext: 00112233445566778899aabbccddeeff Ciphertext: 69c4e0d86a7b0430d8cdb78070b4c55a

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT peripheral
  • +
  • AES
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 57 of file aes_ex1_encryptDecrypt.c.

+ +

Referenced by main().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/aes__ex1__encrypt_decrypt_8c.js b/Generated Documentation/html/aes__ex1__encrypt_decrypt_8c.js new file mode 100644 index 0000000..b9ca0cc --- /dev/null +++ b/Generated Documentation/html/aes__ex1__encrypt_decrypt_8c.js @@ -0,0 +1,6 @@ +var aes__ex1__encrypt_decrypt_8c = +[ + [ "main", "aes__ex1__encrypt_decrypt_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "DataAESdecrypted", "aes__ex1__encrypt_decrypt_8c.html#a02da6823437b3649f1432ec3442ce001", null ], + [ "DataAESencrypted", "aes__ex1__encrypt_decrypt_8c.html#a332eb6f5f6eee4eb22b9ddddfde4ff90", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/aes__ex1__encrypt_decrypt_8c_source.html b/Generated Documentation/html/aes__ex1__encrypt_decrypt_8c_source.html new file mode 100644 index 0000000..1f13760 --- /dev/null +++ b/Generated Documentation/html/aes__ex1__encrypt_decrypt_8c_source.html @@ -0,0 +1,197 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/aes/aes_ex1_encryptDecrypt.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
aes_ex1_encryptDecrypt.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
53 //******************************************************************************
+
54 #include "driverlib.h"
+
55 
+
56 // Encrypted data
+
57 uint8_t DataAESencrypted[16] = {
+
58 0x00, 0x00, 0x00, 0x00,
+
59 0x00, 0x00, 0x00, 0x00,
+
60 0x00, 0x00, 0x00, 0x00,
+
61 0x00, 0x00, 0x00, 0x00
+
62 };
+
63 
+
64 // Decrypted data
+
65 uint8_t DataAESdecrypted[16] = {
+
66 0x00, 0x00, 0x00, 0x00,
+
67 0x00, 0x00, 0x00, 0x00,
+
68 0x00, 0x00, 0x00, 0x00,
+
69 0x00, 0x00, 0x00, 0x00
+
70 };
+
71 
+
72 
+
73 void main(void){
+
74  // stop watchdog
+
75  WDT_A_hold(WDT_A_BASE);
+
76 
+
77  uint8_t Data[16] = {
+
78  0x00, 0x11, 0x22, 0x33,
+
79  0x44, 0x55, 0x66, 0x77,
+
80  0x88, 0x99, 0xaa, 0xbb,
+
81  0xcc, 0xdd, 0xee, 0xff
+
82  };
+
83 
+
84  uint8_t CipherKey[16] = {
+
85  0x00, 0x01, 0x02, 0x03,
+
86  0x04, 0x05, 0x06, 0x07,
+
87  0x08, 0x09, 0x0a, 0x0b,
+
88  0x0c, 0x0d, 0x0e, 0x0f
+
89  };
+
90 
+
91  AES_enableInterrupt(AES_BASE);
+
92 
+
93  // Load a cipher key to module
+
94  AES_setCipherKey(AES_BASE, CipherKey);
+
95 
+
96  // Encrypt data with preloaded cipher key
+
97  AES_encryptData(AES_BASE, Data, DataAESencrypted);
+
98 
+
99  // Decrypt data with keys that were generated during encryption - takes 214 MCLK
+
100  // This function will generate all round keys needed for decryption first and then
+
101  // the encryption process starts
+
102  AES_decryptDataUsingEncryptionKey(AES_BASE, DataAESencrypted, DataAESdecrypted);
+
103 
+
104  // Array DataunAES should now contain the same data as array Data
+
105  while(1){};
+
106 }
+
uint16_t Data
+
uint8_t CipherKey[32]
+
uint8_t DataAESdecrypted[16]
+
uint8_t DataAESencrypted[16]
+
void main(void)
+ +
+
+ + + + diff --git a/Generated Documentation/html/aes__ex2__encrypt_decrypt_with_first_round_key_8c.html b/Generated Documentation/html/aes__ex2__encrypt_decrypt_with_first_round_key_8c.html new file mode 100644 index 0000000..012bb0f --- /dev/null +++ b/Generated Documentation/html/aes__ex2__encrypt_decrypt_with_first_round_key_8c.html @@ -0,0 +1,195 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/aes/aes_ex2_encryptDecryptWithFirstRoundKey.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
aes_ex2_encryptDecryptWithFirstRoundKey.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + + + +

+Variables

uint8_t DataAESencrypted [16]
 
uint8_t DataAESdecrypted [16]
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 59 of file aes_ex2_encryptDecryptWithFirstRoundKey.c.

+ +

References CipherKey, Data, DataAESdecrypted, and DataAESencrypted.

+ +
+
+

Variable Documentation

+ +

◆ DataAESdecrypted

+ +
+
+ + + + +
uint8_t DataAESdecrypted[16]
+
+ +

Definition at line 57 of file aes_ex2_encryptDecryptWithFirstRoundKey.c.

+ +

Referenced by main().

+ +
+
+ +

◆ DataAESencrypted

+ +
+
+ + + + +
uint8_t DataAESencrypted[16]
+
+

AES Encryption and Decryption Example

+

Description: This demo shows how to use the AES Encryption and Decryption

         CC430F5137
+       -----------------
+

Key: 000102030405060708090a0b0c0d0e0f Plaintext: 00112233445566778899aabbccddeeff Ciphertext: 69c4e0d86a7b0430d8cdb78070b4c55a

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • WDT peripheral
  • +
  • AES
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 56 of file aes_ex2_encryptDecryptWithFirstRoundKey.c.

+ +

Referenced by main().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/aes__ex2__encrypt_decrypt_with_first_round_key_8c.js b/Generated Documentation/html/aes__ex2__encrypt_decrypt_with_first_round_key_8c.js new file mode 100644 index 0000000..576e054 --- /dev/null +++ b/Generated Documentation/html/aes__ex2__encrypt_decrypt_with_first_round_key_8c.js @@ -0,0 +1,6 @@ +var aes__ex2__encrypt_decrypt_with_first_round_key_8c = +[ + [ "main", "aes__ex2__encrypt_decrypt_with_first_round_key_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "DataAESdecrypted", "aes__ex2__encrypt_decrypt_with_first_round_key_8c.html#a02da6823437b3649f1432ec3442ce001", null ], + [ "DataAESencrypted", "aes__ex2__encrypt_decrypt_with_first_round_key_8c.html#a332eb6f5f6eee4eb22b9ddddfde4ff90", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/aes__ex2__encrypt_decrypt_with_first_round_key_8c_source.html b/Generated Documentation/html/aes__ex2__encrypt_decrypt_with_first_round_key_8c_source.html new file mode 100644 index 0000000..aeaae4b --- /dev/null +++ b/Generated Documentation/html/aes__ex2__encrypt_decrypt_with_first_round_key_8c_source.html @@ -0,0 +1,185 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/aes/aes_ex2_encryptDecryptWithFirstRoundKey.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
aes_ex2_encryptDecryptWithFirstRoundKey.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
53 //******************************************************************************
+
54 #include "driverlib.h"
+
55 
+
56 uint8_t DataAESencrypted[16]; // Encrypted data
+
57 uint8_t DataAESdecrypted[16]; // Decrypted data
+
58 
+
59 void main(void){
+
60  uint8_t Data[16] = {
+
61  0x00, 0x11, 0x22, 0x33,
+
62  0x44, 0x55, 0x66, 0x77,
+
63  0x88, 0x99, 0xaa, 0xbb,
+
64  0xcc, 0xdd, 0xee, 0xff
+
65  };
+
66 
+
67  uint8_t CipherKey[16] = {
+
68  0x00, 0x01, 0x02, 0x03,
+
69  0x04, 0x05, 0x06, 0x07,
+
70  0x08, 0x09, 0x0a, 0x0b,
+
71  0x0c, 0x0d, 0x0e, 0x0f
+
72  };
+
73 
+
74  // stop watchdog
+
75  WDT_A_hold(WDT_A_BASE);
+
76 
+
77  // Load a cipher key to module
+
78  AES_setCipherKey(AES_BASE, CipherKey );
+
79 
+
80  // Encrypt data with preloaded cipher key
+
81  AES_encryptData(AES_BASE, Data, DataAESencrypted);
+
82 
+
83  // Reset module (not mandatory - just to delete all registers and keys)
+
84  AES_reset(AES_BASE);
+
85 
+
86  // Load and generate decryption key for 1st decryption round - takes ~52 MCLK
+
87  AES_setDecipherKey(AES_BASE, CipherKey);
+
88 
+
89  // Decrypt data by using pregenerated key - takes ~167 MCLK
+
90  AES_decryptData(AES_BASE, DataAESencrypted, DataAESdecrypted);
+
91 
+
92  // Array DataunAES should now contain the same data as array Data
+
93  while(1){};
+
94 }
+
uint16_t Data
+
uint8_t CipherKey[32]
+
uint8_t DataAESdecrypted[16]
+
uint8_t DataAESencrypted[16]
+ + +
+
+ + + + diff --git a/Generated Documentation/html/annotated.html b/Generated Documentation/html/annotated.html new file mode 100644 index 0000000..2e3a25c --- /dev/null +++ b/Generated Documentation/html/annotated.html @@ -0,0 +1,109 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Data Structures + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Data Structures
+
+
+
Here are the data structures with brief descriptions:
+
+
+ + + + diff --git a/Generated Documentation/html/annotated_dup.js b/Generated Documentation/html/annotated_dup.js new file mode 100644 index 0000000..a91719b --- /dev/null +++ b/Generated Documentation/html/annotated_dup.js @@ -0,0 +1,4 @@ +var annotated_dup = +[ + [ "ti_mcu_msp430_driverlib_product", "classti__mcu__msp430__driverlib__product.html", "classti__mcu__msp430__driverlib__product" ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/battbak_8c.html b/Generated Documentation/html/battbak_8c.html index 170574d..bf86e18 100644 --- a/Generated Documentation/html/battbak_8c.html +++ b/Generated Documentation/html/battbak_8c.html @@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('battbak_8c.html',''); initResizable(); diff --git a/Generated Documentation/html/battbak_8c_source.html b/Generated Documentation/html/battbak_8c_source.html index 5cc952b..170e244 100644 --- a/Generated Documentation/html/battbak_8c_source.html +++ b/Generated Documentation/html/battbak_8c_source.html @@ -177,7 +177,7 @@ $(document).ready(function(){initNavTree('battbak_8c_source.html',''); initResiz diff --git a/Generated Documentation/html/battbak_8h.html b/Generated Documentation/html/battbak_8h.html index f25a079..352e2be 100644 --- a/Generated Documentation/html/battbak_8h.html +++ b/Generated Documentation/html/battbak_8h.html @@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('battbak_8h.html',''); initResizable(); diff --git a/Generated Documentation/html/battbak_8h_source.html b/Generated Documentation/html/battbak_8h_source.html index ca21504..0d4f2e5 100644 --- a/Generated Documentation/html/battbak_8h_source.html +++ b/Generated Documentation/html/battbak_8h_source.html @@ -238,7 +238,7 @@ $(document).ready(function(){initNavTree('battbak_8h_source.html',''); initResiz diff --git a/Generated Documentation/html/battbak__ex1__calendermode_l_p_m3_8c.html b/Generated Documentation/html/battbak__ex1__calendermode_l_p_m3_8c.html new file mode 100644 index 0000000..8548297 --- /dev/null +++ b/Generated Documentation/html/battbak__ex1__calendermode_l_p_m3_8c.html @@ -0,0 +1,202 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/battbak/battbak_ex1_calendermodeLPM3.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
battbak_ex1_calendermodeLPM3.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void RTC_B_ISR (void)
 
+ + + +

+Variables

volatile Calendar newTime
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 70 of file battbak_ex1_calendermodeLPM3.c.

+ +

References __no_operation(), and param.

+ +
+
+ +

◆ RTC_B_ISR()

+ +
+
+ + + + + + + + +
void RTC_B_ISR (void )
+
+ +

Definition at line 144 of file battbak_ex1_calendermodeLPM3.c.

+ +

References __no_operation(), and newTime.

+ +
+
+

Variable Documentation

+ +

◆ newTime

+ +
+
+ + + + +
volatile Calendar newTime
+
+

RTC_B in Calendar mode with LPM3, Interruptions every 1s, 1m, and 5th day of week at 5:00pm

+

This program demonstrates the battery backup peripheral working with RTC_B in LPM3. The LOCKBAK bit is cleared before RTC interrupt enabled and RTC interrupts will be serviced as normal interrupts. Note that if XT1 is not present the code loops in an infinite loop. ACLK = LFXT1 = 32768Hz, MCLK = SMCLK = default DCO = 32 x ACLK = 1048576Hz

+

+Tested On: MSP430F6638

+

/|\ | XIN|- | | | 32kHz —|RST XOUT|- | | | P1.0 |--> Toggles every second | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • RTC peripheral
  • +
  • UCS peripheral
  • +
  • GPIO Port peripheral
  • +
  • Battery Backup peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • RTC_B_VECTOR
  • +
+ +

Definition at line 68 of file battbak_ex1_calendermodeLPM3.c.

+ +

Referenced by RTC_B_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/battbak__ex1__calendermode_l_p_m3_8c.js b/Generated Documentation/html/battbak__ex1__calendermode_l_p_m3_8c.js new file mode 100644 index 0000000..e5a0329 --- /dev/null +++ b/Generated Documentation/html/battbak__ex1__calendermode_l_p_m3_8c.js @@ -0,0 +1,6 @@ +var battbak__ex1__calendermode_l_p_m3_8c = +[ + [ "main", "battbak__ex1__calendermode_l_p_m3_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "RTC_B_ISR", "battbak__ex1__calendermode_l_p_m3_8c.html#a775f6c4e108b72493d5ed4e2e821a4fa", null ], + [ "newTime", "battbak__ex1__calendermode_l_p_m3_8c.html#ac6f7bbb5bb5d80ecf8c2eb3916ee8187", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/battbak__ex1__calendermode_l_p_m3_8c_source.html b/Generated Documentation/html/battbak__ex1__calendermode_l_p_m3_8c_source.html new file mode 100644 index 0000000..08af133 --- /dev/null +++ b/Generated Documentation/html/battbak__ex1__calendermode_l_p_m3_8c_source.html @@ -0,0 +1,255 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/battbak/battbak_ex1_calendermodeLPM3.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
battbak_ex1_calendermodeLPM3.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
65 //******************************************************************************
+
66 #include "driverlib.h"
+
67 
+
68 volatile Calendar newTime;
+
69 
+
70 void main(void)
+
71 {
+
72  Calendar currentTime;
+
73 
+
74  WDT_A_hold(WDT_A_BASE);
+
75 
+
76  // Unlock backup system
+
77  while(BattBak_unlockBackupSubSystem(BAK_BATT_BASE));
+
78 
+
79  //Set P1.0 to output direction
+
80  GPIO_setAsOutputPin(
+
81  GPIO_PORT_P1,
+
82  GPIO_PIN0
+
83  );
+
84 
+
85  //Initialize LFXT1
+
86  UCS_turnOnLFXT1(UCS_XT1_DRIVE_3,
+
87  UCS_XCAP_3
+
88  );
+
89 
+
90  //Setup Current Time for Calendar
+
91  currentTime.Seconds = 0x00;
+
92  currentTime.Minutes = 0x26;
+
93  currentTime.Hours = 0x13;
+
94  currentTime.DayOfWeek = 0x03;
+
95  currentTime.DayOfMonth = 0x20;
+
96  currentTime.Month = 0x07;
+
97  currentTime.Year = 0x2011;
+
98 
+
99  //Initialize Calendar Mode of RTC
+
100  /*
+
101  * Base Address of the RTC_B
+
102  * Pass in current time, intialized above
+
103  * Use BCD as Calendar Register Format
+
104  */
+
105  RTC_B_initCalendar(RTC_B_BASE,
+
106  &currentTime,
+
107  RTC_B_FORMAT_BCD);
+
108 
+
109  //Setup Calendar Alarm for 5:00pm on the 5th day of the week.
+
110  //Note: Does not specify day of the week.
+
111  RTC_B_configureCalendarAlarmParam param = {0};
+
112  param.minutesAlarm = 0x00;
+
113  param.hoursAlarm = 0x17;
+
114  param.dayOfWeekAlarm = RTC_B_ALARMCONDITION_OFF;
+
115  param.dayOfMonthAlarm = 0x05;
+
116  RTC_B_configureCalendarAlarm(RTC_B_BASE, &param);
+
117 
+
118  //Specify an interrupt to assert every minute
+
119  RTC_B_setCalendarEvent(RTC_B_BASE,
+
120  RTC_B_CALENDAREVENT_MINUTECHANGE);
+
121 
+
122  //Enable interrupt for RTC Ready Status, which asserts when the RTC
+
123  //Calendar registers are ready to read.
+
124  //Also, enable interrupts for the Calendar alarm and Calendar event.
+
125  RTC_B_clearInterrupt(RTC_B_BASE,
+
126  RTCRDYIFG + RTCTEVIFG + RTCAIFG);
+
127  RTC_B_enableInterrupt(RTC_B_BASE,
+
128  RTCRDYIE + RTCTEVIE + RTCAIE);
+
129 
+
130  //Start RTC Clock
+
131  RTC_B_startClock(RTC_B_BASE);
+
132 
+
133  //Enter LPM3 mode with interrupts enabled
+
134  __bis_SR_register(LPM3_bits + GIE);
+
135  __no_operation();
+
136 }
+
137 
+
138 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
139 #pragma vector=RTC_VECTOR
+
140 __interrupt
+
141 #elif defined(__GNUC__)
+
142 __attribute__((interrupt(RTC_VECTOR)))
+
143 #endif
+
144 void RTC_B_ISR(void)
+
145 {
+
146  // Unlock backup system
+
147  while(BattBak_unlockBackupSubSystem(BAK_BATT_BASE));
+
148 
+
149  switch(__even_in_range(RTCIV,16))
+
150  {
+
151  case 0: break; //No interrupts
+
152  case 2: //RTCRDYIFG
+
153  //Toggle P1.0 every second
+
154  GPIO_toggleOutputOnPin(
+
155  GPIO_PORT_P1,
+
156  GPIO_PIN0);
+
157  break;
+
158  case 4: //RTCEVIFG
+
159  //Interrupts every minute
+
160  __no_operation();
+
161 
+
162  //Read out New Time a Minute Later BREAKPOINT HERE
+
163  newTime = RTC_B_getCalendarTime(RTC_B_BASE);
+
164  break;
+
165  case 6: //RTCAIFG
+
166  //Interrupts 5:00pm on 5th day of week
+
167  __no_operation();
+
168  break;
+
169  case 8: break; //RT0PSIFG
+
170  case 10: break; //RT1PSIFG
+
171  case 12: break; //Reserved
+
172  case 14: break; //Reserved
+
173  case 16: break; //Reserved
+
174  default: break;
+
175  }
+
176 }
+
MPU_initThreeSegmentsParam param
+
void main(void)
+
void RTC_B_ISR(void)
+
volatile Calendar newTime
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/classes.html b/Generated Documentation/html/classes.html new file mode 100644 index 0000000..960cfd9 --- /dev/null +++ b/Generated Documentation/html/classes.html @@ -0,0 +1,110 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Data Structure Index + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Data Structure Index
+
+ +
+ + + + diff --git a/Generated Documentation/html/classti__mcu__msp430__driverlib__product.html b/Generated Documentation/html/classti__mcu__msp430__driverlib__product.html new file mode 100644 index 0000000..6584645 --- /dev/null +++ b/Generated Documentation/html/classti__mcu__msp430__driverlib__product.html @@ -0,0 +1,160 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: ti_mcu_msp430_driverlib_product Class Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
ti_mcu_msp430_driverlib_product Class Reference
+
+
+ + + + +

+Public Member Functions

void exec (Scriptable xdcO, Session ses)
 
+

Detailed Description

+
+

Definition at line 12 of file ti_mcu_msp430_driverlib_product.java.

+

Member Function Documentation

+ +

◆ exec()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void exec (Scriptable xdcO,
Session ses 
)
+
+inline
+
+ +

Definition at line 362 of file ti_mcu_msp430_driverlib_product.java.

+ +

References Value.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/Generated Documentation/html/classti__mcu__msp430__driverlib__product.js b/Generated Documentation/html/classti__mcu__msp430__driverlib__product.js new file mode 100644 index 0000000..2e6b189 --- /dev/null +++ b/Generated Documentation/html/classti__mcu__msp430__driverlib__product.js @@ -0,0 +1,4 @@ +var classti__mcu__msp430__driverlib__product = +[ + [ "exec", "classti__mcu__msp430__driverlib__product.html#a9e644638625948f1c3c6f1219f7b0130", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/comp__b_8c.html b/Generated Documentation/html/comp__b_8c.html index 2ec04e6..bbebd6b 100644 --- a/Generated Documentation/html/comp__b_8c.html +++ b/Generated Documentation/html/comp__b_8c.html @@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('comp__b_8c.html',''); initResizable(); diff --git a/Generated Documentation/html/comp__b_8c_source.html b/Generated Documentation/html/comp__b_8c_source.html index a6d318e..c82d7a2 100644 --- a/Generated Documentation/html/comp__b_8c_source.html +++ b/Generated Documentation/html/comp__b_8c_source.html @@ -110,7 +110,7 @@ $(document).ready(function(){initNavTree('comp__b_8c_source.html',''); initResiz
18 
19 #include <assert.h>
20 
-
21 bool Comp_B_init(uint16_t baseAddress, Comp_B_initParam *param)
+
21 bool Comp_B_init(uint16_t baseAddress, Comp_B_initParam *param)
22 {
23  bool retVal = STATUS_SUCCESS;
24 
@@ -125,12 +125,12 @@ $(document).ready(function(){initNavTree('comp__b_8c_source.html',''); initResiz
33  HWREG16(baseAddress + OFS_CBCTL2) &= ~(CBRS_3 | CBREFL_3);
34 
35  //Set the Positive Terminal
-
36  if(COMP_B_VREF != param->positiveTerminalInput) {
+
36  if(COMP_B_VREF != param->positiveTerminalInput) {
37  //Enable Positive Terminal Input Mux and Set it to the appropriate input
-
38  HWREG16(baseAddress + OFS_CBCTL0) |= CBIPEN + param->positiveTerminalInput;
+
38  HWREG16(baseAddress + OFS_CBCTL0) |= CBIPEN + param->positiveTerminalInput;
39 
40  //Disable the input buffer
-
41  HWREG16(baseAddress + OFS_CBCTL3) |= (1 << param->positiveTerminalInput);
+
41  HWREG16(baseAddress + OFS_CBCTL3) |= (1 << param->positiveTerminalInput);
42  }
43  else {
44  //Reset and Set COMPB Control 2 Register
@@ -139,12 +139,12 @@ $(document).ready(function(){initNavTree('comp__b_8c_source.html',''); initResiz
47  }
48 
49  //Set the Negative Terminal
-
50  if (COMP_B_VREF != param->negativeTerminalInput) {
+
50  if (COMP_B_VREF != param->negativeTerminalInput) {
51  //Enable Negative Terminal Input Mux and Set it to the appropriate input
-
52  HWREG16(baseAddress + OFS_CBCTL0) |= CBIMEN + (param->negativeTerminalInput << 8);
+
52  HWREG16(baseAddress + OFS_CBCTL0) |= CBIMEN + (param->negativeTerminalInput << 8);
53 
54  //Disable the input buffer
-
55  HWREG16(baseAddress + OFS_CBCTL3) |= (1 << param->negativeTerminalInput);
+
55  HWREG16(baseAddress + OFS_CBCTL3) |= (1 << param->negativeTerminalInput);
56  }
57  else {
58  //Reset and Set COMPB Control 2 Register
@@ -154,15 +154,15 @@ $(document).ready(function(){initNavTree('comp__b_8c_source.html',''); initResiz
62 
63  //Reset and Set COMPB Control 1 Register
64  HWREG16(baseAddress + OFS_CBCTL1) =
-
65  param->powerModeSelect //Set the power mode
-
66  + param->outputFilterEnableAndDelayLevel //Set the filter enable bit and delay
-
67  + param->invertedOutputPolarity; //Set the polarity of the output
+
65  param->powerModeSelect //Set the power mode
+
66  + param->outputFilterEnableAndDelayLevel //Set the filter enable bit and delay
+
67  + param->invertedOutputPolarity; //Set the polarity of the output
68 
69  return (retVal);
70 }
71 
72 void Comp_B_configureReferenceVoltage(uint16_t baseAddress,
-
73  Comp_B_configureReferenceVoltageParam *param)
+
73  Comp_B_configureReferenceVoltageParam *param)
74 {
75  //Set to VREF0
76  HWREG16(baseAddress + OFS_CBCTL1) &= ~(CBMRVS);
@@ -171,10 +171,10 @@ $(document).ready(function(){initNavTree('comp__b_8c_source.html',''); initResiz
79  HWREG16(baseAddress + OFS_CBCTL2) &= CBRSEL;
80 
81  //Set Voltage Source (Vcc | Vref, resistor ladder or not)
-
82  if (COMP_B_VREFBASE_VCC == param->supplyVoltageReferenceBase) {
+
82  if (COMP_B_VREFBASE_VCC == param->supplyVoltageReferenceBase) {
83  HWREG16(baseAddress + OFS_CBCTL2) |= CBRS_1; //Vcc with resistor ladder
84  }
-
85  else if (param->lowerLimitSupplyVoltageFractionOf32 == 32) {
+
85  else if (param->lowerLimitSupplyVoltageFractionOf32 == 32) {
86  //If the lower limit is 32, then the upper limit has to be 32 due to the
87  //assertion that upper must be >= to the lower limit. If the numerator is
88  //equal to 32, then the equation would be 32/32 == 1, therefore no resistor
@@ -187,12 +187,12 @@ $(document).ready(function(){initNavTree('comp__b_8c_source.html',''); initResiz
95 
96  //Set COMPD Control 2 Register
97  HWREG16(baseAddress + OFS_CBCTL2) |=
-
98  param->supplyVoltageReferenceBase //Set Supply Voltage Base
-
99  + ((param->upperLimitSupplyVoltageFractionOf32 - 1) << 8) //Set Supply Voltage Num.
-
100  + (param->lowerLimitSupplyVoltageFractionOf32 - 1);
+
98  param->supplyVoltageReferenceBase //Set Supply Voltage Base
+
99  + ((param->upperLimitSupplyVoltageFractionOf32 - 1) << 8) //Set Supply Voltage Num.
+
100  + (param->lowerLimitSupplyVoltageFractionOf32 - 1);
101 
102  HWREG16(baseAddress + OFS_CBCTL2) &= ~(CBREFACC);
-
103  HWREG16(baseAddress + OFS_CBCTL2) |= param->referenceAccuracy;
+
103  HWREG16(baseAddress + OFS_CBCTL2) |= param->referenceAccuracy;
104 }
105 
106 void Comp_B_enableInterrupt(uint16_t baseAddress,
@@ -298,6 +298,7 @@ $(document).ready(function(){initNavTree('comp__b_8c_source.html',''); initResiz
206 //
209 //
210 //*****************************************************************************
+
MPU_initThreeSegmentsParam param
#define HWREG16(x)
Definition: hw_memmap.h:39
@@ -308,7 +309,7 @@ $(document).ready(function(){initNavTree('comp__b_8c_source.html',''); initResiz diff --git a/Generated Documentation/html/comp__b_8h.html b/Generated Documentation/html/comp__b_8h.html index ff50cfd..efa877d 100644 --- a/Generated Documentation/html/comp__b_8h.html +++ b/Generated Documentation/html/comp__b_8h.html @@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('comp__b_8h.html',''); initResizable(); diff --git a/Generated Documentation/html/comp__b_8h_source.html b/Generated Documentation/html/comp__b_8h_source.html index 2fad8e0..dfc9dce 100644 --- a/Generated Documentation/html/comp__b_8h_source.html +++ b/Generated Documentation/html/comp__b_8h_source.html @@ -289,14 +289,14 @@ $(document).ready(function(){initNavTree('comp__b_8h_source.html',''); initResiz
283 //
284 //*****************************************************************************
285 extern bool Comp_B_init(uint16_t baseAddress,
-
286  Comp_B_initParam *param);
+
286  Comp_B_initParam *param);
287 
288 //*****************************************************************************
289 //
303 //
304 //*****************************************************************************
305 extern void Comp_B_configureReferenceVoltage(uint16_t baseAddress,
-
306  Comp_B_configureReferenceVoltageParam *param);
+
306  Comp_B_configureReferenceVoltageParam *param);
307 
308 //*****************************************************************************
309 //
@@ -408,6 +408,7 @@ $(document).ready(function(){initNavTree('comp__b_8h_source.html',''); initResiz
647 
648 #endif
649 #endif // __MSP430WARE_COMP_B_H__
+
MPU_initThreeSegmentsParam param
@@ -415,7 +416,7 @@ $(document).ready(function(){initNavTree('comp__b_8h_source.html',''); initResiz diff --git a/Generated Documentation/html/comp__b__ex1__2_v_ref_8c.html b/Generated Documentation/html/comp__b__ex1__2_v_ref_8c.html new file mode 100644 index 0000000..c03bf82 --- /dev/null +++ b/Generated Documentation/html/comp__b__ex1__2_v_ref_8c.html @@ -0,0 +1,158 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/comp_b/comp_b_ex1_2VRef.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
comp_b_ex1_2VRef.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

LED Toggle in LPM4, Input is compared against 2.0V Internal Reference

+

Use CompB and internal reference to determine if input 'Vcompare' is high of low. When Vcompare exceeds 2.0V CBOUT goes high and when Vcompare is less than 2.0V then CBOUT goes low. Connect P1.6/CBOUT to P1.0 externally to see the LED toggle accordingly.

        MSP430x552x
+    ------------------
+/|\|                  |
+ | |                  |
+ --|RST       P6.0/CB0|<- Vcompare
+   |        P1.6/CBOUT|--> 'high'(Vcompare>2.0V); 'low'(Vcompare<2.0V)
+   |                  | |
+   |              P1.0|_| LED 'ON'(Vcompare>2.0V); 'OFF'(Vcompare<2.0V)
+   |                  |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • COMPB peripheral
  • +
  • GPIO Port peripheral
  • +
  • CB0
  • +
  • CBOUT
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 66 of file comp_b_ex1_2VRef.c.

+ +

References __delay_cycles(), __no_operation(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/comp__b__ex1__2_v_ref_8c.js b/Generated Documentation/html/comp__b__ex1__2_v_ref_8c.js new file mode 100644 index 0000000..b2ed42d --- /dev/null +++ b/Generated Documentation/html/comp__b__ex1__2_v_ref_8c.js @@ -0,0 +1,4 @@ +var comp__b__ex1__2_v_ref_8c = +[ + [ "main", "comp__b__ex1__2_v_ref_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/comp__b__ex1__2_v_ref_8c_source.html b/Generated Documentation/html/comp__b__ex1__2_v_ref_8c_source.html new file mode 100644 index 0000000..dd2d508 --- /dev/null +++ b/Generated Documentation/html/comp__b__ex1__2_v_ref_8c_source.html @@ -0,0 +1,200 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/comp_b/comp_b_ex1_2VRef.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
comp_b_ex1_2VRef.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
62 //******************************************************************************
+
63 
+
64 #include "driverlib.h"
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71 
+
72  //Select CBOUT function on P1.6/CBOUT and set P1.6 to output direction
+
73  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
74  GPIO_PORT_P1,
+
75  GPIO_PIN6
+
76  );
+
77 
+
78  //Initialize the Comparator B module
+
79  /* Base Address of Comparator B,
+
80  * Pin CB0 to Positive(+) Terminal,
+
81  * Reference Voltage to Negative(-) Terminal,
+
82  * Normal Power Mode,
+
83  * Output Filter On with minimal delay,
+
84  * Non-Inverted Output Polarity
+
85  */
+
86  Comp_B_initParam param = {0};
+
87  param.positiveTerminalInput = COMP_B_INPUT0;
+
88  param.negativeTerminalInput = COMP_B_VREF;
+
89  param.powerModeSelect = COMP_B_POWERMODE_NORMALMODE;
+
90  param.outputFilterEnableAndDelayLevel = COMP_B_FILTEROUTPUT_DLYLVL1;
+
91  param.invertedOutputPolarity = COMP_B_NORMALOUTPUTPOLARITY;
+
92  Comp_B_init(COMP_B_BASE, &param);
+
93 
+
94  //Set the reference voltage that is being supplied to the (-) terminal
+
95  /* Base Address of Comparator B,
+
96  * Reference Voltage of 2.0 V,
+
97  * Lower Limit of 2.0*(32/32) = 2.0V,
+
98  * Upper Limit of 2.0*(32/32) = 2.0V,
+
99  * Static Mode Accuracy
+
100  */
+
101  Comp_B_configureReferenceVoltageParam refVoltageParam = {0};
+
102  refVoltageParam.supplyVoltageReferenceBase = COMP_B_VREFBASE2_0V;
+
103  refVoltageParam.lowerLimitSupplyVoltageFractionOf32 = 32;
+
104  refVoltageParam.upperLimitSupplyVoltageFractionOf32 = 32;
+
105  refVoltageParam.referenceAccuracy = COMP_B_ACCURACY_STATIC;
+
106  Comp_B_configureReferenceVoltage(COMP_B_BASE, &refVoltageParam);
+
107 
+
108  //Allow power to Comparator module
+
109  Comp_B_enable(COMP_B_BASE);
+
110 
+
111  //delay for the reference to settle
+
112  __delay_cycles(75);
+
113 
+
114  //Enter LPM4
+
115  __bis_SR_register(LPM4_bits);
+
116 
+
117  //For debug
+
118  __no_operation();
+
119 }
+
MPU_initThreeSegmentsParam param
+
void main(void)
+ +
__no_operation()
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/comp__b__ex2__1_v5_ref_int_8c.html b/Generated Documentation/html/comp__b__ex2__1_v5_ref_int_8c.html new file mode 100644 index 0000000..7e66188 --- /dev/null +++ b/Generated Documentation/html/comp__b__ex2__1_v5_ref_int_8c.html @@ -0,0 +1,176 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/comp_b/comp_b_ex2_1V5RefInt.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
comp_b_ex2_1V5RefInt.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void COMP_B_ISR (void)
 
+

Function Documentation

+ +

◆ COMP_B_ISR()

+ +
+
+ + + + + + + + +
void COMP_B_ISR (void )
+
+ +

Definition at line 138 of file comp_b_ex2_1V5RefInt.c.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

COMPB - CB Interrupt, Input compared against 1.5V Internal Reference

+

Use CompB and internal reference to determine if input 'Vcompare' is high of low. For the first time, when Vcompare exceeds the 1.5V internal reference, CBIFG is set and device enters the CompB ISR. In the ISR CBIES is toggled such that when Vcompare is less than 1.5V internal reference, CBIFG is set. LED is toggled inside the CompB ISR

           MSP430x552x
+       ------------------
+   /|\|                  |
+    | |                  |
+    --|RST       P6.0/CB0|<- Vcompare
+      |              P1.0|-> LED 'ON'(Vcompare>1.5V); 'OFF'(Vcompare<1.5V)
+      |                  |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • COMPB peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • COMP_B_B_VECTOR
  • +
+ +

Definition at line 64 of file comp_b_ex2_1V5RefInt.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/comp__b__ex2__1_v5_ref_int_8c.js b/Generated Documentation/html/comp__b__ex2__1_v5_ref_int_8c.js new file mode 100644 index 0000000..570666d --- /dev/null +++ b/Generated Documentation/html/comp__b__ex2__1_v5_ref_int_8c.js @@ -0,0 +1,5 @@ +var comp__b__ex2__1_v5_ref_int_8c = +[ + [ "COMP_B_ISR", "comp__b__ex2__1_v5_ref_int_8c.html#a177a60fc7fa9be5bb82b664a578e098e", null ], + [ "main", "comp__b__ex2__1_v5_ref_int_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/comp__b__ex2__1_v5_ref_int_8c_source.html b/Generated Documentation/html/comp__b__ex2__1_v5_ref_int_8c_source.html new file mode 100644 index 0000000..850896c --- /dev/null +++ b/Generated Documentation/html/comp__b__ex2__1_v5_ref_int_8c_source.html @@ -0,0 +1,233 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/comp_b/comp_b_ex2_1V5RefInt.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
comp_b_ex2_1V5RefInt.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  //Stop WDT
+
67  WDT_A_hold(WDT_A_BASE);
+
68 
+
69  //Set P1.0 to output direction
+
70  GPIO_setAsOutputPin(
+
71  GPIO_PORT_P1,
+
72  GPIO_PIN0
+
73  );
+
74 
+
75  //Initialize the Comparator B module
+
76  /*
+
77  * Base Address of Comparator B,
+
78  * Pin CB0 to Positive(+) Terminal
+
79  * Reference Voltage to Negative(-) Terminal
+
80  * Normal Power Mode
+
81  * Output Filter On with minimal delay
+
82  * Non-Inverted Output Polarity
+
83  */
+
84  Comp_B_initParam initParam = {0};
+
85  initParam.positiveTerminalInput = COMP_B_INPUT0;
+
86  initParam.negativeTerminalInput = COMP_B_VREF;
+
87  initParam.powerModeSelect = COMP_B_POWERMODE_NORMALMODE;
+
88  initParam.outputFilterEnableAndDelayLevel = COMP_B_FILTEROUTPUT_DLYLVL1;
+
89  initParam.invertedOutputPolarity = COMP_B_NORMALOUTPUTPOLARITY;
+
90  Comp_B_init(COMP_B_BASE, &initParam);
+
91 
+
92  //Set the reference voltage that is being supplied to the (-) terminal
+
93  /*
+
94  * Base Address of Comparator B,
+
95  * Reference Voltage of 1.5 V,
+
96  * Lower Limit of 1.5*(32/32) = 1.5V,
+
97  * Upper Limit of 1.5*(32/32) = 1.5V,
+
98  * Static Mode Accuracy
+
99  */
+
100  Comp_B_configureReferenceVoltageParam refVoltageParam = {0};
+
101  refVoltageParam.supplyVoltageReferenceBase = COMP_B_VREFBASE1_5V;
+
102  refVoltageParam.lowerLimitSupplyVoltageFractionOf32 = 32;
+
103  refVoltageParam.upperLimitSupplyVoltageFractionOf32 = 32;
+
104  refVoltageParam.referenceAccuracy = COMP_B_ACCURACY_STATIC;
+
105  Comp_B_configureReferenceVoltage(COMP_B_BASE, &refVoltageParam);
+
106 
+
107  //Enable Interrupts
+
108  /*
+
109  * Base Address of Comparator B,
+
110  * Enable CompB Interrupt on default rising edge for CBIFG
+
111  */
+
112  Comp_B_clearInterrupt(COMP_B_BASE,
+
113  CBIFG);
+
114  Comp_B_enableInterrupt(COMP_B_BASE,
+
115  CBIE);
+
116 
+
117  //Allow power to Comparator module
+
118  Comp_B_enable(COMP_B_BASE);
+
119 
+
120  //Enter LPM4 with inetrrupts enabled
+
121  __bis_SR_register(LPM4_bits + GIE);
+
122 
+
123  //For debug
+
124  __no_operation();
+
125 }
+
126 
+
127 //******************************************************************************
+
128 //
+
129 //This is the COMP_B_VECTOR interrupt vector service routine.
+
130 //
+
131 //******************************************************************************
+
132 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
133 #pragma vector=COMP_B_VECTOR
+
134 __interrupt
+
135 #elif defined(__GNUC__)
+
136 __attribute__((interrupt(COMP_B_VECTOR)))
+
137 #endif
+
138 void COMP_B_ISR (void)
+
139 {
+
140  //Toggle the edge at which an interrupt is generated
+
141  Comp_B_toggleInterruptEdgeDirection(COMP_B_BASE);
+
142 
+
143  //Clear Interrupt flag
+
144  Comp_B_clearInterrupt(COMP_B_BASE, CBIFG);
+
145 
+
146  //Toggle P1.0
+
147  GPIO_toggleOutputOnPin(
+
148  GPIO_PORT_P1,
+
149  GPIO_PIN0
+
150  );
+
151 }
+
void COMP_B_ISR(void)
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/comp__b__ex3__avcc_ref_u_l_p_m_8c.html b/Generated Documentation/html/comp__b__ex3__avcc_ref_u_l_p_m_8c.html new file mode 100644 index 0000000..3b32e2a --- /dev/null +++ b/Generated Documentation/html/comp__b__ex3__avcc_ref_u_l_p_m_8c.html @@ -0,0 +1,152 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/comp_b/comp_b_ex3_avccRefULPM.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
comp_b_ex3_avccRefULPM.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

COMPB - LED Toggle in LPM4, Ultra Low Power Mode, Input compared against 0.5*Vcc

+

Use CompB and shared reference to determine if input 'Vcompare' is high of low. When Vcompare exceeds Vcc*1/2 CBOUT goes high and when Vcompare is less than Vcc*1/2 then CBOUT goes low. Connect P1.6/CBOUT to P1.0 externally to see the LED toggle accordingly.

       MSP430x552x
+   ------------------
+

/|| | | | | –|RST P6.0/CB0|<- Vcompare | P1.6/CBOUT|--> 'high'(Vcompare>Vcc*1/2); 'low'(Vcompare<Vcc*1/2) | | | | P1.0|_| LED 'ON'(Vcompare>Vcc*1/2); 'OFF'(Vcompare<Vcc*1/2) | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • COMPB peripheral
  • +
  • GPIO Port peripheral
  • +
  • CB0
  • +
  • CBOUT
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 67 of file comp_b_ex3_avccRefULPM.c.

+ +

References __delay_cycles(), and __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/comp__b__ex3__avcc_ref_u_l_p_m_8c.js b/Generated Documentation/html/comp__b__ex3__avcc_ref_u_l_p_m_8c.js new file mode 100644 index 0000000..f4b4a04 --- /dev/null +++ b/Generated Documentation/html/comp__b__ex3__avcc_ref_u_l_p_m_8c.js @@ -0,0 +1,4 @@ +var comp__b__ex3__avcc_ref_u_l_p_m_8c = +[ + [ "main", "comp__b__ex3__avcc_ref_u_l_p_m_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/comp__b__ex3__avcc_ref_u_l_p_m_8c_source.html b/Generated Documentation/html/comp__b__ex3__avcc_ref_u_l_p_m_8c_source.html new file mode 100644 index 0000000..a8fecd7 --- /dev/null +++ b/Generated Documentation/html/comp__b__ex3__avcc_ref_u_l_p_m_8c_source.html @@ -0,0 +1,200 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/comp_b/comp_b_ex3_avccRefULPM.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
comp_b_ex3_avccRefULPM.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
63 //******************************************************************************
+
64 
+
65 #include "driverlib.h"
+
66 
+
67 void main (void)
+
68 {
+
69  //Stop WDT
+
70  WDT_A_hold(WDT_A_BASE);
+
71 
+
72 
+
73  //Select CBOUT function on P1.6/CBOUT and set P1.6 output direction
+
74  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
75  GPIO_PORT_P1,
+
76  GPIO_PIN6
+
77  );
+
78 
+
79  //Initialize the Comparator B module
+
80  /*
+
81  * Base Address of Comparator B,
+
82  * Pin CB0 to Positive(+) Terminal,
+
83  * Reference Voltage to Negative(-) Terminal,
+
84  * Ultra-Low Power Mode,
+
85  * Output Filter On with minimal delay,
+
86  * Non-Inverted Output Polarity
+
87  */
+
88  Comp_B_initParam initParam = {0};
+
89  initParam.positiveTerminalInput = COMP_B_INPUT0;
+
90  initParam.negativeTerminalInput = COMP_B_VREF;
+
91  initParam.powerModeSelect = COMP_B_POWERMODE_ULTRALOWPOWER;
+
92  initParam.outputFilterEnableAndDelayLevel = COMP_B_FILTEROUTPUT_DLYLVL1;
+
93  initParam.invertedOutputPolarity = COMP_B_NORMALOUTPUTPOLARITY;
+
94  Comp_B_init(COMP_B_BASE, &initParam);
+
95  //Set the reference voltage that is being supplied to the (-) terminal
+
96  /*
+
97  * Base Address of Comparator B,
+
98  * Reference Voltage of Vcc,
+
99  * Lower Limit of Vcc*(16/32) = (1/2)*Vcc,
+
100  * Upper Limit of Vcc*(16/32) = (1/2)*Vcc,
+
101  * Static Mode Accuracy
+
102  */
+
103  Comp_B_configureReferenceVoltageParam refVoltageParam = {0};
+
104  refVoltageParam.supplyVoltageReferenceBase = COMP_B_VREFBASE_VCC;
+
105  refVoltageParam.lowerLimitSupplyVoltageFractionOf32 = 16;
+
106  refVoltageParam.upperLimitSupplyVoltageFractionOf32 = 16;
+
107  refVoltageParam.referenceAccuracy = COMP_B_ACCURACY_STATIC;
+
108  Comp_B_configureReferenceVoltage(COMP_B_BASE, &refVoltageParam);
+
109 
+
110  //Allow power to Comparator module
+
111  Comp_B_enable(COMP_B_BASE);
+
112 
+
113  //delay for the reference to settle
+
114  __delay_cycles(75);
+
115 
+
116  //Enter LPM4
+
117  __bis_SR_register(LPM4_bits);
+
118 
+
119  //For debug
+
120  __no_operation();
+
121 }
+
void main(void)
+ +
__no_operation()
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/comp__b__ex4__hysteresis_8c.html b/Generated Documentation/html/comp__b__ex4__hysteresis_8c.html new file mode 100644 index 0000000..2b0ae19 --- /dev/null +++ b/Generated Documentation/html/comp__b__ex4__hysteresis_8c.html @@ -0,0 +1,152 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/comp_b/comp_b_ex4_hysteresis.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
comp_b_ex4_hysteresis.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

COMPB - Hysteresis, Output Toggle in LPM4, High Speed Mode

+

Use CompB and shared reference to determine if input 'Vcompare' is high of low. Shared reference is configured to generate hysteresis. When Vcompare exceeds Vcc*3/4 CBOUT goes high and when Vcompare is less than Vcc*1/4 then CBOUT goes low. Connect P1.6/CBOUT to P1.0 externally to see the LED toggle accordingly.

     MSP430x552x
+ -----------------
+

/|| | | | | –|RST P6.0/CB0|<- Vcompare | P1.6/CBOUT|--> 'high'(Vcompare>Vcc*3/4);'low'(Vcompare<Vcc*1/4) | | | | P1.0|_|LED 'ON'(Vcompare>Vcc*3/4);'OFF'(Vcompare<Vcc*1/4) | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • COMPB peripheral
  • +
  • GPIO Port peripheral
  • +
  • CB0
  • +
  • CBOUT
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 66 of file comp_b_ex4_hysteresis.c.

+ +

References __delay_cycles(), and __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/comp__b__ex4__hysteresis_8c.js b/Generated Documentation/html/comp__b__ex4__hysteresis_8c.js new file mode 100644 index 0000000..9172543 --- /dev/null +++ b/Generated Documentation/html/comp__b__ex4__hysteresis_8c.js @@ -0,0 +1,4 @@ +var comp__b__ex4__hysteresis_8c = +[ + [ "main", "comp__b__ex4__hysteresis_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/comp__b__ex4__hysteresis_8c_source.html b/Generated Documentation/html/comp__b__ex4__hysteresis_8c_source.html new file mode 100644 index 0000000..65c2d90 --- /dev/null +++ b/Generated Documentation/html/comp__b__ex4__hysteresis_8c_source.html @@ -0,0 +1,197 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/comp_b/comp_b_ex4_hysteresis.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
comp_b_ex4_hysteresis.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
63 //******************************************************************************
+
64 #include "driverlib.h"
+
65 
+
66 void main (void)
+
67 {
+
68  //Stop WDT
+
69  WDT_A_hold(WDT_A_BASE);
+
70 
+
71  //Select CBOUT function on P1.6/CBOUT and set P1.6 output direction
+
72  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
73  GPIO_PORT_P1,
+
74  GPIO_PIN6);
+
75  //Initialize the Comparator B module
+
76  /*
+
77  * Base Address of Comparator B,
+
78  * Pin CB0 to Positive(+) Terminal,
+
79  * Reference Voltage to Negative(-) Terminal,
+
80  * Ultra-Low Power Mode,
+
81  * Output Filter On with minimal delay,
+
82  * Non-Inverted Output Polarity
+
83  */
+
84  Comp_B_initParam initParam = {0};
+
85  initParam.positiveTerminalInput = COMP_B_INPUT0;
+
86  initParam.negativeTerminalInput = COMP_B_VREF;
+
87  initParam.powerModeSelect = COMP_B_POWERMODE_NORMALMODE;
+
88  initParam.outputFilterEnableAndDelayLevel = COMP_B_FILTEROUTPUT_DLYLVL1;
+
89  initParam.invertedOutputPolarity = COMP_B_NORMALOUTPUTPOLARITY;
+
90  Comp_B_init(COMP_B_BASE, &initParam);
+
91 
+
92  //Set the reference voltage that is being supplied to the (-) terminal
+
93  /*
+
94  * Base Address of Comparator B,
+
95  * Reference Voltage of Vcc,
+
96  * Lower Limit of Vcc*(8/32) = (1/4)*Vcc,
+
97  * Upper Limit of Vcc*(24/32) = (3/4)*Vcc,
+
98  * Static Mode Accuracy
+
99  */
+
100  Comp_B_configureReferenceVoltageParam refVoltageParam = {0};
+
101  refVoltageParam.supplyVoltageReferenceBase = COMP_B_VREFBASE_VCC;
+
102  refVoltageParam.lowerLimitSupplyVoltageFractionOf32 = 8;
+
103  refVoltageParam.upperLimitSupplyVoltageFractionOf32 = 24;
+
104  refVoltageParam.referenceAccuracy = COMP_B_ACCURACY_STATIC;
+
105  Comp_B_configureReferenceVoltage(COMP_B_BASE, &refVoltageParam);
+
106 
+
107  //Allow power to Comparator module
+
108  Comp_B_enable(COMP_B_BASE);
+
109 
+
110  //delay for the reference to settle
+
111  __delay_cycles(75);
+
112 
+
113  //Enter LPM4
+
114  __bis_SR_register(LPM4_bits);
+
115 
+
116  //For debug
+
117  __no_operation();
+
118 }
+
void main(void)
+ +
__no_operation()
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/comp__b__ex5___t_ax_8c.html b/Generated Documentation/html/comp__b__ex5___t_ax_8c.html new file mode 100644 index 0000000..7a7693c --- /dev/null +++ b/Generated Documentation/html/comp__b__ex5___t_ax_8c.html @@ -0,0 +1,259 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/comp_b/comp_b_ex5_TAx.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
comp_b_ex5_TAx.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Macros

#define TIMER_A_PERIOD   0xFFFF
 
#define UCS_MCLK_DESIRED_FREQUENCY_IN_KHZ   12000
 
#define UCS_MCLK_FLLREF_RATIO   374
 
+ + + + + +

+Functions

void main (void)
 
void TIMER_A (void)
 
+ + + +

+Variables

Timer_A_initUpModeParam initUpModeParam = {0}
 
+

Macro Definition Documentation

+ +

◆ TIMER_A_PERIOD

+ +
+
+ + + + +
#define TIMER_A_PERIOD   0xFFFF
+
+

COMPB - TA0.1, TA1.1, Varying duty cycle of input voltage

+

Use CompB to determine if input, Vcompare has a duty cycle greater than 50%. When Vcompare exceeds Vcc*3/4 then TimerA0 captures the time (TA0CCR1). When Vcompare is less than Vcc*1/4 then TimerA1 captures the time (TA1CCR1) and resets the timers for TIMERA0 and TIMERA1. If TA0CCR1 is greater than TA1CCR1/2, then turn on the LED. If TA0CCR1 is less than TA1CCR1/2, then turn off the LED. Clocks: ACLK = REFO; MCLK = SMCLK = 12MHz

       MSP430x552x
+   ------------------
+

/|| | | | | –|RST P6.0/CB0|<- Vcompare (200Hz<f<1Mhz) (vary dutycycle) | P1.0|-> LED ('ON' if dutycycle > 50%; | | 'OFF' if dutycycle < 50%)

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • COMPB peripheral
  • +
  • GPIO Port peripheral
  • +
  • CB0
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • TIMER1_A1_VECTOR
  • +
+ +

Definition at line 67 of file comp_b_ex5_TAx.c.

+ +
+
+ +

◆ UCS_MCLK_DESIRED_FREQUENCY_IN_KHZ

+ +
+
+ + + + +
#define UCS_MCLK_DESIRED_FREQUENCY_IN_KHZ   12000
+
+ +

Definition at line 68 of file comp_b_ex5_TAx.c.

+ +
+
+ +

◆ UCS_MCLK_FLLREF_RATIO

+ +
+
+ + + + +
#define UCS_MCLK_FLLREF_RATIO   374
+
+ +

Definition at line 69 of file comp_b_ex5_TAx.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+
+ +

◆ TIMER_A()

+ +
+
+ + + + + + + + +
void TIMER_A (void )
+
+
+

Variable Documentation

+ +

◆ initUpModeParam

+ +
+
+ + + + +
Timer_A_initUpModeParam initUpModeParam = {0}
+
+ +

Definition at line 71 of file comp_b_ex5_TAx.c.

+ +

Referenced by main(), and TIMER_A().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/comp__b__ex5___t_ax_8c.js b/Generated Documentation/html/comp__b__ex5___t_ax_8c.js new file mode 100644 index 0000000..6d0f585 --- /dev/null +++ b/Generated Documentation/html/comp__b__ex5___t_ax_8c.js @@ -0,0 +1,9 @@ +var comp__b__ex5___t_ax_8c = +[ + [ "TIMER_A_PERIOD", "comp__b__ex5___t_ax_8c.html#ae899bfdc491d37c006b4c301d9f8e147", null ], + [ "UCS_MCLK_DESIRED_FREQUENCY_IN_KHZ", "comp__b__ex5___t_ax_8c.html#afc76af036ff44bb1fa7d614635294e0b", null ], + [ "UCS_MCLK_FLLREF_RATIO", "comp__b__ex5___t_ax_8c.html#a19063967df2303b3934689ed75d2ec08", null ], + [ "main", "comp__b__ex5___t_ax_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "TIMER_A", "comp__b__ex5___t_ax_8c.html#ac2a8433502bae8c1db30a4666cf9243b", null ], + [ "initUpModeParam", "comp__b__ex5___t_ax_8c.html#aba6909bf22f43ae91df1a418ce0bb223", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/comp__b__ex5___t_ax_8c_source.html b/Generated Documentation/html/comp__b__ex5___t_ax_8c_source.html new file mode 100644 index 0000000..f8de718 --- /dev/null +++ b/Generated Documentation/html/comp__b__ex5___t_ax_8c_source.html @@ -0,0 +1,355 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/comp_b/comp_b_ex5_TAx.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
comp_b_ex5_TAx.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
63 //******************************************************************************
+
64 
+
65 #include "driverlib.h"
+
66 
+
67 #define TIMER_A_PERIOD 0xFFFF
+
68 #define UCS_MCLK_DESIRED_FREQUENCY_IN_KHZ 12000
+
69 #define UCS_MCLK_FLLREF_RATIO 374
+
70 
+
71 Timer_A_initUpModeParam initUpModeParam = {0};
+
72 
+
73 void main (void)
+
74 {
+
75  //Stop WDT
+
76  WDT_A_hold(WDT_A_BASE);
+
77 
+
78  //Set DCO FLL reference = REFO
+
79  UCS_initClockSignal(
+
80  UCS_FLLREF,
+
81  UCS_REFOCLK_SELECT,
+
82  UCS_CLOCK_DIVIDER_1
+
83  );
+
84 
+
85  //Set ACLK = REFO
+
86  UCS_initClockSignal(
+
87  UCS_ACLK,
+
88  UCS_REFOCLK_SELECT,
+
89  UCS_CLOCK_DIVIDER_1
+
90  );
+
91 
+
92  //Set Ratio and Desired MCLK Frequency and init DCO
+
93  UCS_initFLLSettle(
+ + +
96  );
+
97 
+
98 
+
99  //Initialize the Comparator B module
+
100  /*
+
101  * Base Address of Comparator B,
+
102  * Pin CB0 to Positive(+) Terminal,
+
103  * Reference Voltage to Negative(-) Terminal,
+
104  * Normal Power Mode,
+
105  * Output Filter On with minimal delay,
+
106  * Non-Inverted Output Polarity
+
107  */
+
108  Comp_B_initParam initParam = {0};
+
109  initParam.positiveTerminalInput = COMP_B_INPUT0;
+
110  initParam.negativeTerminalInput = COMP_B_VREF;
+
111  initParam.powerModeSelect = COMP_B_POWERMODE_NORMALMODE;
+
112  initParam.outputFilterEnableAndDelayLevel = COMP_B_FILTEROUTPUT_DLYLVL1;
+
113  initParam.invertedOutputPolarity = COMP_B_NORMALOUTPUTPOLARITY;
+
114  Comp_B_init(COMP_B_BASE, &initParam);
+
115 
+
116  //Set the reference voltage that is being supplied to the (-) terminal
+
117  /*
+
118  * Base Address of Comparator B,
+
119  * Reference Voltage of 2.0 V,
+
120  * Lower Limit of Vcc*(8/32) = (1/4)*Vcc,
+
121  * Upper Limit of Vcc*(24/32) = (3/4)*Vcc
+
122  * Static Mode Accuracy
+
123  */
+
124  Comp_B_configureReferenceVoltageParam refVoltageParam = {0};
+
125  refVoltageParam.supplyVoltageReferenceBase = COMP_B_VREFBASE_VCC;
+
126  refVoltageParam.lowerLimitSupplyVoltageFractionOf32 = 8;
+
127  refVoltageParam.upperLimitSupplyVoltageFractionOf32 = 24;
+
128  refVoltageParam.referenceAccuracy = COMP_B_ACCURACY_STATIC;
+
129  Comp_B_configureReferenceVoltage(COMP_B_BASE, &refVoltageParam);
+
130 
+
131  //Allow power to Comparator module
+
132  Comp_B_enable(COMP_B_BASE);
+
133 
+
134  //delay for the reference to settle
+
135  __delay_cycles(75);
+
136 
+
137  //Start timer TIMER_A0 in up mode
+
138  initUpModeParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
139  initUpModeParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
140  initUpModeParam.timerPeriod = TIMER_A_PERIOD;
+
141  initUpModeParam.timerInterruptEnable_TAIE = TIMER_A_CCIE_CCR0_INTERRUPT_DISABLE;
+
142  initUpModeParam.captureCompareInterruptEnable_CCR0_CCIE =
+
143  TIMER_A_CCIE_CCR0_INTERRUPT_DISABLE;
+
144  initUpModeParam.timerClear = TIMER_A_DO_CLEAR;
+
145  initUpModeParam.startTimer = true;
+
146  Timer_A_initUpMode(TIMER_A0_BASE, &initUpModeParam);
+
147 
+
148  //Start timer TIMER_A1 in up mode
+
149  initUpModeParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
150  initUpModeParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
151  initUpModeParam.timerPeriod = TIMER_A_PERIOD;
+
152  initUpModeParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
153  initUpModeParam.captureCompareInterruptEnable_CCR0_CCIE =
+
154  TIMER_A_CCIE_CCR0_INTERRUPT_DISABLE;
+
155  initUpModeParam.timerClear = TIMER_A_DO_CLEAR;
+
156  initUpModeParam.startTimer = true;
+
157  Timer_A_initUpMode(TIMER_A1_BASE, &initUpModeParam);
+
158 
+
159  //Capture Falling Edge
+
160  Timer_A_initCaptureModeParam initCaptureMode = {0};
+
161  initCaptureMode.captureRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
+
162  initCaptureMode.captureMode = TIMER_A_CAPTUREMODE_FALLING_EDGE;
+
163  initCaptureMode.captureInputSelect = TIMER_A_CAPTURE_INPUTSELECT_CCIxB;
+
164  initCaptureMode.synchronizeCaptureSource = TIMER_A_CAPTURE_SYNCHRONOUS;
+
165  initCaptureMode.captureInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
166  initCaptureMode.captureOutputMode = TIMER_A_OUTPUTMODE_OUTBITVALUE;
+
167  Timer_A_initCaptureMode(TIMER_A0_BASE, &initCaptureMode);
+
168 
+
169  //Capture Rising Edge, Enable Interrupt
+
170  Timer_A_clearCaptureCompareInterrupt(TIMER_A1_BASE,
+
171  TIMER_A_CAPTURECOMPARE_REGISTER_1);
+
172 
+
173  initCaptureMode.captureRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
+
174  initCaptureMode.captureMode = TIMER_A_CAPTUREMODE_RISING_EDGE;
+
175  initCaptureMode.captureInputSelect = TIMER_A_CAPTURE_INPUTSELECT_CCIxB;
+
176  initCaptureMode.synchronizeCaptureSource = TIMER_A_CAPTURE_SYNCHRONOUS;
+
177  initCaptureMode.captureInterruptEnable = TIMER_A_CAPTURECOMPARE_INTERRUPT_ENABLE;
+
178  initCaptureMode.captureOutputMode = TIMER_A_OUTPUTMODE_OUTBITVALUE;
+
179  Timer_A_initCaptureMode(TIMER_A1_BASE, &initCaptureMode);
+
180 
+
181  //Set P1.0 to output direction
+
182  GPIO_setAsOutputPin(
+
183  GPIO_PORT_P1,
+
184  GPIO_PIN0
+
185  );
+
186 
+
187  //Enter LPM0 with global interrupts enabled
+
188  __bis_SR_register(LPM3_bits + GIE);
+
189 
+
190  //For Debug
+
191  __no_operation();
+
192 }
+
193 
+
194 //******************************************************************************
+
195 //
+
196 //This is the TIMER1_A1_VECTOR interrupt vector service routine.
+
197 //
+
198 //******************************************************************************
+
199 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
200 #pragma vector=TIMER1_A1_VECTOR
+
201 __interrupt
+
202 #elif defined(__GNUC__)
+
203 __attribute__((interrupt(TIMER1_A1_VECTOR)))
+
204 #endif
+
205 void TIMER_A (void)
+
206 {
+
207  uint16_t temp;
+
208 
+
209  switch ( TA1IV){
+
210  case 2:
+
211 
+
212  //Re-Start timer TIMER_A0
+
213  initUpModeParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
214  initUpModeParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
215  initUpModeParam.timerPeriod = TIMER_A_PERIOD;
+
216  initUpModeParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
217  initUpModeParam.captureCompareInterruptEnable_CCR0_CCIE =
+
218  TIMER_A_CCIE_CCR0_INTERRUPT_DISABLE;
+
219  initUpModeParam.timerClear = TIMER_A_DO_CLEAR;
+
220  initUpModeParam.startTimer = true;
+
221  Timer_A_initUpMode(TIMER_A0_BASE, &initUpModeParam);
+
222 
+
223  //Re-Start timer TIMER_A1
+
224  initUpModeParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
+
225  initUpModeParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
+
226  initUpModeParam.timerPeriod = TIMER_A_PERIOD;
+
227  initUpModeParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
+
228  initUpModeParam.captureCompareInterruptEnable_CCR0_CCIE =
+
229  TIMER_A_CCIE_CCR0_INTERRUPT_DISABLE;
+
230  initUpModeParam.timerClear = TIMER_A_DO_CLEAR;
+
231  initUpModeParam.startTimer = true;
+
232  Timer_A_initUpMode(TIMER_A1_BASE, &initUpModeParam);
+
233 
+
234 
+
235  //Compare On and off time of input signal
+
236  temp = (Timer_A_getCaptureCompareCount(TIMER_A1_BASE,
+
237  TIMER_A_CAPTURECOMPARE_REGISTER_1
+
238  )) >> 1;
+
239 
+
240  if (Timer_A_getCaptureCompareCount(TIMER_A0_BASE,
+
241  TIMER_A_CAPTURECOMPARE_REGISTER_1
+
242  ) > temp){
+
243  //set P1.0
+ +
245  GPIO_PORT_P1,
+
246  GPIO_PIN0
+
247  );
+
248  } else {
+
249  //Clear P1.0 LED off
+ +
251  GPIO_PORT_P1,
+
252  GPIO_PIN0
+
253  );
+
254  }
+
255  break;
+
256  case 4: break; //CCR2 not used
+
257  case 6: break; //CCR3 not used
+
258  case 8: break; //CCR4 not used
+
259  case 10: break; //CCR5 not used
+
260  case 12: break; //Reserved not used
+
261  case 14: //Overflow
+
262  __no_operation();
+
263 
+
264  //If input frequency < 200Hz, trap here
+
265  while (1) ;
+
266  default: break;
+
267  }
+
268 }
+
long temp
+
#define UCS_MCLK_FLLREF_RATIO
+
void main(void)
+
Timer_A_initUpModeParam initUpModeParam
+
void TIMER_A(void)
+
#define TIMER_A_PERIOD
+
#define UCS_MCLK_DESIRED_FREQUENCY_IN_KHZ
+ +
__no_operation()
+
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/comp__b__ex6__ext_ref_8c.html b/Generated Documentation/html/comp__b__ex6__ext_ref_8c.html new file mode 100644 index 0000000..7bcd453 --- /dev/null +++ b/Generated Documentation/html/comp__b__ex6__ext_ref_8c.html @@ -0,0 +1,160 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/comp_b/comp_b_ex6_extRef.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
comp_b_ex6_extRef.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

COMPB - LED Toggle in LPM4, Vcomp_0 is compared against Vcomp_1 voltage

+

Use CompB and internal reference to determine if input 'Vcompare' is high of low. When Vcomp_0 exceeds Vcomp_1 CBOUT goes high and when Vcomp_0 is less than Vcomp_1 then CBOUT goes low. Connect P1.6/CBOUT to P1.0 externally to see the LED toggle accordingly.

           MSP430x552x
+       ------------------
+   /|\|                  |
+    | |          P6.0/CB0|<- Vcomp_0
+    --|RST       P6.1/CB1|<- Vcomp_1
+      |        P1.6/CBOUT|--> 'high'(Vcomp_0>Vcomp_1);
+      |                  | |  'low'(Vcomp_0<Vcomp_1)
+      |                  | |
+      |              P1.0|_| LED 'ON'(Vcomp_0>Vcomp_1);
+      |                  |       'OFF'(Vcomp_0<Vcomp_1)
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • COMPB peripheral
  • +
  • GPIO Port peripheral
  • +
  • CB0
  • +
  • CB1
  • +
  • CBOUT
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 69 of file comp_b_ex6_extRef.c.

+ +

References __delay_cycles(), __no_operation(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/comp__b__ex6__ext_ref_8c.js b/Generated Documentation/html/comp__b__ex6__ext_ref_8c.js new file mode 100644 index 0000000..d8ed226 --- /dev/null +++ b/Generated Documentation/html/comp__b__ex6__ext_ref_8c.js @@ -0,0 +1,4 @@ +var comp__b__ex6__ext_ref_8c = +[ + [ "main", "comp__b__ex6__ext_ref_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/comp__b__ex6__ext_ref_8c_source.html b/Generated Documentation/html/comp__b__ex6__ext_ref_8c_source.html new file mode 100644 index 0000000..ba4e7cb --- /dev/null +++ b/Generated Documentation/html/comp__b__ex6__ext_ref_8c_source.html @@ -0,0 +1,187 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/comp_b/comp_b_ex6_extRef.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
comp_b_ex6_extRef.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
65 //******************************************************************************
+
66 
+
67 #include "driverlib.h"
+
68 
+
69 void main (void)
+
70 {
+
71  //Stop WDT
+
72  WDT_A_hold(WDT_A_BASE);
+
73 
+
74  //Select CBOUT function on P1.6/CBOUT and set P1.6 output direction
+
75  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
76  GPIO_PORT_P1,
+
77  GPIO_PIN6
+
78  );
+
79 
+
80  //Initialize the Comparator B module
+
81  /*
+
82  * Base Address of Comparator B,
+
83  * Pin CB0 to Positive(+) Terminal,
+
84  * Reference Voltage to Negative(-) Terminal,
+
85  * Normal Power Mode,
+
86  * Output Filter On with minimal delay,
+
87  * Non-Inverted Output Polarity
+
88  */
+
89  Comp_B_initParam param = {0};
+
90  param.positiveTerminalInput = COMP_B_INPUT0;
+
91  param.negativeTerminalInput = COMP_B_INPUT1;
+
92  param.powerModeSelect = COMP_B_POWERMODE_NORMALMODE;
+
93  param.outputFilterEnableAndDelayLevel = COMP_B_FILTEROUTPUT_DLYLVL1;
+
94  param.invertedOutputPolarity = COMP_B_NORMALOUTPUTPOLARITY;
+
95  Comp_B_init(COMP_B_BASE, &param);
+
96 
+
97 
+
98  //Allow power to Comparator module
+
99  Comp_B_enable(COMP_B_BASE);
+
100 
+
101  //delay for the reference to settle
+
102  __delay_cycles(75);
+
103 
+
104  //Enter LPM4
+
105  __bis_SR_register(LPM4_bits);
+
106 
+
107  //For debug
+
108  __no_operation();
+
109 }
+
MPU_initThreeSegmentsParam param
+
void main(void)
+ +
__no_operation()
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/comp__d__ex1__output_toggle_vcomp_vs_vref2_v_8c.html b/Generated Documentation/html/comp__d__ex1__output_toggle_vcomp_vs_vref2_v_8c.html new file mode 100644 index 0000000..5390078 --- /dev/null +++ b/Generated Documentation/html/comp__d__ex1__output_toggle_vcomp_vs_vref2_v_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/comp_d/comp_d_ex1_outputToggleVcompVsVref2V.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
comp_d_ex1_outputToggleVcompVsVref2V.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 55 of file comp_d_ex1_outputToggleVcompVsVref2V.c.

+ +

References __delay_cycles(), __no_operation(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/comp__d__ex1__output_toggle_vcomp_vs_vref2_v_8c.js b/Generated Documentation/html/comp__d__ex1__output_toggle_vcomp_vs_vref2_v_8c.js new file mode 100644 index 0000000..3a98151 --- /dev/null +++ b/Generated Documentation/html/comp__d__ex1__output_toggle_vcomp_vs_vref2_v_8c.js @@ -0,0 +1,4 @@ +var comp__d__ex1__output_toggle_vcomp_vs_vref2_v_8c = +[ + [ "main", "comp__d__ex1__output_toggle_vcomp_vs_vref2_v_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/comp__d__ex1__output_toggle_vcomp_vs_vref2_v_8c_source.html b/Generated Documentation/html/comp__d__ex1__output_toggle_vcomp_vs_vref2_v_8c_source.html new file mode 100644 index 0000000..183f809 --- /dev/null +++ b/Generated Documentation/html/comp__d__ex1__output_toggle_vcomp_vs_vref2_v_8c_source.html @@ -0,0 +1,229 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/comp_d/comp_d_ex1_outputToggleVcompVsVref2V.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
comp_d_ex1_outputToggleVcompVsVref2V.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR57xx Demo - COMPD Toggle from LPM4; input channel CD13;
+
34 // Vcompare is compared against the internal reference 2.0V
+
35 //
+
36 // Description: Use CompD (input channel CD13) and internal reference to
+
37 // determine if input'Vcompare'is high or low. When Vcompare exceeds 2.0V
+
38 // CDOUT goes high and when Vcompare is less than 2.0V then CDOUT goes low.
+
39 // P3.5/CDOUT is connected internally to an LED; it will toggle accordingly.
+
40 //
+
41 // MSP430FR5739
+
42 // ------------------
+
43 // /|\| |
+
44 // | | |
+
45 // --|RST P1.2/CD2|<--Vcompare
+
46 // | |
+
47 // | P3.5/CDOUT|----> 'high'(Vcompare>2.0V); 'low'(Vcompare<2.0V)
+
48 // | | |
+
49 // | | | LED 'ON'(Vcompare>2.0V); 'OFF'(Vcompare<2.0V)
+
50 // | |
+
51 //
+
52 //******************************************************************************
+
53 #include "driverlib.h"
+
54 
+
55 void main(void)
+
56 {
+
57  //Stop WDT
+
58  WDT_A_hold(WDT_A_BASE);
+
59 
+
60  //Set P3.5 as Ternary Module Function Output.
+
61  /*
+
62 
+
63  * Select Port 3
+
64  * Set Pin 5 to output Ternary Module Function, (CBOUT).
+
65  */
+
66  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
67  GPIO_PORT_P3,
+
68  GPIO_PIN5,
+
69  GPIO_TERNARY_MODULE_FUNCTION
+
70  );
+
71 
+
72  //Initialize the Comparator D module
+
73  /* Base Address of Comparator D,
+
74  * Pin CD2 to Positive(+) Terminal,
+
75  * Reference Voltage to Negative(-) Terminal,
+
76  * Normal Power Mode,
+
77  * Output Filter On with minimal delay,
+
78  * Non-Inverted Output Polarity
+
79  */
+
80 
+
81  Comp_D_initParam param = {0};
+
82  param.positiveTerminalInput = COMP_D_INPUT2;
+
83  param.negativeTerminalInput = COMP_D_VREF;
+
84  param.outputFilterEnableAndDelayLevel = COMP_D_FILTEROUTPUT_OFF;
+
85  param.invertedOutputPolarity = COMP_D_NORMALOUTPUTPOLARITY;
+
86  Comp_D_init(COMP_D_BASE, &param);
+
87 
+
88  //Set the reference voltage that is being supplied to the (-) terminal
+
89  /* Base Address of Comparator D,
+
90  * Reference Voltage of 2.0 V,
+
91  * Lower Limit of 2.0*(32/32) = 2.0V,
+
92  * Upper Limit of 2.0*(32/32) = 2.0V
+
93  */
+
94  Comp_D_setReferenceVoltage(COMP_D_BASE,
+
95  COMP_D_VREFBASE2_0V,
+
96  32,
+
97  32
+
98  );
+
99 
+
100  //Disable Input Buffer on P1.2/CD2
+
101  /* Base Address of Comparator D,
+
102  * Input Buffer port
+
103  * Selecting the CDx input pin to the comparator
+
104  * multiplexer with the CDx bits automatically
+
105  * disables output driver and input buffer for
+
106  * that pin, regardless of the state of the
+
107  * associated CDPD.x bit
+
108  */
+
109  Comp_D_disableInputBuffer(COMP_D_BASE,
+
110  COMP_D_INPUT2);
+
111 
+
112  //Allow power to Comparator module
+
113  Comp_D_enable(COMP_D_BASE);
+
114 
+
115  __delay_cycles(400); // delay for the reference to settle
+
116 
+
117  __bis_SR_register(LPM4_bits); // Enter LPM4
+
118  __no_operation(); // For debug
+
119 }
+
MPU_initThreeSegmentsParam param
+ + +
__no_operation()
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/comp__d__ex2__output_toggle_vcomp_vs_vref25v_8c.html b/Generated Documentation/html/comp__d__ex2__output_toggle_vcomp_vs_vref25v_8c.html new file mode 100644 index 0000000..70e3cbc --- /dev/null +++ b/Generated Documentation/html/comp__d__ex2__output_toggle_vcomp_vs_vref25v_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/comp_d/comp_d_ex2_outputToggleVcompVsVref25v.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
comp_d_ex2_outputToggleVcompVsVref25v.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 55 of file comp_d_ex2_outputToggleVcompVsVref25v.c.

+ +

References __delay_cycles(), __no_operation(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/comp__d__ex2__output_toggle_vcomp_vs_vref25v_8c.js b/Generated Documentation/html/comp__d__ex2__output_toggle_vcomp_vs_vref25v_8c.js new file mode 100644 index 0000000..8db187a --- /dev/null +++ b/Generated Documentation/html/comp__d__ex2__output_toggle_vcomp_vs_vref25v_8c.js @@ -0,0 +1,4 @@ +var comp__d__ex2__output_toggle_vcomp_vs_vref25v_8c = +[ + [ "main", "comp__d__ex2__output_toggle_vcomp_vs_vref25v_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/comp__d__ex2__output_toggle_vcomp_vs_vref25v_8c_source.html b/Generated Documentation/html/comp__d__ex2__output_toggle_vcomp_vs_vref25v_8c_source.html new file mode 100644 index 0000000..42f8775 --- /dev/null +++ b/Generated Documentation/html/comp__d__ex2__output_toggle_vcomp_vs_vref25v_8c_source.html @@ -0,0 +1,231 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/comp_d/comp_d_ex2_outputToggleVcompVsVref25v.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
comp_d_ex2_outputToggleVcompVsVref25v.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR57xx Demo - COMPD Toggle from LPM4; input channel CD13;
+
34 // Vcompare is compared against the internal reference 2.5V
+
35 //
+
36 // Description: Use CompD (input channel CD13) and internal reference to
+
37 // determine if input'Vcompare'is high or low. When Vcompare exceeds 2.5V
+
38 // CDOUT goes high and when Vcompare is less than 2.5V then CDOUT goes low.
+
39 // P3.5/CDOUT is connected internally to an LED; it will toggle accordingly.
+
40 //
+
41 // MSP430FR5739
+
42 // ------------------
+
43 // /|\| |
+
44 // | | |
+
45 // --|RST P1.2/CD2|<--Vcompare
+
46 // | |
+
47 // | P3.5/CDOUT|----> 'high'(Vcompare>2.0V); 'low'(Vcompare<2.5V)
+
48 // | | |
+
49 // | | | LED 'ON'(Vcompare>2.0V); 'OFF'(Vcompare<2.5V)
+
50 // | |
+
51 //
+
52 //******************************************************************************
+
53 #include "driverlib.h"
+
54 
+
55 void main(void)
+
56 {
+
57  //Stop WDT
+
58  WDT_A_hold(WDT_A_BASE);
+
59 
+
60  //Set P3.5 as Ternary Module Function Output.
+
61  /*
+
62 
+
63  * Select Port 3
+
64  * Set Pin 5 to output Ternary Module Function, (CBOUT).
+
65  */
+
66  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
67  GPIO_PORT_P3,
+
68  GPIO_PIN5,
+
69  GPIO_TERNARY_MODULE_FUNCTION
+
70  );
+
71 
+
72  //Initialize the Comparator D module
+
73  /* Base Address of Comparator D,
+
74  * Pin CD2 to Positive(+) Terminal,
+
75  * Reference Voltage to Negative(-) Terminal,
+
76  * Normal Power Mode,
+
77  * Output Filter On with minimal delay,
+
78  * Non-Inverted Output Polarity
+
79  */
+
80  Comp_D_initParam param = {0};
+
81  param.positiveTerminalInput = COMP_D_INPUT2;
+
82  param.negativeTerminalInput = COMP_D_VREF;
+
83  param.outputFilterEnableAndDelayLevel = COMP_D_FILTEROUTPUT_OFF;
+
84  param.invertedOutputPolarity = COMP_D_NORMALOUTPUTPOLARITY;
+
85  Comp_D_init(COMP_D_BASE, &param);
+
86 
+
87 
+
88  //Set the reference voltage that is being supplied to the (-) terminal
+
89  /* Base Address of Comparator D,
+
90  * Reference Voltage of 2.5 V,
+
91  * Lower Limit of 2.5*(32/32) = 2.5V,
+
92  * Upper Limit of 2.5*(32/32) = 2.5V,
+
93  * Static Mode Accuracy
+
94  */
+
95  Comp_D_setReferenceVoltage(COMP_D_BASE,
+
96  COMP_D_VREFBASE2_5V,
+
97  32,
+
98  32
+
99  );
+
100 
+
101  //Disable Input Buffer on P1.2/CD2
+
102  /* Base Address of Comparator D,
+
103  * Input Buffer port
+
104  * Selecting the CDx input pin to the comparator
+
105  * multiplexer with the CDx bits automatically
+
106  * disables output driver and input buffer for
+
107  * that pin, regardless of the state of the
+
108  * associated CDPD.x bit
+
109  */
+
110  Comp_D_disableInputBuffer(COMP_D_BASE,
+
111  COMP_D_INPUT2);
+
112 
+
113  //Allow power to Comparator module
+
114  Comp_D_enable(COMP_D_BASE);
+
115 
+
116  __delay_cycles(400); // delay for the reference to settle
+
117 
+
118  __bis_SR_register(LPM4_bits); // Enter LPM4
+
119  __no_operation(); // For debug
+
120 }
+
121 
+
MPU_initThreeSegmentsParam param
+ + +
__no_operation()
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/comp__d__ex3__interrupt_vcomp_vs15_v_8c.html b/Generated Documentation/html/comp__d__ex3__interrupt_vcomp_vs15_v_8c.html new file mode 100644 index 0000000..02a3b56 --- /dev/null +++ b/Generated Documentation/html/comp__d__ex3__interrupt_vcomp_vs15_v_8c.html @@ -0,0 +1,161 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/comp_d/comp_d_ex3_interruptVcompVs15V.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
comp_d_ex3_interruptVcompVs15V.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void COMP_D_D_ISR (void)
 
+

Function Documentation

+ +

◆ COMP_D_D_ISR()

+ +
+
+ + + + + + + + +
void COMP_D_D_ISR (void )
+
+ +

Definition at line 153 of file comp_d_ex3_interruptVcompVs15V.c.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 57 of file comp_d_ex3_interruptVcompVs15V.c.

+ +

References __no_operation(), GPIO_setOutputLowOnPin(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/comp__d__ex3__interrupt_vcomp_vs15_v_8c.js b/Generated Documentation/html/comp__d__ex3__interrupt_vcomp_vs15_v_8c.js new file mode 100644 index 0000000..6786e7d --- /dev/null +++ b/Generated Documentation/html/comp__d__ex3__interrupt_vcomp_vs15_v_8c.js @@ -0,0 +1,5 @@ +var comp__d__ex3__interrupt_vcomp_vs15_v_8c = +[ + [ "COMP_D_D_ISR", "comp__d__ex3__interrupt_vcomp_vs15_v_8c.html#a9b542a2b8895be615d39ec2aa50b3756", null ], + [ "main", "comp__d__ex3__interrupt_vcomp_vs15_v_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/comp__d__ex3__interrupt_vcomp_vs15_v_8c_source.html b/Generated Documentation/html/comp__d__ex3__interrupt_vcomp_vs15_v_8c_source.html new file mode 100644 index 0000000..1070113 --- /dev/null +++ b/Generated Documentation/html/comp__d__ex3__interrupt_vcomp_vs15_v_8c_source.html @@ -0,0 +1,282 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/comp_d/comp_d_ex3_interruptVcompVs15V.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
comp_d_ex3_interruptVcompVs15V.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR57xx Demo - COMPD interrupt capability; Vcompare is compared against
+
34 // internal 1.5V reference
+
35 //
+
36 // Description: Use CompD and internal reference to determine if input'Vcompare'
+
37 // is high of low. For the first time, when Vcompare exceeds the 1.5V internal
+
38 // reference, CDIFG is set and device enters the CompD ISR. In the ISR, CDIES is
+
39 // toggled such that when Vcompare is less than 1.5V internal reference;
+
40 // CDIFG is set.
+
41 // LED is toggled inside the CompD ISR
+
42 //
+
43 // MSP430FR5739
+
44 // ------------------
+
45 // /|\| |
+
46 // | | |
+
47 // --|RST P3.1/CD13|<--Vcompare
+
48 // | |
+
49 // | P3.4|----> 'high'(Vcompare>2.0V); 'low'(Vcompare<2.5V)
+
50 // | | |
+
51 // | | | LED 'ON'(Vcompare>2.0V); 'OFF'(Vcompare<2.5V)
+
52 // | |
+
53 //
+
54 //******************************************************************************
+
55 #include "driverlib.h"
+
56 
+
57 void main (void)
+
58 {
+
59  //Stop WDT
+
60  WDT_A_hold(WDT_A_BASE);
+
61 
+
62  //Set P3.4 as an output pin.
+
63  /*
+
64 
+
65  * Select Port 3
+
66  * Set Pin 4 as output
+
67  */
+
68  GPIO_setAsOutputPin(
+
69  GPIO_PORT_P3,
+
70  GPIO_PIN4
+
71  );
+
72  //Set P3.4 as Output Low.
+
73  /*
+
74 
+
75  * Select Port 3
+
76  * Set Pin 4 to output Low.
+
77  */
+ +
79  GPIO_PORT_P3,
+
80  GPIO_PIN4
+
81  );
+
82 
+
83  //Initialize the Comparator B module
+
84  /*
+
85  * Base Address of Comparator B,
+
86  * Pin CD13 to Positive(+) Terminal
+
87  * Reference Voltage to Negative(-) Terminal
+
88  * Normal Power Mode
+
89  * Output Filter On with minimal delay
+
90  * Non-Inverted Output Polarity
+
91  */
+
92  Comp_D_initParam param = {0};
+
93  param.positiveTerminalInput = COMP_D_INPUT13;
+
94  param.negativeTerminalInput = COMP_D_VREF;
+
95  param.outputFilterEnableAndDelayLevel = COMP_D_FILTEROUTPUT_OFF;
+
96  param.invertedOutputPolarity = COMP_D_NORMALOUTPUTPOLARITY;
+
97  Comp_D_init(COMP_D_BASE, &param);
+
98 
+
99  //Set the reference voltage that is being supplied to the (-) terminal
+
100  /*
+
101  * Base Address of Comparator D,
+
102  * Reference Voltage of 1.5 V,
+
103  * Lower Limit of 1.5*(32/32) = 1.5V,
+
104  * Upper Limit of 1.5*(32/32) = 1.5V,
+
105  * Static Mode Accuracy
+
106  */
+
107  Comp_D_setReferenceVoltage(COMP_D_BASE,
+
108  COMP_D_VREFBASE1_5V,
+
109  32,
+
110  32
+
111  );
+
112 
+
113  //Enable CompB Interrupt on default rising edge for CDIFG
+
114  Comp_D_setInterruptEdgeDirection(COMP_D_BASE, COMP_D_RISINGEDGE);
+
115 
+
116  // Clear any erroneous interrupts
+
117  Comp_D_clearInterrupt(COMP_D_BASE, (COMP_D_INTERRUPT_FLAG + COMP_D_INTERRUPT_FLAG_INVERTED_POLARITY));
+
118 
+
119  //Enable Interrupts
+
120  /*
+
121  * Base Address of Comparator B,
+
122  * Enable CompB Interrupt on default rising edge for CDIFG
+
123  */
+
124  Comp_D_clearInterrupt(COMP_D_BASE,
+
125  COMP_D_INTERRUPT
+
126  );
+
127 
+
128  Comp_D_enableInterrupt(COMP_D_BASE,
+
129  COMP_D_INTERRUPT
+
130  );
+
131 
+
132  //Allow power to Comparator module
+
133  Comp_D_enable(COMP_D_BASE);
+
134 
+
135  //Enter LPM4 with interrupts enabled
+
136  __bis_SR_register(LPM4_bits + GIE);
+
137 
+
138  //For debug
+
139  __no_operation();
+
140 }
+
141 
+
142 //******************************************************************************
+
143 //
+
144 //This is the COMP_B_VECTOR interrupt vector service routine.
+
145 //
+
146 //******************************************************************************
+
147 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
148 #pragma vector=COMP_D_VECTOR
+
149 __interrupt
+
150 #elif defined(__GNUC__)
+
151 __attribute__((interrupt(COMP_D_VECTOR)))
+
152 #endif
+
153 void COMP_D_D_ISR (void)
+
154 {
+
155  //Toggle the edge at which an interrupt is generated
+
156  Comp_D_toggleInterruptEdgeDirection(COMP_D_BASE);
+
157 
+
158  //Clear Interrupt flag
+
159  Comp_D_clearInterrupt(COMP_D_BASE, COMP_D_INTERRUPT_FLAG);
+
160 
+
161  //Toggle P3.4 output pin.
+
162  /*
+
163 
+
164  * Select Port 3
+
165  * Set Pin 4 as output
+
166  */
+
167  GPIO_toggleOutputOnPin(
+
168  GPIO_PORT_P3,
+
169  GPIO_PIN4
+
170  );
+
171 }
+
MPU_initThreeSegmentsParam param
+
void main(void)
+
void COMP_D_D_ISR(void)
+ +
__no_operation()
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/comp__d__ex4__output_toggle_vcomp_vs_half_vcc_8c.html b/Generated Documentation/html/comp__d__ex4__output_toggle_vcomp_vs_half_vcc_8c.html new file mode 100644 index 0000000..1e2cd72 --- /dev/null +++ b/Generated Documentation/html/comp__d__ex4__output_toggle_vcomp_vs_half_vcc_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/comp_d/comp_d_ex4_outputToggleVcompVsHalfVcc.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
comp_d_ex4_outputToggleVcompVsHalfVcc.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 55 of file comp_d_ex4_outputToggleVcompVsHalfVcc.c.

+ +

References __delay_cycles(), __no_operation(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/comp__d__ex4__output_toggle_vcomp_vs_half_vcc_8c.js b/Generated Documentation/html/comp__d__ex4__output_toggle_vcomp_vs_half_vcc_8c.js new file mode 100644 index 0000000..4527bbc --- /dev/null +++ b/Generated Documentation/html/comp__d__ex4__output_toggle_vcomp_vs_half_vcc_8c.js @@ -0,0 +1,4 @@ +var comp__d__ex4__output_toggle_vcomp_vs_half_vcc_8c = +[ + [ "main", "comp__d__ex4__output_toggle_vcomp_vs_half_vcc_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/comp__d__ex4__output_toggle_vcomp_vs_half_vcc_8c_source.html b/Generated Documentation/html/comp__d__ex4__output_toggle_vcomp_vs_half_vcc_8c_source.html new file mode 100644 index 0000000..13ab55b --- /dev/null +++ b/Generated Documentation/html/comp__d__ex4__output_toggle_vcomp_vs_half_vcc_8c_source.html @@ -0,0 +1,228 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/comp_d/comp_d_ex4_outputToggleVcompVsHalfVcc.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
comp_d_ex4_outputToggleVcompVsHalfVcc.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR57xx Demo - COMPD Toggle from LPM4; CompD in LPM4
+
34 // Vcompare is compared against the Vcc*1/2
+
35 //
+
36 // Description: Use CompB and shared reference to determine if input 'Vcompare'
+
37 // is high of low. When Vcompare exceeds Vcc*1/2 CDOUT goes high and when
+
38 // Vcompare is less than Vcc*1/2 then CDOUT goes low.
+
39 // P3.5/CDOUT is connected internally to an LED; it will toggle accordingly.
+
40 //
+
41 // MSP430FR5739
+
42 // ------------------
+
43 // /|\| |
+
44 // | | |
+
45 // --|RST P1.2/CD2 |<--Vcompare
+
46 // | |
+
47 // | P3.5/CDOUT|----> 'high'(Vcompare>Vcc*1/2); 'low'(Vcompare<Vcc*1/2)
+
48 // | | |
+
49 // | | | LED 'ON'(Vcompare>Vcc*1/2); 'OFF'(Vcompare<Vcc*1/2)
+
50 // | |
+
51 //
+
52 //******************************************************************************
+
53 #include "driverlib.h"
+
54 
+
55 void main(void)
+
56 {
+
57  //Stop WDT
+
58  WDT_A_hold(WDT_A_BASE);
+
59 
+
60  //Set P3.5 as Ternary Module Function Output.
+
61  /*
+
62  * Select Port 3
+
63  * Set Pin 5 to output Ternary Module Function, (CBOUT).
+
64  */
+
65  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
66  GPIO_PORT_P3,
+
67  GPIO_PIN5,
+
68  GPIO_TERNARY_MODULE_FUNCTION
+
69  );
+
70 
+
71  //Initialize the Comparator D module
+
72  /* Base Address of Comparator D,
+
73  * Pin CD2 to Positive(+) Terminal,
+
74  * Reference Voltage to Negative(-) Terminal,
+
75  * Normal Power Mode,
+
76  * Output Filter On with minimal delay,
+
77  * Non-Inverted Output Polarity
+
78  */
+
79  Comp_D_initParam param = {0};
+
80  param.positiveTerminalInput = COMP_D_INPUT2;
+
81  param.negativeTerminalInput = COMP_D_VREF;
+
82  param.outputFilterEnableAndDelayLevel = COMP_D_FILTEROUTPUT_OFF;
+
83  param.invertedOutputPolarity = COMP_D_NORMALOUTPUTPOLARITY;
+
84  Comp_D_init(COMP_D_BASE, &param);
+
85 
+
86  //Set the reference voltage that is being supplied to the (-) terminal
+
87  /* Base Address of Comparator D,
+
88  * Reference Voltage of Vcc V,
+
89  * Lower Limit of Vcc*(16/32) = Vcc*1/2,
+
90  * Upper Limit of Vcc*(8/32) = Vcc*1/4,
+
91  * Static Mode Accuracy
+
92  */
+
93  Comp_D_setReferenceVoltage(COMP_D_BASE,
+
94  COMP_D_REFERENCE_AMPLIFIER_DISABLED,
+
95  8,
+
96  16
+
97  );
+
98 
+
99  //Disable Input Buffer on P1.2/CD2
+
100  /* Base Address of Comparator D,
+
101  * Input Buffer port
+
102  * Selecting the CDx input pin to the comparator
+
103  * multiplexer with the CDx bits automatically
+
104  * disables output driver and input buffer for
+
105  * that pin, regardless of the state of the
+
106  * associated CDPD.x bit
+
107  */
+
108  Comp_D_disableInputBuffer(COMP_D_BASE,
+
109  COMP_D_INPUT2);
+
110 
+
111  //Allow power to Comparator module
+
112  Comp_D_enable(COMP_D_BASE);
+
113 
+
114  __delay_cycles(400); // delay for the reference to settle
+
115 
+
116  __bis_SR_register(LPM4_bits); // Enter LPM4
+
117  __no_operation(); // For debug
+
118 }
+
MPU_initThreeSegmentsParam param
+ + +
__no_operation()
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/comp__d__ex5__output_toggle_hysteresis_8c.html b/Generated Documentation/html/comp__d__ex5__output_toggle_hysteresis_8c.html new file mode 100644 index 0000000..79308c9 --- /dev/null +++ b/Generated Documentation/html/comp__d__ex5__output_toggle_hysteresis_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/comp_d/comp_d_ex5_outputToggleHysteresis.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
comp_d_ex5_outputToggleHysteresis.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 55 of file comp_d_ex5_outputToggleHysteresis.c.

+ +

References __delay_cycles(), __no_operation(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/comp__d__ex5__output_toggle_hysteresis_8c.js b/Generated Documentation/html/comp__d__ex5__output_toggle_hysteresis_8c.js new file mode 100644 index 0000000..2698fed --- /dev/null +++ b/Generated Documentation/html/comp__d__ex5__output_toggle_hysteresis_8c.js @@ -0,0 +1,4 @@ +var comp__d__ex5__output_toggle_hysteresis_8c = +[ + [ "main", "comp__d__ex5__output_toggle_hysteresis_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/comp__d__ex5__output_toggle_hysteresis_8c_source.html b/Generated Documentation/html/comp__d__ex5__output_toggle_hysteresis_8c_source.html new file mode 100644 index 0000000..1ad9e3c --- /dev/null +++ b/Generated Documentation/html/comp__d__ex5__output_toggle_hysteresis_8c_source.html @@ -0,0 +1,228 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/comp_d/comp_d_ex5_outputToggleHysteresis.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
comp_d_ex5_outputToggleHysteresis.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR57xx Demo - COMPD Hysteresis, CDOUT Toggle in LPM4; High speed mode
+
34 //
+
35 // Description: Use Compd and shared reference to determine if input 'Vcompare'
+
36 // is high of low. Shared reference is configured to generate hysteresis.
+
37 // When Vcompare exceeds Vcc*3/4 CDOUT goes high and when Vcompare is less
+
38 // than Vcc*1/4 then CDOUT goes low.
+
39 // P3.5/CDOUT is connected internally to an LED; it will toggle accordingly.
+
40 //
+
41 // MSP430FR5739
+
42 // ------------------
+
43 // /|\| |
+
44 // | | |
+
45 // --|RST P1.2/CD2 |<--Vcompare
+
46 // | |
+
47 // | P3.5/CDOUT|----> 'high'(Vcompare>Vcc*3/4); 'low'(Vcompare<Vcc*1/4)
+
48 // | | |
+
49 // | | | LED 'ON'(Vcompare>Vcc*3/4); 'OFF'(Vcompare<Vcc*1/4)
+
50 // | |
+
51 //
+
52 //******************************************************************************
+
53 #include "driverlib.h"
+
54 
+
55 void main(void)
+
56 {
+
57  //Stop WDT
+
58  WDT_A_hold(WDT_A_BASE);
+
59 
+
60  //Set P3.5 as Ternary Module Function Output.
+
61  /*
+
62  * Select Port 3
+
63  * Set Pin 5 to output Ternary Module Function, (CBOUT).
+
64  */
+
65  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
66  GPIO_PORT_P3,
+
67  GPIO_PIN5,
+
68  GPIO_TERNARY_MODULE_FUNCTION
+
69  );
+
70 
+
71  //Initialize the Comparator D module
+
72  /* Base Address of Comparator D,
+
73  * Pin CD2 to Positive(+) Terminal,
+
74  * Reference Voltage to Negative(-) Terminal,
+
75  * Normal Power Mode,
+
76  * Output Filter On with minimal delay,
+
77  * Non-Inverted Output Polarity
+
78  */
+
79  Comp_D_initParam param = {0};
+
80  param.positiveTerminalInput = COMP_D_INPUT2;
+
81  param.negativeTerminalInput = COMP_D_VREF;
+
82  param.outputFilterEnableAndDelayLevel = COMP_D_FILTEROUTPUT_OFF;
+
83  param.invertedOutputPolarity = COMP_D_NORMALOUTPUTPOLARITY;
+
84  Comp_D_init(COMP_D_BASE, &param);
+
85 
+
86  //Set the reference voltage that is being supplied to the (-) terminal
+
87  /* Base Address of Comparator D,
+
88  * Reference Voltage of Vcc V,
+
89  * Lower Limit of Vcc*(8/32) = Vcc*1/4,
+
90  * Upper Limit of Vcc*(24/32) = Vcc*3/4,
+
91  * Static Mode Accuracy
+
92  */
+
93  Comp_D_setReferenceVoltage(COMP_D_BASE,
+
94  COMP_D_REFERENCE_AMPLIFIER_DISABLED,
+
95  8,
+
96  24
+
97  );
+
98 
+
99  //Disable Input Buffer on P1.2/CD2
+
100  /* Base Address of Comparator D,
+
101  * Input Buffer port
+
102  * Selecting the CDx input pin to the comparator
+
103  * multiplexer with the CDx bits automatically
+
104  * disables output driver and input buffer for
+
105  * that pin, regardless of the state of the
+
106  * associated CDPD.x bit
+
107  */
+
108  Comp_D_disableInputBuffer(COMP_D_BASE,
+
109  COMP_D_INPUT2);
+
110 
+
111  //Allow power to Comparator module
+
112  Comp_D_enable(COMP_D_BASE);
+
113 
+
114  __delay_cycles(400); // delay for the reference to settle
+
115 
+
116  __bis_SR_register(LPM4_bits); // Enter LPM4
+
117  __no_operation(); // For debug
+
118 }
+
MPU_initThreeSegmentsParam param
+ + +
__no_operation()
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/comp__e__ex1__output_toggle_vcomp_vs_vref2_v_8c.html b/Generated Documentation/html/comp__e__ex1__output_toggle_vcomp_vs_vref2_v_8c.html new file mode 100644 index 0000000..49d30c4 --- /dev/null +++ b/Generated Documentation/html/comp__e__ex1__output_toggle_vcomp_vs_vref2_v_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/comp_e/comp_e_ex1_outputToggleVcompVsVref2V.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
comp_e_ex1_outputToggleVcompVsVref2V.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 57 of file comp_e_ex1_outputToggleVcompVsVref2V.c.

+ +

References __delay_cycles(), __no_operation(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/comp__e__ex1__output_toggle_vcomp_vs_vref2_v_8c.js b/Generated Documentation/html/comp__e__ex1__output_toggle_vcomp_vs_vref2_v_8c.js new file mode 100644 index 0000000..365aad6 --- /dev/null +++ b/Generated Documentation/html/comp__e__ex1__output_toggle_vcomp_vs_vref2_v_8c.js @@ -0,0 +1,4 @@ +var comp__e__ex1__output_toggle_vcomp_vs_vref2_v_8c = +[ + [ "main", "comp__e__ex1__output_toggle_vcomp_vs_vref2_v_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/comp__e__ex1__output_toggle_vcomp_vs_vref2_v_8c_source.html b/Generated Documentation/html/comp__e__ex1__output_toggle_vcomp_vs_vref2_v_8c_source.html new file mode 100644 index 0000000..79afc02 --- /dev/null +++ b/Generated Documentation/html/comp__e__ex1__output_toggle_vcomp_vs_vref2_v_8c_source.html @@ -0,0 +1,237 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/comp_e/comp_e_ex1_outputToggleVcompVsVref2V.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
comp_e_ex1_outputToggleVcompVsVref2V.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR59xx Demo - COMPE Toggle from LPM4; input channel C2;
+
34 // Vcompare is compared against the internal reference 2.0V
+
35 //
+
36 // Description: Use CompE (input channel C2) and internal reference to
+
37 // determine if input'Vcompare'is high or low. When Vcompare exceeds 2.0V
+
38 // COUT goes high and when Vcompare is less than 2.0V then COUT goes low.
+
39 // P3.5/COUT is connected internally to an LED; it will toggle accordingly.
+
40 //
+
41 // MSP430FR5969
+
42 // ------------------
+
43 // /|\| |
+
44 // | | |
+
45 // --|RST P1.2/C2|<--Vcompare
+
46 // | |
+
47 // | P3.5/COUT|----> 'high'(Vcompare>2.0V); 'low'(Vcompare<2.0V)
+
48 // | | |
+
49 // | | | LED 'ON'(Vcompare>2.0V); 'OFF'(Vcompare<2.0V)
+
50 // | |
+
51 //
+
52 
+
53 //******************************************************************************
+
54 
+
55 #include "driverlib.h"
+
56 
+
57 void main(void)
+
58 {
+
59  //Stop WDT
+
60  WDT_A_hold(WDT_A_BASE);
+
61 
+
62  //Set P3.5 as Ternary Module Function Output.
+
63  /*
+
64 
+
65  * Select Port 3
+
66  * Set Pin 5 to output Ternary Module Function, (COUT).
+
67  */
+
68  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
69  GPIO_PORT_P3,
+
70  GPIO_PIN5,
+
71  GPIO_TERNARY_MODULE_FUNCTION
+
72  );
+
73 
+
74  /*
+
75  * Disable the GPIO power-on default high-impedance mode to activate
+
76  * previously configured port settings
+
77  */
+
78  PMM_unlockLPM5();
+
79 
+
80  //Initialize the Comparator E module
+
81  /* Base Address of Comparator E,
+
82  * Pin CE2 to Positive(+) Terminal,
+
83  * Reference Voltage to Negative(-) Terminal,
+
84  * Normal Power Mode,
+
85  * Output Filter On with minimal delay,
+
86  * Non-Inverted Output Polarity
+
87  */
+
88 
+
89  Comp_E_initParam param = {0};
+
90  param.posTerminalInput = COMP_E_INPUT2;
+
91  param.negTerminalInput = COMP_E_VREF;
+
92  param.outputFilterEnableAndDelayLevel = COMP_E_FILTEROUTPUT_OFF;
+
93  param.invertedOutputPolarity = COMP_E_NORMALOUTPUTPOLARITY;
+
94  Comp_E_init(COMP_E_BASE, &param);
+
95 
+
96  //Set the reference voltage that is being supplied to the (-) terminal
+
97  /* Base Address of Comparator E,
+
98  * Reference Voltage of 2.0 V,
+
99  * Lower Limit of 2.0*(32/32) = 2.0V,
+
100  * Upper Limit of 2.0*(32/32) = 2.0V
+
101  */
+
102  Comp_E_setReferenceVoltage(COMP_E_BASE,
+
103  COMP_E_VREFBASE2_0V,
+
104  32,
+
105  32
+
106  );
+
107 
+
108  //Disable Input Buffer on P1.2/CE2
+
109  /* Base Address of Comparator E,
+
110  * Input Buffer port
+
111  * Selecting the CEx input pin to the comparator
+
112  * multiplexer with the CEx bits automatically
+
113  * disables output driver and input buffer for
+
114  * that pin, regardless of the state of the
+
115  * associated CEPD.x bit
+
116  */
+
117  Comp_E_disableInputBuffer(COMP_E_BASE,
+
118  COMP_E_INPUT2);
+
119 
+
120  //Allow power to Comparator module
+
121  Comp_E_enable(COMP_E_BASE);
+
122 
+
123  __delay_cycles(400); // delay for the reference to settle
+
124 
+
125  __bis_SR_register(LPM4_bits); // Enter LPM4
+
126  __no_operation(); // For debug
+
127 }
+
MPU_initThreeSegmentsParam param
+ + +
__no_operation()
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/comp__e__ex2__output_toggle_vcomp_vs_vref25_v_8c.html b/Generated Documentation/html/comp__e__ex2__output_toggle_vcomp_vs_vref25_v_8c.html new file mode 100644 index 0000000..2c5a0c0 --- /dev/null +++ b/Generated Documentation/html/comp__e__ex2__output_toggle_vcomp_vs_vref25_v_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/comp_e/comp_e_ex2_outputToggleVcompVsVref25V.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
comp_e_ex2_outputToggleVcompVsVref25V.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 55 of file comp_e_ex2_outputToggleVcompVsVref25V.c.

+ +

References __delay_cycles(), __no_operation(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/comp__e__ex2__output_toggle_vcomp_vs_vref25_v_8c.js b/Generated Documentation/html/comp__e__ex2__output_toggle_vcomp_vs_vref25_v_8c.js new file mode 100644 index 0000000..2f2fef9 --- /dev/null +++ b/Generated Documentation/html/comp__e__ex2__output_toggle_vcomp_vs_vref25_v_8c.js @@ -0,0 +1,4 @@ +var comp__e__ex2__output_toggle_vcomp_vs_vref25_v_8c = +[ + [ "main", "comp__e__ex2__output_toggle_vcomp_vs_vref25_v_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/comp__e__ex2__output_toggle_vcomp_vs_vref25_v_8c_source.html b/Generated Documentation/html/comp__e__ex2__output_toggle_vcomp_vs_vref25_v_8c_source.html new file mode 100644 index 0000000..4f80752 --- /dev/null +++ b/Generated Documentation/html/comp__e__ex2__output_toggle_vcomp_vs_vref25_v_8c_source.html @@ -0,0 +1,235 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/comp_e/comp_e_ex2_outputToggleVcompVsVref25V.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
comp_e_ex2_outputToggleVcompVsVref25V.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR59xx Demo - COMPE Toggle from LPM4; input channel C2;
+
34 // Vcompare is compared against the internal reference 2.5V
+
35 //
+
36 // Description: Use CompE (input channel C2) and internal reference to
+
37 // determine if input'Vcompare'is high or low. When Vcompare exceeds 2.5V
+
38 // CEOUT goes high and when Vcompare is less than 2.5V then CEOUT goes low.
+
39 // P3.5/COUT is connected internally to an LED; it will toggle accordingly.
+
40 //
+
41 // MSP430FR5969
+
42 // ------------------
+
43 // /|\| |
+
44 // | | |
+
45 // --|RST P1.2/C2|<--Vcompare
+
46 // | |
+
47 // | P3.5/COUT|----> 'high'(Vcompare>2.5V); 'low'(Vcompare<2.5V)
+
48 // | | |
+
49 // | | | LED 'ON'(Vcompare>2.5V); 'OFF'(Vcompare<2.5V)
+
50 // | |
+
51 //
+
52 //******************************************************************************
+
53 #include "driverlib.h"
+
54 
+
55 void main(void)
+
56 {
+
57  //Stop WDT
+
58  WDT_A_hold(WDT_A_BASE);
+
59 
+
60  //Set P3.5 as Ternary Module Function Output.
+
61  /*
+
62 
+
63  * Select Port 3
+
64  * Set Pin 5 to output Ternary Module Function, (COUT).
+
65  */
+
66  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
67  GPIO_PORT_P3,
+
68  GPIO_PIN5,
+
69  GPIO_TERNARY_MODULE_FUNCTION
+
70  );
+
71 
+
72  /*
+
73  * Disable the GPIO power-on default high-impedance mode to activate
+
74  * previously configured port settings
+
75  */
+
76  PMM_unlockLPM5();
+
77 
+
78  //Initialize the Comparator E module
+
79  /* Base Address of Comparator E,
+
80  * Pin C2 to Positive(+) Terminal,
+
81  * Reference Voltage to Negative(-) Terminal,
+
82  * Normal Power Mode,
+
83  * Output Filter On with minimal delay,
+
84  * Non-Inverted Output Polarity
+
85  */
+
86  Comp_E_initParam param = {0};
+
87  param.posTerminalInput = COMP_E_INPUT2;
+
88  param.negTerminalInput = COMP_E_VREF;
+
89  param.outputFilterEnableAndDelayLevel = COMP_E_FILTEROUTPUT_OFF;
+
90  param.invertedOutputPolarity = COMP_E_NORMALOUTPUTPOLARITY;
+
91  Comp_E_init(COMP_E_BASE, &param);
+
92 
+
93  //Set the reference voltage that is being supplied to the (-) terminal
+
94  /* Base Address of Comparator E,
+
95  * Reference Voltage of 2.5 V,
+
96  * Lower Limit of 2.5*(32/32) = 2.5V,
+
97  * Upper Limit of 2.5*(32/32) = 2.5V
+
98  */
+
99  Comp_E_setReferenceVoltage(COMP_E_BASE,
+
100  COMP_E_VREFBASE2_5V,
+
101  32,
+
102  32
+
103  );
+
104 
+
105  //Disable Input Buffer on P1.2/CE2
+
106  /* Base Address of Comparator E,
+
107  * Input Buffer port
+
108  * Selecting the CEx input pin to the comparator
+
109  * multiplexer with the CEx bits automatically
+
110  * disables output driver and input buffer for
+
111  * that pin, regardless of the state of the
+
112  * associated CEPD.x bit
+
113  */
+
114  Comp_E_disableInputBuffer(COMP_E_BASE,
+
115  COMP_E_INPUT2);
+
116 
+
117  //Allow power to Comparator module
+
118  Comp_E_enable(COMP_E_BASE);
+
119 
+
120  __delay_cycles(400); // delay for the reference to settle
+
121 
+
122  __bis_SR_register(LPM4_bits); // Enter LPM4
+
123  __no_operation(); // For debug
+
124 }
+
125 
+
MPU_initThreeSegmentsParam param
+ + +
__no_operation()
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/comp__e__ex3__interrupt_vcomp_vs12_v_8c.html b/Generated Documentation/html/comp__e__ex3__interrupt_vcomp_vs12_v_8c.html new file mode 100644 index 0000000..5aae565 --- /dev/null +++ b/Generated Documentation/html/comp__e__ex3__interrupt_vcomp_vs12_v_8c.html @@ -0,0 +1,161 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/comp_e/comp_e_ex3_interruptVcompVs12V.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
comp_e_ex3_interruptVcompVs12V.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void COMP_E_ISR (void)
 
+

Function Documentation

+ +

◆ COMP_E_ISR()

+ +
+
+ + + + + + + + +
void COMP_E_ISR (void )
+
+ +

Definition at line 159 of file comp_e_ex3_interruptVcompVs12V.c.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 57 of file comp_e_ex3_interruptVcompVs12V.c.

+ +

References __no_operation(), GPIO_setOutputLowOnPin(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/comp__e__ex3__interrupt_vcomp_vs12_v_8c.js b/Generated Documentation/html/comp__e__ex3__interrupt_vcomp_vs12_v_8c.js new file mode 100644 index 0000000..7b800ec --- /dev/null +++ b/Generated Documentation/html/comp__e__ex3__interrupt_vcomp_vs12_v_8c.js @@ -0,0 +1,5 @@ +var comp__e__ex3__interrupt_vcomp_vs12_v_8c = +[ + [ "COMP_E_ISR", "comp__e__ex3__interrupt_vcomp_vs12_v_8c.html#a697df7e84b63ee29fb9d5fa416ccc49e", null ], + [ "main", "comp__e__ex3__interrupt_vcomp_vs12_v_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/comp__e__ex3__interrupt_vcomp_vs12_v_8c_source.html b/Generated Documentation/html/comp__e__ex3__interrupt_vcomp_vs12_v_8c_source.html new file mode 100644 index 0000000..a88bae3 --- /dev/null +++ b/Generated Documentation/html/comp__e__ex3__interrupt_vcomp_vs12_v_8c_source.html @@ -0,0 +1,288 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/comp_e/comp_e_ex3_interruptVcompVs12V.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
comp_e_ex3_interruptVcompVs12V.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR5969 Demo - COMPE interrupt capability; Vcompare is compared against
+
34 // internal 1.2V reference
+
35 //
+
36 // Description: Use COMPE and internal reference to determine if input'Vcompare'
+
37 // is high of low. For the first time, when Vcompare exceeds the 1.2V internal
+
38 // reference, CEIFG is set and device enters the COMPE ISR. In the ISR, CEIES is
+
39 // toggled such that when Vcompare is less than 1.2V internal reference;
+
40 // CEIFG is set.
+
41 // LED is toggled inside the COMPE ISR
+
42 //
+
43 // MSP430FR5969
+
44 // ------------------
+
45 // /|\| |
+
46 // | | |
+
47 // --|RST P3.1/CE13|<--Vcompare
+
48 // | |
+
49 // | P3.4|----> 'high'(Vcompare>1.2V); 'low'(Vcompare<1.2V)
+
50 // | | |
+
51 // | | | LED 'ON'(Vcompare>1.2V); 'OFF'(Vcompare<1.2V)
+
52 // | |
+
53 //
+
54 //******************************************************************************
+
55 #include "driverlib.h"
+
56 
+
57 void main (void)
+
58 {
+
59  //Stop WDT
+
60  WDT_A_hold(WDT_A_BASE);
+
61 
+
62  //Set P3.4 as an output pin.
+
63  /*
+
64 
+
65  * Select Port 3
+
66  * Set Pin 4 as output
+
67  */
+
68  GPIO_setAsOutputPin(
+
69  GPIO_PORT_P3,
+
70  GPIO_PIN4
+
71  );
+
72  //Set P3.4 as Output Low.
+
73  /*
+
74 
+
75  * Select Port 3
+
76  * Set Pin 4 to output Low.
+
77  */
+ +
79  GPIO_PORT_P3,
+
80  GPIO_PIN4
+
81  );
+
82 
+
83  /*
+
84  * Disable the GPIO power-on default high-impedance mode to activate
+
85  * previously configured port settings
+
86  */
+
87  PMM_unlockLPM5();
+
88 
+
89  //Initialize the Comparator E module
+
90  /*
+
91  * Base Address of Comparator E,
+
92  * Pin CE13 to Positive(+) Terminal
+
93  * Reference Voltage to Negative(-) Terminal
+
94  * Normal Power Mode
+
95  * Output Filter On with minimal delay
+
96  * Non-Inverted Output Polarity
+
97  */
+
98  Comp_E_initParam param = {0};
+
99  param.posTerminalInput = COMP_E_INPUT13;
+
100  param.negTerminalInput = COMP_E_VREF;
+
101  param.outputFilterEnableAndDelayLevel = COMP_E_FILTEROUTPUT_OFF;
+
102  param.invertedOutputPolarity = COMP_E_NORMALOUTPUTPOLARITY;
+
103  Comp_E_init(COMP_E_BASE, &param);
+
104 
+
105  //Set the reference voltage that is being supplied to the (-) terminal
+
106  /*
+
107  * Base Address of Comparator E,
+
108  * Reference Voltage of 1.5 V,
+
109  * Lower Limit of 1.2*(32/32) = 1.2V,
+
110  * Upper Limit of 1.2*(32/32) = 1.2V
+
111  */
+
112  Comp_E_setReferenceVoltage(COMP_E_BASE,
+
113  COMP_E_VREFBASE1_2V,
+
114  32,
+
115  32
+
116  );
+
117 
+
118  //Enable COMP_E Interrupt on default rising edge for CEIFG
+
119  Comp_E_setInterruptEdgeDirection(COMP_E_BASE, COMP_E_RISINGEDGE);
+
120 
+
121  // Clear any erroneous interrupts
+
122  Comp_E_clearInterrupt(COMP_E_BASE, (COMP_E_OUTPUT_INTERRUPT_FLAG + COMP_E_INTERRUPT_FLAG_INVERTED_POLARITY));
+
123 
+
124  //Enable Interrupts
+
125  /*
+
126  * Base Address of Comparator E,
+
127  * Enable COMPE Interrupt on default rising edge for CEIFG
+
128  */
+
129 
+
130  Comp_E_clearInterrupt(COMP_E_BASE,
+
131  COMP_E_OUTPUT_INTERRUPT_FLAG
+
132  );
+
133 
+
134  Comp_E_enableInterrupt(COMP_E_BASE,
+
135  COMP_E_OUTPUT_INTERRUPT
+
136  );
+
137 
+
138  //Allow power to Comparator module
+
139  Comp_E_enable(COMP_E_BASE);
+
140 
+
141  //Enter LPM4 with interrupts enabled
+
142  __bis_SR_register(LPM4_bits + GIE);
+
143 
+
144  //For debug
+
145  __no_operation();
+
146 }
+
147 
+
148 //******************************************************************************
+
149 //
+
150 //This is the COMP_E_VECTOR interrupt vector service routine.
+
151 //
+
152 //******************************************************************************
+
153 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
154 #pragma vector=COMP_E_VECTOR
+
155 __interrupt
+
156 #elif defined(__GNUC__)
+
157 __attribute__((interrupt(COMP_E_VECTOR)))
+
158 #endif
+
159 void COMP_E_ISR (void)
+
160 {
+
161  //Toggle the edge at which an interrupt is generated
+
162  Comp_E_toggleInterruptEdgeDirection(COMP_E_BASE);
+
163 
+
164  //Clear Interrupt flag
+
165  Comp_E_clearInterrupt(COMP_E_BASE, COMP_E_OUTPUT_INTERRUPT_FLAG);
+
166 
+
167  //Toggle P3.4 output pin.
+
168  /*
+
169 
+
170  * Select Port 3
+
171  * Set Pin 4 as output
+
172  */
+
173  GPIO_toggleOutputOnPin(
+
174  GPIO_PORT_P3,
+
175  GPIO_PIN4
+
176  );
+
177 }
+
MPU_initThreeSegmentsParam param
+
void main(void)
+
void COMP_E_ISR(void)
+ +
__no_operation()
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/comp__e__ex4__output_toggle_vcomp_vs_half_vcc_8c.html b/Generated Documentation/html/comp__e__ex4__output_toggle_vcomp_vs_half_vcc_8c.html new file mode 100644 index 0000000..4db948d --- /dev/null +++ b/Generated Documentation/html/comp__e__ex4__output_toggle_vcomp_vs_half_vcc_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/comp_e/comp_e_ex4_outputToggleVcompVsHalfVcc.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
comp_e_ex4_outputToggleVcompVsHalfVcc.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 55 of file comp_e_ex4_outputToggleVcompVsHalfVcc.c.

+ +

References __delay_cycles(), __no_operation(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/comp__e__ex4__output_toggle_vcomp_vs_half_vcc_8c.js b/Generated Documentation/html/comp__e__ex4__output_toggle_vcomp_vs_half_vcc_8c.js new file mode 100644 index 0000000..757e5a9 --- /dev/null +++ b/Generated Documentation/html/comp__e__ex4__output_toggle_vcomp_vs_half_vcc_8c.js @@ -0,0 +1,4 @@ +var comp__e__ex4__output_toggle_vcomp_vs_half_vcc_8c = +[ + [ "main", "comp__e__ex4__output_toggle_vcomp_vs_half_vcc_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/comp__e__ex4__output_toggle_vcomp_vs_half_vcc_8c_source.html b/Generated Documentation/html/comp__e__ex4__output_toggle_vcomp_vs_half_vcc_8c_source.html new file mode 100644 index 0000000..2fc5d3e --- /dev/null +++ b/Generated Documentation/html/comp__e__ex4__output_toggle_vcomp_vs_half_vcc_8c_source.html @@ -0,0 +1,234 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/comp_e/comp_e_ex4_outputToggleVcompVsHalfVcc.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
comp_e_ex4_outputToggleVcompVsHalfVcc.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR59xx Demo - COMPE Toggle from LPM4; CompE in LPM4
+
34 // Vcompare is compared against the Vcc*1/2
+
35 //
+
36 // Description: Use CompE and shared reference to determine if input 'Vcompare'
+
37 // is high of low. When Vcompare exceeds Vcc*1/2 COUT goes high and when
+
38 // Vcompare is less than Vcc*1/2 then CEOUT goes low.
+
39 // P3.5/CEOUT is connected internally to an LED; it will toggle accordingly.
+
40 //
+
41 // MSP430FR5969
+
42 // ------------------
+
43 // /|\| |
+
44 // | | |
+
45 // --|RST P1.2/CE2 |<--Vcompare
+
46 // | |
+
47 // | P3.5/CEOUT|----> 'high'(Vcompare>Vcc*1/2); 'low'(Vcompare<Vcc*1/2)
+
48 // | | |
+
49 // | | | LED 'ON'(Vcompare>Vcc*1/2); 'OFF'(Vcompare<Vcc*1/2)
+
50 // | |
+
51 //
+
52 //******************************************************************************
+
53 #include "driverlib.h"
+
54 
+
55 void main(void)
+
56 {
+
57  //Stop WDT
+
58  WDT_A_hold(WDT_A_BASE);
+
59 
+
60  //Set P3.5 as Ternary Module Function Output.
+
61  /*
+
62 
+
63  * Select Port 3
+
64  * Set Pin 5 to output Ternary Module Function, (CEOUT).
+
65  */
+
66  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
67  GPIO_PORT_P3,
+
68  GPIO_PIN5,
+
69  GPIO_TERNARY_MODULE_FUNCTION
+
70  );
+
71 
+
72  /*
+
73  * Disable the GPIO power-on default high-impedance mode to activate
+
74  * previously configured port settings
+
75  */
+
76  PMM_unlockLPM5();
+
77 
+
78  //Initialize the Comparator E module
+
79  /* Base Address of Comparator E,
+
80  * Pin C2 to Positive(+) Terminal,
+
81  * Reference Voltage to Negative(-) Terminal,
+
82  * Normal Power Mode,
+
83  * Output Filter On with minimal delay,
+
84  * Non-Inverted Output Polarity
+
85  */
+
86  Comp_E_initParam param = {0};
+
87  param.posTerminalInput = COMP_E_INPUT2;
+
88  param.negTerminalInput = COMP_E_VREF;
+
89  param.outputFilterEnableAndDelayLevel = COMP_E_FILTEROUTPUT_OFF;
+
90  param.invertedOutputPolarity = COMP_E_NORMALOUTPUTPOLARITY;
+
91  Comp_E_init(COMP_E_BASE, &param);
+
92 
+
93  //Set the reference voltage that is being supplied to the (-) terminal
+
94  /* Base Address of Comparator E,
+
95  * Reference Voltage of Vcc V,
+
96  * Lower Limit of Vcc*(16/32) = Vcc*1/2,
+
97  * Upper Limit of Vcc*(16/32) = Vcc*1/2
+
98  */
+
99  Comp_E_setReferenceVoltage(COMP_E_BASE,
+
100  COMP_E_REFERENCE_AMPLIFIER_DISABLED,
+
101  16,
+
102  16
+
103  );
+
104 
+
105  //Disable Input Buffer on P1.2/CE2
+
106  /* Base Address of Comparator E,
+
107  * Input Buffer port
+
108  * Selecting the CEx input pin to the comparator
+
109  * multiplexer with the CEx bits automatically
+
110  * disables output driver and input buffer for
+
111  * that pin, regardless of the state of the
+
112  * associated CEPE.x bit
+
113  */
+
114  Comp_E_disableInputBuffer(COMP_E_BASE,
+
115  COMP_E_INPUT2);
+
116 
+
117  //Allow power to Comparator module
+
118  Comp_E_enable(COMP_E_BASE);
+
119 
+
120  __delay_cycles(400); // delay for the reference to settle
+
121 
+
122  __bis_SR_register(LPM4_bits); // Enter LPM4
+
123  __no_operation(); // For debug
+
124 }
+
MPU_initThreeSegmentsParam param
+ + +
__no_operation()
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/comp__e__ex5__output_toggle_hysteresis_8c.html b/Generated Documentation/html/comp__e__ex5__output_toggle_hysteresis_8c.html new file mode 100644 index 0000000..401e16d --- /dev/null +++ b/Generated Documentation/html/comp__e__ex5__output_toggle_hysteresis_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/comp_e/comp_e_ex5_outputToggleHysteresis.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
comp_e_ex5_outputToggleHysteresis.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 55 of file comp_e_ex5_outputToggleHysteresis.c.

+ +

References __delay_cycles(), __no_operation(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/comp__e__ex5__output_toggle_hysteresis_8c.js b/Generated Documentation/html/comp__e__ex5__output_toggle_hysteresis_8c.js new file mode 100644 index 0000000..41219c4 --- /dev/null +++ b/Generated Documentation/html/comp__e__ex5__output_toggle_hysteresis_8c.js @@ -0,0 +1,4 @@ +var comp__e__ex5__output_toggle_hysteresis_8c = +[ + [ "main", "comp__e__ex5__output_toggle_hysteresis_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/comp__e__ex5__output_toggle_hysteresis_8c_source.html b/Generated Documentation/html/comp__e__ex5__output_toggle_hysteresis_8c_source.html new file mode 100644 index 0000000..c8ebd55 --- /dev/null +++ b/Generated Documentation/html/comp__e__ex5__output_toggle_hysteresis_8c_source.html @@ -0,0 +1,234 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/comp_e/comp_e_ex5_outputToggleHysteresis.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
comp_e_ex5_outputToggleHysteresis.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR59xx Demo - COMPE Hysteresis, COUT Toggle in LPM4; High speed mode
+
34 //
+
35 // Description: Use CompE and shared reference to determine if input 'Vcompare'
+
36 // is high of low. Shared reference is configured to generate hysteresis.
+
37 // When Vcompare exceeds Vcc*3/4 COUT goes high and when Vcompare is less
+
38 // than Vcc*1/4 then CEOUT goes low.
+
39 // P3.5/COUT is connected internally to an LED; it will toggle accordingly.
+
40 //
+
41 // MSP430FR5969
+
42 // ------------------
+
43 // /|\| |
+
44 // | | |
+
45 // --|RST P1.2/CE2 |<--Vcompare
+
46 // | |
+
47 // | P3.5/COUT|----> 'high'(Vcompare>Vcc*3/4); 'low'(Vcompare<Vcc*1/4)
+
48 // | | |
+
49 // | | | LED 'ON'(Vcompare>Vcc*3/4); 'OFF'(Vcompare<Vcc*1/4)
+
50 // | |
+
51 //
+
52 //******************************************************************************
+
53 #include "driverlib.h"
+
54 
+
55 void main(void)
+
56 {
+
57  //Stop WDT
+
58  WDT_A_hold(WDT_A_BASE);
+
59 
+
60  //Set P3.5 as Ternary Module Function Output.
+
61  /*
+
62 
+
63  * Select Port 3
+
64  * Set Pin 5 to output Ternary Module Function, (COUT).
+
65  */
+
66  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
67  GPIO_PORT_P3,
+
68  GPIO_PIN5,
+
69  GPIO_TERNARY_MODULE_FUNCTION
+
70  );
+
71 
+
72  /*
+
73  * Disable the GPIO power-on default high-impedance mode to activate
+
74  * previously configured port settings
+
75  */
+
76  PMM_unlockLPM5();
+
77 
+
78  //Initialize the Comparator E module
+
79  /* Base Address of Comparator E,
+
80  * Pin CE2 to Positive(+) Terminal,
+
81  * Reference Voltage to Negative(-) Terminal,
+
82  * Normal Power Mode,
+
83  * Output Filter On with minimal delay,
+
84  * Non-Inverted Output Polarity
+
85  */
+
86  Comp_E_initParam param = {0};
+
87  param.posTerminalInput = COMP_E_INPUT2;
+
88  param.negTerminalInput = COMP_E_VREF;
+
89  param.outputFilterEnableAndDelayLevel = COMP_E_FILTEROUTPUT_OFF;
+
90  param.invertedOutputPolarity = COMP_E_NORMALOUTPUTPOLARITY;
+
91  Comp_E_init(COMP_E_BASE, &param);
+
92 
+
93  //Set the reference voltage that is being supplied to the (-) terminal
+
94  /* Base Address of Comparator E,
+
95  * Reference Voltage of Vcc V,
+
96  * Lower Limit of Vcc*(8/32) = Vcc*1/4,
+
97  * Upper Limit of Vcc*(24/32) = Vcc*3/4
+
98  */
+
99  Comp_E_setReferenceVoltage(COMP_E_BASE,
+
100  COMP_E_REFERENCE_AMPLIFIER_DISABLED,
+
101  8,
+
102  24
+
103  );
+
104 
+
105  //Disable Input Buffer on P1.2/CE2
+
106  /* Base Address of Comparator E,
+
107  * Input Buffer port
+
108  * Selecting the CEx input pin to the comparator
+
109  * multiplexer with the CEx bits automatically
+
110  * disables output driver and input buffer for
+
111  * that pin, regardless of the state of the
+
112  * associated CEPD.x bit
+
113  */
+
114  Comp_E_disableInputBuffer(COMP_E_BASE,
+
115  COMP_E_INPUT2);
+
116 
+
117  //Allow power to Comparator module
+
118  Comp_E_enable(COMP_E_BASE);
+
119 
+
120  __delay_cycles(400); // delay for the reference to settle
+
121 
+
122  __bis_SR_register(LPM4_bits); // Enter LPM4
+
123  __no_operation(); // For debug
+
124 }
+
MPU_initThreeSegmentsParam param
+ + +
__no_operation()
+
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/crc32__ex1__calculate_crc16_8c.html b/Generated Documentation/html/crc32__ex1__calculate_crc16_8c.html new file mode 100644 index 0000000..dd9cb30 --- /dev/null +++ b/Generated Documentation/html/crc32__ex1__calculate_crc16_8c.html @@ -0,0 +1,198 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/crc32/crc32_ex1_calculateCrc16.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
crc32_ex1_calculateCrc16.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define CRC16_POLY   0x1021
 
#define CRC16_INIT   0xFFFF
 
+ + + +

+Functions

int main (void)
 
+

Macro Definition Documentation

+ +

◆ CRC16_INIT

+ +
+
+ + + + +
#define CRC16_INIT   0xFFFF
+
+ +

Definition at line 62 of file crc32_ex1_calculateCrc16.c.

+ +
+
+ +

◆ CRC16_POLY

+ +
+
+ + + + +
#define CRC16_POLY   0x1021
+
+

CRC - Calculate CRC and check result

+

Breakpoints can be set at __no_operation()to compare hardware and software generated CRC values.

+

+Tested On: MSP430FR6989

+ + + + + +
/ |
RST
+

| | | |

+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • CRC peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • NONE
  • +
+ +

Definition at line 61 of file crc32_ex1_calculateCrc16.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
int main (void )
+
+ +

Definition at line 67 of file crc32_ex1_calculateCrc16.c.

+ +

References CRC16_INIT.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/crc32__ex1__calculate_crc16_8c.js b/Generated Documentation/html/crc32__ex1__calculate_crc16_8c.js new file mode 100644 index 0000000..ba7a77e --- /dev/null +++ b/Generated Documentation/html/crc32__ex1__calculate_crc16_8c.js @@ -0,0 +1,6 @@ +var crc32__ex1__calculate_crc16_8c = +[ + [ "CRC16_INIT", "crc32__ex1__calculate_crc16_8c.html#ac2f59d153f3abbf2abf1075bbec46fcd", null ], + [ "CRC16_POLY", "crc32__ex1__calculate_crc16_8c.html#a1c4dbf04065186cf7222c6a31efbde75", null ], + [ "main", "crc32__ex1__calculate_crc16_8c.html#a840291bc02cba5474a4cb46a9b9566fe", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/crc32__ex1__calculate_crc16_8c_source.html b/Generated Documentation/html/crc32__ex1__calculate_crc16_8c_source.html new file mode 100644 index 0000000..c7a9346 --- /dev/null +++ b/Generated Documentation/html/crc32__ex1__calculate_crc16_8c_source.html @@ -0,0 +1,201 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/crc32/crc32_ex1_calculateCrc16.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
crc32_ex1_calculateCrc16.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
58 //******************************************************************************
+
59 #include "driverlib.h"
+
60 
+
61 #define CRC16_POLY 0x1021
+
62 #define CRC16_INIT 0xFFFF
+
63 
+
64 static const uint8_t myData[9] = {0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39};
+
65 static uint16_t calculateCRC16(uint8_t* data, uint32_t length);
+
66 
+
67 int main(void)
+
68 {
+
69  volatile uint16_t hwCalculatedCRC, swCalculatedCRC;
+
70  uint32_t ii;
+
71 
+
72  //Stop WDT
+
73  WDT_A_hold(WDT_A_BASE);
+
74 
+
75  CRC32_setSeed(CRC16_INIT, CRC16_MODE);
+
76 
+
77  for(ii=0;ii<9;ii++)
+
78  CRC32_set8BitDataReversed(myData[ii], CRC16_MODE);
+
79 
+
80  /* Getting the result from the hardware module */
+
81  hwCalculatedCRC = CRC32_getResult(CRC16_MODE);
+
82 
+
83  /* Calculating the CRC16 checksum through software */
+
84  swCalculatedCRC = calculateCRC16((uint8_t*)myData, 9);
+
85 
+
86  /* Pause for the debugger */
+ +
88 }
+
89 
+
90 
+
91 /* Standard software calculation of CRC16 */
+
92 static uint16_t calculateCRC16(uint8_t* data, uint32_t length)
+
93 {
+
94  uint16_t i, j;
+
95  uint16_t msg;
+
96  uint16_t crc = 0xFFFF;
+
97  uint8_t* pmsg = data;
+
98 
+
99  uint32_t msg_size = length;
+
100 
+
101  for(i = 0 ; i < msg_size ; i ++)
+
102  {
+
103  msg = (pmsg[i] << 8);
+
104  for(j = 0 ; j < 8 ; j++)
+
105  {
+
106  if((msg ^ crc) >> 15) crc = (crc << 1) ^ CRC16_POLY;
+
107  else crc <<= 1;
+
108  msg <<= 1;
+
109  }
+
110  }
+
111 
+
112  return(crc);
+
113 }
+
114 
+
115 
+
#define CRC16_POLY
+
int main(void)
+
#define CRC16_INIT
+ + +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/crc_8c.html b/Generated Documentation/html/crc_8c.html index 0921c45..1609b7d 100644 --- a/Generated Documentation/html/crc_8c.html +++ b/Generated Documentation/html/crc_8c.html @@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('crc_8c.html',''); initResizable(); }); diff --git a/Generated Documentation/html/crc_8c_source.html b/Generated Documentation/html/crc_8c_source.html index 22a38e8..dddd6a4 100644 --- a/Generated Documentation/html/crc_8c_source.html +++ b/Generated Documentation/html/crc_8c_source.html @@ -170,7 +170,7 @@ $(document).ready(function(){initNavTree('crc_8c_source.html',''); initResizable diff --git a/Generated Documentation/html/crc_8h.html b/Generated Documentation/html/crc_8h.html index add1daa..0064827 100644 --- a/Generated Documentation/html/crc_8h.html +++ b/Generated Documentation/html/crc_8h.html @@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('crc_8h.html',''); initResizable(); }); diff --git a/Generated Documentation/html/crc_8h_source.html b/Generated Documentation/html/crc_8h_source.html index 8d769b6..0adb7b4 100644 --- a/Generated Documentation/html/crc_8h_source.html +++ b/Generated Documentation/html/crc_8h_source.html @@ -193,7 +193,7 @@ $(document).ready(function(){initNavTree('crc_8h_source.html',''); initResizable diff --git a/Generated Documentation/html/cs__ex1___d_c_o1_m_hz_s_w_trim_8c.html b/Generated Documentation/html/cs__ex1___d_c_o1_m_hz_s_w_trim_8c.html new file mode 100644 index 0000000..5d99cee --- /dev/null +++ b/Generated Documentation/html/cs__ex1___d_c_o1_m_hz_s_w_trim_8c.html @@ -0,0 +1,267 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/cs/cs_ex1_DCO1MHzSWTrim.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cs_ex1_DCO1MHzSWTrim.c File Reference
+
+
+
#include "driverlib.h"
+#include "Board.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define CS_MCLK_DESIRED_FREQUENCY_IN_KHZ   1000
 
#define CS_MCLK_FLLREF_RATIO   30
 
+ + + + + +

+Functions

void main (void)
 
void NMI_ISR (void)
 
+ + + + + +

+Variables

uint32_t clockValue = 0
 
uint16_t status
 
+

Macro Definition Documentation

+ +

◆ CS_MCLK_DESIRED_FREQUENCY_IN_KHZ

+ +
+
+ + + + +
#define CS_MCLK_DESIRED_FREQUENCY_IN_KHZ   1000
+
+

Software Trim on 1MHz DCO

+

Performs proper software trim both from uncalculated trim values and pre-loaded trim values, and then toggles LED2 ACLK, SMCLK, and MCLK are brought out to external pins on the board.

+

ACLK = REFO = ~32kHz, MCLK = SMCLK = 1MHz

    MSP430FR2xx_4xx Board
+      -----------------
+  /|\|                 |
+   | |                 |-->ACLK
+   --|RST              |-->MCLK
+     |                 |-->SMCLK
+     |                 |
+     |                 |-->LED2
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • CS module
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 69 of file cs_ex1_DCO1MHzSWTrim.c.

+ +
+
+ +

◆ CS_MCLK_FLLREF_RATIO

+ +
+
+ + + + +
#define CS_MCLK_FLLREF_RATIO   30
+
+ +

Definition at line 76 of file cs_ex1_DCO1MHzSWTrim.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+
+ +

◆ NMI_ISR()

+ +
+
+ + + + + + + + +
void NMI_ISR (void )
+
+ +

Definition at line 205 of file cs_ex1_DCO1MHzSWTrim.c.

+ +

References status.

+ +
+
+

Variable Documentation

+ +

◆ clockValue

+ +
+
+ + + + +
uint32_t clockValue = 0
+
+ +

Definition at line 83 of file cs_ex1_DCO1MHzSWTrim.c.

+ +

Referenced by main().

+ +
+
+ +

◆ status

+ +
+
+ + + + +
uint16_t status
+
+ +

Definition at line 90 of file cs_ex1_DCO1MHzSWTrim.c.

+ +

Referenced by NMI_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/cs__ex1___d_c_o1_m_hz_s_w_trim_8c.js b/Generated Documentation/html/cs__ex1___d_c_o1_m_hz_s_w_trim_8c.js new file mode 100644 index 0000000..f161080 --- /dev/null +++ b/Generated Documentation/html/cs__ex1___d_c_o1_m_hz_s_w_trim_8c.js @@ -0,0 +1,9 @@ +var cs__ex1___d_c_o1_m_hz_s_w_trim_8c = +[ + [ "CS_MCLK_DESIRED_FREQUENCY_IN_KHZ", "cs__ex1___d_c_o1_m_hz_s_w_trim_8c.html#a96810807fae1dc144d2c4f756c3834be", null ], + [ "CS_MCLK_FLLREF_RATIO", "cs__ex1___d_c_o1_m_hz_s_w_trim_8c.html#a144e3fd4747bc0d1b5b84c7f3fd73a92", null ], + [ "main", "cs__ex1___d_c_o1_m_hz_s_w_trim_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "NMI_ISR", "cs__ex1___d_c_o1_m_hz_s_w_trim_8c.html#a218a5747a3785b143c62b6f09d13e717", null ], + [ "clockValue", "cs__ex1___d_c_o1_m_hz_s_w_trim_8c.html#addf85f1095ff1d9d649037237844da86", null ], + [ "status", "cs__ex1___d_c_o1_m_hz_s_w_trim_8c.html#a5393c99e246925076b1dfd69a64177ef", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/cs__ex1___d_c_o1_m_hz_s_w_trim_8c_source.html b/Generated Documentation/html/cs__ex1___d_c_o1_m_hz_s_w_trim_8c_source.html new file mode 100644 index 0000000..1e366da --- /dev/null +++ b/Generated Documentation/html/cs__ex1___d_c_o1_m_hz_s_w_trim_8c_source.html @@ -0,0 +1,300 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/cs/cs_ex1_DCO1MHzSWTrim.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
cs_ex1_DCO1MHzSWTrim.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 #include "Board.h"
+
63 
+
64 //*****************************************************************************
+
65 //
+
66 //Target frequency for MCLK in kHz
+
67 //
+
68 //*****************************************************************************
+
69 #define CS_MCLK_DESIRED_FREQUENCY_IN_KHZ 1000
+
70 
+
71 //*****************************************************************************
+
72 //
+
73 //MCLK/FLLRef Ratio
+
74 //
+
75 //*****************************************************************************
+
76 #define CS_MCLK_FLLREF_RATIO 30
+
77 
+
78 //*****************************************************************************
+
79 //
+
80 //Variable to store current Clock values
+
81 //
+
82 //*****************************************************************************
+
83 uint32_t clockValue = 0;
+
84 
+
85 //*****************************************************************************
+
86 //
+
87 //Variable to store status of Oscillator fault flags
+
88 //
+
89 //*****************************************************************************
+
90 uint16_t status;
+
91 
+
92 void main (void)
+
93 {
+
94  //Stop watchdog timer
+
95  WDT_A_hold(WDT_A_BASE);
+
96 
+
97  //Set LED2 to output direction
+
98  GPIO_setAsOutputPin(
+
99  GPIO_PORT_LED2,
+
100  GPIO_PIN_LED2
+
101  );
+
102 
+
103  //ACLK set out to pins
+
104  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
105  GPIO_PORT_ACLK,
+
106  GPIO_PIN_ACLK,
+
107  GPIO_FUNCTION_ACLK
+
108  );
+
109  //SMCLK set out to pins
+
110  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
111  GPIO_PORT_SMCLK,
+
112  GPIO_PIN_SMCLK,
+
113  GPIO_FUNCTION_SMCLK
+
114  );
+
115  //MCLK set out to pins
+
116  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
117  GPIO_PORT_MCLK,
+
118  GPIO_PIN_MCLK,
+
119  GPIO_FUNCTION_MCLK
+
120  );
+
121 
+
122  /*
+
123  * Disable the GPIO power-on default high-impedance mode to activate
+
124  * previously configured port settings
+
125  */
+
126  PMM_unlockLPM5();
+
127 
+
128  //Set DCO FLL reference = REFO
+
129  CS_initClockSignal(
+
130  CS_FLLREF,
+
131  CS_REFOCLK_SELECT,
+
132  CS_CLOCK_DIVIDER_1
+
133  );
+
134 
+
135  //Set ACLK = REFO
+
136  CS_initClockSignal(
+
137  CS_ACLK,
+
138  CS_REFOCLK_SELECT,
+
139  CS_CLOCK_DIVIDER_1
+
140  );
+
141 
+
142  //Create struct variable to store proper software trim values
+
143  CS_initFLLParam param = {0};
+
144 
+
145  //Set Ratio/Desired MCLK Frequency, initialize DCO, save trim values
+
146  CS_initFLLCalculateTrim(
+ + +
149  &param
+
150  );
+
151 
+
152  //Clear all OSC fault flag
+
153  CS_clearAllOscFlagsWithTimeout(1000);
+
154 
+
155  //For demonstration purpose, change DCO clock freq to 16MHz
+
156  CS_initFLLSettle(
+
157  16000,
+
158  487
+
159  );
+
160 
+
161  //Clear all OSC fault flag
+
162  CS_clearAllOscFlagsWithTimeout(1000);
+
163 
+
164  //Reload DCO trim values that were calculated earlier
+
165  CS_initFLLLoadTrim(
+ + +
168  &param
+
169  );
+
170 
+
171  //Clear all OSC fault flag
+
172  CS_clearAllOscFlagsWithTimeout(1000);
+
173 
+
174  //Enable oscillator fault interrupt
+
175  SFR_enableInterrupt(SFR_OSCILLATOR_FAULT_INTERRUPT);
+
176 
+
177  // Enable global interrupt
+
178  __bis_SR_register(GIE);
+
179 
+
180  //Verify if the Clock settings are as expected
+
181  clockValue = CS_getSMCLK();
+
182  clockValue = CS_getMCLK();
+
183  clockValue = CS_getACLK();
+
184 
+
185  while (1)
+
186  {
+
187  //Toggle LED2
+
188  GPIO_toggleOutputOnPin(
+
189  GPIO_PORT_LED2,
+
190  GPIO_PIN_LED2
+
191  );
+
192 
+
193  //Delay
+
194  __delay_cycles(1000000);
+
195  }
+
196 }
+
197 
+
198 
+
199 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
200 #pragma vector=UNMI_VECTOR
+
201 __interrupt
+
202 #elif defined(__GNUC__)
+
203 __attribute__((interrupt(UNMI_VECTOR)))
+
204 #endif
+
205 void NMI_ISR(void)
+
206 {
+
207  do {
+
208  // If it still can't clear the oscillator fault flags after the timeout,
+
209  // trap and wait here.
+
210  status = CS_clearAllOscFlagsWithTimeout(1000);
+
211  } while(status != 0);
+
212 }
+ +
MPU_initThreeSegmentsParam param
+
#define CS_MCLK_FLLREF_RATIO
+
void NMI_ISR(void)
+
uint16_t status
+
void main(void)
+
#define CS_MCLK_DESIRED_FREQUENCY_IN_KHZ
+
uint32_t clockValue
+ +
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/cs__ex1__output_clock_signals_8c.html b/Generated Documentation/html/cs__ex1__output_clock_signals_8c.html new file mode 100644 index 0000000..15c861c --- /dev/null +++ b/Generated Documentation/html/cs__ex1__output_clock_signals_8c.html @@ -0,0 +1,137 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430i2xx/cs/cs_ex1_outputClockSignals.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cs_ex1_outputClockSignals.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

int main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
int main (void )
+
+ +

Definition at line 59 of file cs_ex1_outputClockSignals.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/cs__ex1__output_clock_signals_8c.js b/Generated Documentation/html/cs__ex1__output_clock_signals_8c.js new file mode 100644 index 0000000..71adf2c --- /dev/null +++ b/Generated Documentation/html/cs__ex1__output_clock_signals_8c.js @@ -0,0 +1,4 @@ +var cs__ex1__output_clock_signals_8c = +[ + [ "main", "cs__ex1__output_clock_signals_8c.html#a840291bc02cba5474a4cb46a9b9566fe", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/cs__ex1__output_clock_signals_8c_source.html b/Generated Documentation/html/cs__ex1__output_clock_signals_8c_source.html new file mode 100644 index 0000000..ce301f5 --- /dev/null +++ b/Generated Documentation/html/cs__ex1__output_clock_signals_8c_source.html @@ -0,0 +1,187 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430i2xx/cs/cs_ex1_outputClockSignals.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
cs_ex1_outputClockSignals.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 /*******************************************************************************
+
33  * MSP430i2xx Clock System - Output Clock Signals
+
34  *
+
35  * Description: In this example, the DCO is setup to use the internal resistor.
+
36  * Then the GPIO pins are configured in peripheral function mode so that the
+
37  * clock signals are output on the pins. Finally, clock dividers are set for
+
38  * the MCLK and SMCLK to show a divided clock. The divided clocks can be seen
+
39  * on the pins using an measurement device. This example demonstrates how to
+
40  * setup the DCO and setup the clock speed for the device.
+
41  *
+
42  *
+
43  * MSP430i2041
+
44  * ------------------
+
45  * /|\| |
+
46  * | | P1.0|-->MCLK = DCO/2 = 8.192MHz
+
47  * --|RST |
+
48  * | P1.1|-->SMCLK = DCO/16 = 1.024MHz
+
49  * | |
+
50  * | P1.2|-->ACLK = DCO/512 = 32kHz
+
51  * | |
+
52  * | |
+
53  *
+
54  * Author: Zack Lalanne
+
55  ******************************************************************************/
+
56 
+
57 #include "driverlib.h"
+
58 
+
59 int main(void) {
+
60 
+
61  WDT_hold(WDT_BASE);
+
62 
+
63  // Setting the DCO to use the internal resistor. DCO will be at 16.384MHz
+
64  CS_setupDCO(CS_INTERNAL_RESISTOR);
+
65 
+
66  // Set P1.0, P1.1, P1.2 to output clock signals
+
67  GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P1,
+
68  GPIO_PIN0 | GPIO_PIN1 | GPIO_PIN2,
+
69  GPIO_SECONDARY_MODULE_FUNCTION);
+
70 
+
71  // Setting dividers for MCLK and SMCLK
+
72  CS_initClockSignal(CS_MCLK, CS_CLOCK_DIVIDER_2);
+
73  CS_initClockSignal(CS_SMCLK, CS_CLOCK_DIVIDER_16);
+
74 
+
75  // Stay in active mode so all clocks keep running
+
76  while(1) {
+
77 
+
78  }
+
79 
+
80 }
+
int main(void)
+ +
+
+ + + + diff --git a/Generated Documentation/html/cs__ex2___d_c_o16_m_hz_8c.html b/Generated Documentation/html/cs__ex2___d_c_o16_m_hz_8c.html new file mode 100644 index 0000000..6f3f514 --- /dev/null +++ b/Generated Documentation/html/cs__ex2___d_c_o16_m_hz_8c.html @@ -0,0 +1,162 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/cs/cs_ex2_DCO16MHz.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cs_ex2_DCO16MHz.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + +

+Variables

uint32_t clockValue
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 58 of file cs_ex2_DCO16MHz.c.

+ +

References GPIO_setOutputLowOnPin().

+ +
+
+

Variable Documentation

+ +

◆ clockValue

+ +
+
+ + + + +
uint32_t clockValue
+
+ +

Definition at line 56 of file cs_ex2_DCO16MHz.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/cs__ex2___d_c_o16_m_hz_8c.js b/Generated Documentation/html/cs__ex2___d_c_o16_m_hz_8c.js new file mode 100644 index 0000000..51f3c87 --- /dev/null +++ b/Generated Documentation/html/cs__ex2___d_c_o16_m_hz_8c.js @@ -0,0 +1,5 @@ +var cs__ex2___d_c_o16_m_hz_8c = +[ + [ "main", "cs__ex2___d_c_o16_m_hz_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "clockValue", "cs__ex2___d_c_o16_m_hz_8c.html#addf85f1095ff1d9d649037237844da86", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/cs__ex2___d_c_o16_m_hz_8c_source.html b/Generated Documentation/html/cs__ex2___d_c_o16_m_hz_8c_source.html new file mode 100644 index 0000000..777f03a --- /dev/null +++ b/Generated Documentation/html/cs__ex2___d_c_o16_m_hz_8c_source.html @@ -0,0 +1,213 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR5xx_6xx/cs/cs_ex2_DCO16MHz.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
cs_ex2_DCO16MHz.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FR59xx Demo - Configure MCLK for 16MHz operation
+
34 //
+
35 // Description: Configure SMCLK = MCLK = 16MHz
+
36 // IMPORTANT NOTE: While the FRxxx is capable of operation w/ MCLK = 16MHz
+
37 // the throughput of the device is dependent on accesses to FRAM.
+
38 // The maximum speed for accessing FRAM is limited to 8MHz*.
+
39 // Wait states are inserted when the FRAM is accessed at
+
40 // speeds higher than 8MHz to prevent timing violations.
+
41 // Refer to the FRCTL chapter of the User's Guide.
+
42 // * Refer device D/s for typical numbers
+
43 //
+
44 // MSP430FR5969
+
45 // ---------------
+
46 // /|\| |
+
47 // | | |
+
48 // --|RST |
+
49 // | |
+
50 // | |
+
51 // | P3.4 |---> SMCLK = MCLK = 16MHz
+
52 //
+
53 //******************************************************************************
+
54 #include "driverlib.h"
+
55 
+
56 uint32_t clockValue;
+
57 
+
58 void main(void)
+
59 {
+
60  //Stop WDT
+
61  WDT_A_hold(WDT_A_BASE);
+
62  //Set DCO frequency to 16MHz
+
63  CS_setDCOFreq(CS_DCORSEL_1, CS_DCOFSEL_4);
+
64 
+
65  CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
66  CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
67 
+
68  //Set wait state to 1
+
69  FRAMCtl_configureWaitStateControl(FRAMCTL_ACCESS_TIME_CYCLES_1);
+
70 
+
71  //Set P2.0 as Output Low (for setup as ACLK).
+
72  /*
+
73 
+
74  * Select Port 2
+
75  * Set Pin 0 to output Low.
+
76  */
+ +
78  GPIO_PORT_P3,
+
79  GPIO_PIN4
+
80  );
+
81 
+
82  //Set P2.0 as Ternary Module Function Output.
+
83  /*
+
84 
+
85  * Select Port 2
+
86  * Set Pin 0 to output Ternary Module Function, (ACLK).
+
87  */
+
88  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
89  GPIO_PORT_P3,
+
90  GPIO_PIN4,
+
91  GPIO_TERNARY_MODULE_FUNCTION
+
92  );
+
93 
+
94  /*
+
95  * Disable the GPIO power-on default high-impedance mode to activate
+
96  * previously configured port settings
+
97  */
+
98  PMM_unlockLPM5();
+
99 
+
100  while(1);
+
101 
+
102 }
+
103 
+
104 
+
void main(void)
+
uint32_t clockValue
+ +
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/cs__ex2___d_c_o24_m_hz_8c.html b/Generated Documentation/html/cs__ex2___d_c_o24_m_hz_8c.html new file mode 100644 index 0000000..74ecfe7 --- /dev/null +++ b/Generated Documentation/html/cs__ex2___d_c_o24_m_hz_8c.html @@ -0,0 +1,177 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/cs/cs_ex2_DCO24MHz.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cs_ex2_DCO24MHz.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + +

+Variables

uint32_t clockValue
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 62 of file cs_ex2_DCO24MHz.c.

+ +

References clockValue, and GPIO_setOutputLowOnPin().

+ +
+
+

Variable Documentation

+ +

◆ clockValue

+ +
+
+ + + + +
uint32_t clockValue
+
+

MSP430FR57xx Demo - Configure MCLK for 24MHz operation

+

Description: Configure ACLK = SMCLK = MCLK = 24MHz IMPORTANT NOTE: While the FR5739 is capable of operation using a 24MHz MCLK; the throughput of the device is dependednt on accesses to FRAM. The maximum speed for accessing FRAM is limited to 8MHz*. Wait states are inserted automatically when the FRAM is accessed at speeds higher than 8MHz to prevent timing violations. Refer to the FRAM Clock System chapter of the User's Guide.

    +
  • Refer device D/s for typical numbers
      MSP430FR57x
    +---------------
    +
    + + + + +
    / |
    RST
    +| | | | | P2.0 |—> ACLK = MCLk = 24MHz
  • +
+

Texas Instruments Inc. February 2012 Built with IAR Embedded Workbench Version: 5.40 & Code Composer Studio V5.1

+ +

Definition at line 60 of file cs_ex2_DCO24MHz.c.

+ +

Referenced by main().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/cs__ex2___d_c_o24_m_hz_8c.js b/Generated Documentation/html/cs__ex2___d_c_o24_m_hz_8c.js new file mode 100644 index 0000000..4d8c125 --- /dev/null +++ b/Generated Documentation/html/cs__ex2___d_c_o24_m_hz_8c.js @@ -0,0 +1,5 @@ +var cs__ex2___d_c_o24_m_hz_8c = +[ + [ "main", "cs__ex2___d_c_o24_m_hz_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "clockValue", "cs__ex2___d_c_o24_m_hz_8c.html#addf85f1095ff1d9d649037237844da86", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/cs__ex2___d_c_o24_m_hz_8c_source.html b/Generated Documentation/html/cs__ex2___d_c_o24_m_hz_8c_source.html new file mode 100644 index 0000000..505499e --- /dev/null +++ b/Generated Documentation/html/cs__ex2___d_c_o24_m_hz_8c_source.html @@ -0,0 +1,191 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/cs/cs_ex2_DCO24MHz.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
cs_ex2_DCO24MHz.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
58 //******************************************************************************
+
59 
+
60  uint32_t clockValue;
+
61 
+
62 void main(void)
+
63 {
+
64  //Stop WDT
+
65  WDT_A_hold(WDT_A_BASE);
+
66 
+
67  CS_setDCOFreq(CS_DCORSEL_1,CS_DCOFSEL_3);
+
68 
+
69  CS_initClockSignal(CS_ACLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
70  CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
+
71 
+
72 
+
73  //Set P2.0 as Output Low (for setup as ACLK).
+
74  /*
+
75 
+
76  * Select Port 2
+
77  * Set Pin 0 to output Low.
+
78  */
+ +
80  GPIO_PORT_P2,
+
81  GPIO_PIN0
+
82  );
+
83 
+
84  //Set P2.0 as Ternary Module Function Output.
+
85  /*
+
86 
+
87  * Select Port 2
+
88  * Set Pin 0 to output Ternary Module Function, (ACLK).
+
89  */
+
90  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
91  GPIO_PORT_P2,
+
92  GPIO_PIN0,
+
93  GPIO_TERNARY_MODULE_FUNCTION
+
94  );
+
95  clockValue = CS_getSMCLK();
+
96  clockValue = CS_getMCLK();
+
97  clockValue = CS_getACLK();
+
98 
+
99 
+
100 
+
101  while(1);
+
102 
+
103 }
+
104 
+
105 
+
void main(void)
+
uint32_t clockValue
+ +
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/cs__ex2___v_l_o_sources_m_c_l_k_8c.html b/Generated Documentation/html/cs__ex2___v_l_o_sources_m_c_l_k_8c.html new file mode 100644 index 0000000..2635a84 --- /dev/null +++ b/Generated Documentation/html/cs__ex2___v_l_o_sources_m_c_l_k_8c.html @@ -0,0 +1,224 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/cs/cs_ex2_VLOSourcesMCLK.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cs_ex2_VLOSourcesMCLK.c File Reference
+
+
+
#include "driverlib.h"
+#include "Board.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void NMI_ISR (void)
 
+ + + + + +

+Variables

uint32_t clockValue
 
uint16_t status
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 72 of file cs_ex2_VLOSourcesMCLK.c.

+ +

References __no_operation(), and clockValue.

+ +
+
+ +

◆ NMI_ISR()

+ +
+
+ + + + + + + + +
void NMI_ISR (void )
+
+ +

Definition at line 128 of file cs_ex2_VLOSourcesMCLK.c.

+ +

References status.

+ +
+
+

Variable Documentation

+ +

◆ clockValue

+ +
+
+ + + + +
uint32_t clockValue
+
+

This program demonstrates using VLO to source MCLK MCLK = VLO = 10kHz (typical)

     MSP430FR2xx_4xx Board
+       -----------------
+   /|\|                 |
+    | |                 |
+    --|RST              |
+      |                 |
+      |                 |-->MCLK
+      |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • CS module
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 63 of file cs_ex2_VLOSourcesMCLK.c.

+ +

Referenced by main().

+ +
+
+ +

◆ status

+ +
+
+ + + + +
uint16_t status
+
+ +

Definition at line 70 of file cs_ex2_VLOSourcesMCLK.c.

+ +

Referenced by NMI_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/cs__ex2___v_l_o_sources_m_c_l_k_8c.js b/Generated Documentation/html/cs__ex2___v_l_o_sources_m_c_l_k_8c.js new file mode 100644 index 0000000..a76cc84 --- /dev/null +++ b/Generated Documentation/html/cs__ex2___v_l_o_sources_m_c_l_k_8c.js @@ -0,0 +1,7 @@ +var cs__ex2___v_l_o_sources_m_c_l_k_8c = +[ + [ "main", "cs__ex2___v_l_o_sources_m_c_l_k_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "NMI_ISR", "cs__ex2___v_l_o_sources_m_c_l_k_8c.html#a218a5747a3785b143c62b6f09d13e717", null ], + [ "clockValue", "cs__ex2___v_l_o_sources_m_c_l_k_8c.html#addf85f1095ff1d9d649037237844da86", null ], + [ "status", "cs__ex2___v_l_o_sources_m_c_l_k_8c.html#a5393c99e246925076b1dfd69a64177ef", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/cs__ex2___v_l_o_sources_m_c_l_k_8c_source.html b/Generated Documentation/html/cs__ex2___v_l_o_sources_m_c_l_k_8c_source.html new file mode 100644 index 0000000..a9771c9 --- /dev/null +++ b/Generated Documentation/html/cs__ex2___v_l_o_sources_m_c_l_k_8c_source.html @@ -0,0 +1,226 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/cs/cs_ex2_VLOSourcesMCLK.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
cs_ex2_VLOSourcesMCLK.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
54 //*****************************************************************************
+
55 #include "driverlib.h"
+
56 #include "Board.h"
+
57 
+
58 //*****************************************************************************
+
59 //
+
60 //Variable to store current clock values
+
61 //
+
62 //*****************************************************************************
+
63 uint32_t clockValue;
+
64 
+
65 //*****************************************************************************
+
66 //
+
67 //Variable to store status of Oscillator fault flags
+
68 //
+
69 //*****************************************************************************
+
70 uint16_t status;
+
71 
+
72 void main (void)
+
73 {
+
74  //Stop watchdog timer
+
75  WDT_A_hold(WDT_A_BASE);
+
76 
+
77  //MCLK set out to pin
+
78  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
79  GPIO_PORT_MCLK,
+
80  GPIO_PIN_MCLK,
+
81  GPIO_FUNCTION_MCLK
+
82  );
+
83 
+
84  /*
+
85  * Disable the GPIO power-on default high-impedance mode to activate
+
86  * previously configured port settings
+
87  */
+
88  PMM_unlockLPM5();
+
89 
+
90  //Set DCO FLL reference = REFO
+
91  CS_initClockSignal(
+
92  CS_FLLREF,
+
93  CS_REFOCLK_SELECT,
+
94  CS_CLOCK_DIVIDER_1
+
95  );
+
96 
+
97  //VLO Clock Sources MCLK
+
98  CS_initClockSignal(
+
99  CS_MCLK,
+
100  CS_VLOCLK_SELECT,
+
101  CS_CLOCK_DIVIDER_1
+
102  );
+
103 
+
104  //Clear all OSC fault flag
+
105  CS_clearAllOscFlagsWithTimeout(1000);
+
106 
+
107  // Enable global oscillator fault flag
+
108  SFR_enableInterrupt(SFR_OSCILLATOR_FAULT_INTERRUPT);
+
109 
+
110  // Enable global interrupt
+
111  __bis_SR_register(GIE);
+
112 
+
113  clockValue = CS_getMCLK();
+
114 
+
115  //Enter LPM3
+
116  __bis_SR_register(LPM3_bits);
+
117 
+
118  //For debugger
+
119  __no_operation();
+
120 }
+
121 
+
122 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
123 #pragma vector=UNMI_VECTOR
+
124 __interrupt
+
125 #elif defined(__GNUC__)
+
126 __attribute__((interrupt(UNMI_VECTOR)))
+
127 #endif
+
128 void NMI_ISR(void)
+
129 {
+
130  do {
+
131  // If it still can't clear the oscillator fault flags after the timeout,
+
132  // trap and wait here.
+
133  status = CS_clearAllOscFlagsWithTimeout(1000);
+
134  } while(status != 0);
+
135 }
+ +
void NMI_ISR(void)
+
uint16_t status
+
void main(void)
+
uint32_t clockValue
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/cs__ex2__calculate_clock_signals_8c.html b/Generated Documentation/html/cs__ex2__calculate_clock_signals_8c.html new file mode 100644 index 0000000..a4202d9 --- /dev/null +++ b/Generated Documentation/html/cs__ex2__calculate_clock_signals_8c.html @@ -0,0 +1,139 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430i2xx/cs/cs_ex2_calculateClockSignals.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cs_ex2_calculateClockSignals.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

int main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
int main (void )
+
+ +

Definition at line 59 of file cs_ex2_calculateClockSignals.c.

+ +

References __no_operation().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/cs__ex2__calculate_clock_signals_8c.js b/Generated Documentation/html/cs__ex2__calculate_clock_signals_8c.js new file mode 100644 index 0000000..d9a82a6 --- /dev/null +++ b/Generated Documentation/html/cs__ex2__calculate_clock_signals_8c.js @@ -0,0 +1,4 @@ +var cs__ex2__calculate_clock_signals_8c = +[ + [ "main", "cs__ex2__calculate_clock_signals_8c.html#a840291bc02cba5474a4cb46a9b9566fe", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/cs__ex2__calculate_clock_signals_8c_source.html b/Generated Documentation/html/cs__ex2__calculate_clock_signals_8c_source.html new file mode 100644 index 0000000..ba25be1 --- /dev/null +++ b/Generated Documentation/html/cs__ex2__calculate_clock_signals_8c_source.html @@ -0,0 +1,190 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430i2xx/cs/cs_ex2_calculateClockSignals.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
cs_ex2_calculateClockSignals.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 /*******************************************************************************
+
33  * MSP430i2xx Clock System - Calculate Clock Signals
+
34  *
+
35  * Description: In this example, the clock signals are setup as dividers of DCO.
+
36  * MCLK is setup as DCO / 4 = 4.096 MHz and SMCLK is setup as
+
37  * DCO / 8 = 2.048 MHz. ACLK is 32kHz when using the internal resistor for DCO.
+
38  * After setting up the clock signals, APIs are called to ensure that the
+
39  * correct speed was set correctly. The speed is calculated using the register
+
40  * settings.
+
41  *
+
42  *
+
43  * MSP430i2041
+
44  * ------------------
+
45  * /|\| |
+
46  * | | |
+
47  * --|RST |
+
48  * | |
+
49  * | |
+
50  * | |
+
51  * | |
+
52  * | |
+
53  *
+
54  * Author: Zack Lalanne
+
55  ******************************************************************************/
+
56 
+
57 #include "driverlib.h"
+
58 
+
59 int main(void) {
+
60 
+
61  volatile uint32_t aclk_speed;
+
62  volatile uint32_t mclk_speed;
+
63  volatile uint32_t smclk_speed;
+
64 
+
65  WDT_hold(WDT_BASE);
+
66 
+
67  // Setting the DCO to use the internal resistor. DCO will be at 16.384MHz
+
68  CS_setupDCO(CS_INTERNAL_RESISTOR);
+
69 
+
70  // Setting dividers for MCLK and SMCLK
+
71  CS_initClockSignal(CS_MCLK, CS_CLOCK_DIVIDER_4);
+
72  CS_initClockSignal(CS_SMCLK, CS_CLOCK_DIVIDER_8);
+
73 
+
74  aclk_speed = CS_getACLK();
+
75  mclk_speed = CS_getMCLK();
+
76  smclk_speed = CS_getSMCLK();
+
77 
+
78  while(1) {
+
79  // Set breakpoint here to view variables
+ +
81  }
+
82 }
+
int main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/cs__ex3___x_t1_fault_8c.html b/Generated Documentation/html/cs__ex3___x_t1_fault_8c.html new file mode 100644 index 0000000..38226e0 --- /dev/null +++ b/Generated Documentation/html/cs__ex3___x_t1_fault_8c.html @@ -0,0 +1,219 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/cs/cs_ex3_XT1Fault.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cs_ex3_XT1Fault.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void UNMI_ISR (void)
 
+ + + + + +

+Variables

uint16_t status
 
uint32_t clockValue
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 69 of file cs_ex3_XT1Fault.c.

+ +

References clockValue, and GPIO_setOutputLowOnPin().

+ +
+
+ +

◆ UNMI_ISR()

+ +
+
+ + + + + + + + +
void UNMI_ISR (void )
+
+ +

Definition at line 168 of file cs_ex3_XT1Fault.c.

+ +

References GPIO_setOutputHighOnPin(), GPIO_setOutputLowOnPin(), and status.

+ +
+
+

Variable Documentation

+ +

◆ clockValue

+ +
+
+ + + + +
uint32_t clockValue
+
+ +

Definition at line 67 of file cs_ex3_XT1Fault.c.

+ +

Referenced by main().

+ +
+
+ +

◆ status

+ +
+
+ + + + +
uint16_t status
+
+

MSP430FR57xx Demo - Output 32768Hz crystal on XT1 and observe failsafe

+

Description: Configure ACLK = XT1 in LF mode and enter LPM3. To observe failsafe behavior short the crystal briefly on the target board. This will cause an NMI to occur. P1.0 and P3.5 is toggled inside the NMI ISR. Once the fault flag is cleared XT1 operation continues from 32768Hz crystal Otherwise ACLK defaults to VLO (~8KHz). ACLK = LFXT1 = 32kHz, MCLK = SMCLK = 4MHz

    MSP430FR57x
+  ---------------
+
+ + + + +
/ |
RST
+

| | | P2.0 |—>ACLK | P1.0 |—>LED | P3.5 |—>LED

+

Texas Instruments Inc. February 2012 Built with IAR Embedded Workbench Version: 5.40 & Code Composer Studio V5.1

+ +

Definition at line 66 of file cs_ex3_XT1Fault.c.

+ +

Referenced by UNMI_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/cs__ex3___x_t1_fault_8c.js b/Generated Documentation/html/cs__ex3___x_t1_fault_8c.js new file mode 100644 index 0000000..2bf56a5 --- /dev/null +++ b/Generated Documentation/html/cs__ex3___x_t1_fault_8c.js @@ -0,0 +1,7 @@ +var cs__ex3___x_t1_fault_8c = +[ + [ "main", "cs__ex3___x_t1_fault_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "UNMI_ISR", "cs__ex3___x_t1_fault_8c.html#a130d1df06f81bcc7d1a453981320fefa", null ], + [ "clockValue", "cs__ex3___x_t1_fault_8c.html#addf85f1095ff1d9d649037237844da86", null ], + [ "status", "cs__ex3___x_t1_fault_8c.html#a5393c99e246925076b1dfd69a64177ef", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/cs__ex3___x_t1_fault_8c_source.html b/Generated Documentation/html/cs__ex3___x_t1_fault_8c_source.html new file mode 100644 index 0000000..cd353f9 --- /dev/null +++ b/Generated Documentation/html/cs__ex3___x_t1_fault_8c_source.html @@ -0,0 +1,313 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR57xx/cs/cs_ex3_XT1Fault.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
cs_ex3_XT1Fault.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //******************************************************************************
+
58 //******************************************************************************
+
59 
+
60 //*****************************************************************************
+
61 //
+
62 //Variable to store status of Oscillator fault flags and obtain clock frequency
+
63 //
+
64 //
+
65 //*****************************************************************************
+
66 uint16_t status;
+
67 uint32_t clockValue;
+
68 
+
69 void main(void)
+
70 {
+
71  //Stop WDT
+
72  WDT_A_hold(WDT_A_BASE);
+
73 
+
74  // LED setup
+
75  //Set P1.0 as an output pin.
+
76  /*
+
77 
+
78  * Select Port 1
+
79  * Set Pin 0 as output
+
80  */
+
81  GPIO_setAsOutputPin(
+
82  GPIO_PORT_P1,
+
83  GPIO_PIN0
+
84  );
+
85 
+
86  //Set P3.5 as Output Low.
+
87  /*
+
88 
+
89  * Select Port 3
+
90  * Set Pin 5 to output Low.
+
91  */
+
92  GPIO_setAsOutputPin(
+
93  GPIO_PORT_P3,
+
94  GPIO_PIN5
+
95  );
+
96 
+
97  // XT1 Setup
+
98  //Set PJ.4 and PJ.5 as Primary Module Function Input.
+
99  /*
+
100 
+
101  * Select Port J
+
102  * Set Pin 4, 5 to input Primary Module Function, XT1.
+
103  */
+
104  GPIO_setAsPeripheralModuleFunctionInputPin(
+
105  GPIO_PORT_PJ,
+
106  GPIO_PIN4 + GPIO_PIN5,
+
107  GPIO_PRIMARY_MODULE_FUNCTION
+
108  );
+
109 
+
110  //Set DCO Frequency
+
111  CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_3);
+
112  //Initialize ACLK=XT1 and no CLK DIVIDER set to 1
+
113  CS_initClockSignal(CS_ACLK,CS_XT1CLK_SELECT,CS_CLOCK_DIVIDER_1);
+
114  //Initialize SMCLK=DCOCLK and no CLK DIVIDER set to 2
+
115  CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_2);
+
116  //Initialize MCLK=DCOCLK and no CLK DIVIDER set to 2
+
117  CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_2);
+
118  //Set XT1 frequency
+
119  CS_setExternalClockSource(32768,0);
+
120  //Start XT1 external crystal
+
121  CS_turnOnXT1(CS_XT1_DRIVE_0);
+
122 
+
123 
+
124  SFR_clearInterrupt(SFR_OSCILLATOR_FAULT_INTERRUPT);
+
125  // Now that XT1OSC is running, enable fault interrupt
+
126  SFR_enableInterrupt(SFR_OSCILLATOR_FAULT_INTERRUPT);
+
127 
+
128  //Set P2.0 as Output Low.
+
129  /*
+
130 
+
131  * Select Port 2
+
132  * Set Pin 0 to output Low.
+
133  */
+ +
135  GPIO_PORT_P2,
+
136  GPIO_PIN0
+
137  );
+
138 
+
139  //Set P2.0 as Ternary Module Function Output.
+
140  /*
+
141 
+
142  * Select Port 2
+
143  * Set Pin 0 to output Ternary Module Function, ACLK.
+
144  */
+
145  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
146  GPIO_PORT_P2,
+
147  GPIO_PIN0,
+
148  GPIO_TERNARY_MODULE_FUNCTION
+
149  );
+
150 
+
151 
+
152  CS_turnOffXT2();
+
153 
+
154  clockValue = CS_getSMCLK();
+
155  clockValue = CS_getMCLK();
+
156  clockValue = CS_getACLK();
+
157 
+
158  __bis_SR_register(LPM3_bits+GIE);
+
159 
+
160 }
+
161 
+
162 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
163 #pragma vector=UNMI_VECTOR
+
164 __interrupt
+
165 #elif defined(__GNUC__)
+
166 __attribute__((interrupt(UNMI_VECTOR)))
+
167 #endif
+
168 void UNMI_ISR(void)
+
169 {
+
170  do
+
171  {
+
172  // set a breakpoint on the line below to observe XT1 operating from VLO
+
173  // when the breakpoint is hit during a crystal fault
+
174 
+
175  //Set P1.0 and P3.5 LED on
+
176  /*
+
177 
+
178  * Select Port 1
+
179  * Set Pin 0 to output high.
+
180  */
+ +
182  GPIO_PORT_P1,
+
183  GPIO_PIN0
+
184  );
+
185 
+
186  /*
+
187 
+
188  * Select Port 3
+
189  * Set Pin 5 to output high.
+
190  */
+ +
192  GPIO_PORT_P3,
+
193  GPIO_PIN5
+
194  );
+
195 
+
196  status=CS_clearAllOscFlagsWithTimeout(1000);
+
197 
+
198  } while (status);
+
199 
+
200  //Clear P1.0 LED off
+
201  /*
+
202 
+
203  * Select Port 1
+
204  * Set Pin 0 to output Low.
+
205  */
+ +
207  GPIO_PORT_P1,
+
208  GPIO_PIN0
+
209  );
+
210 
+
211  //Clear P3.5 LED off
+
212  /*
+
213 
+
214  * Select Port 3
+
215  * Set Pin 5 to output Low.
+
216  */
+ +
218  GPIO_PORT_P3,
+
219  GPIO_PIN5
+
220  );
+
221 
+
222 }
+
223 
+
224 
+
void UNMI_ISR(void)
+
uint16_t status
+
void main(void)
+
uint32_t clockValue
+ +
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
+
+
+ + + + diff --git a/Generated Documentation/html/cs__ex3___x_t1_sources_a_c_l_k_8c.html b/Generated Documentation/html/cs__ex3___x_t1_sources_a_c_l_k_8c.html new file mode 100644 index 0000000..4a76ea1 --- /dev/null +++ b/Generated Documentation/html/cs__ex3___x_t1_sources_a_c_l_k_8c.html @@ -0,0 +1,205 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/cs/cs_ex3_XT1SourcesACLK.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cs_ex3_XT1SourcesACLK.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void NMI_ISR (void)
 
+ + + +

+Variables

uint16_t status
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 70 of file cs_ex3_XT1SourcesACLK.c.

+ +

References __no_operation().

+ +
+
+ +

◆ NMI_ISR()

+ +
+
+ + + + + + + + +
void NMI_ISR (void )
+
+ +

Definition at line 134 of file cs_ex3_XT1SourcesACLK.c.

+ +

References status.

+ +
+
+

Variable Documentation

+ +

◆ status

+ +
+
+ + + + +
uint16_t status
+
+

XT1 sources ACLK. Toggles P1.0

+

This program demonstrates using XT1 to source ACLK ACLK = LFXT1 = 32,768Hz An external watch crystal between XIN & XOUT is required for ACLK

         MSP430FR2311
+       -----------------
+  /|\ |              XIN|-
+   |  |                 | 32kHz
+   ---|RST          XOUT|-
+      |                 |
+      |             P1.1|--> ACLK = ~32kHz
+      |                 |
+      |             P1.0|-->LED
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • CS module
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 68 of file cs_ex3_XT1SourcesACLK.c.

+ +

Referenced by NMI_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/cs__ex3___x_t1_sources_a_c_l_k_8c.js b/Generated Documentation/html/cs__ex3___x_t1_sources_a_c_l_k_8c.js new file mode 100644 index 0000000..21f5f11 --- /dev/null +++ b/Generated Documentation/html/cs__ex3___x_t1_sources_a_c_l_k_8c.js @@ -0,0 +1,6 @@ +var cs__ex3___x_t1_sources_a_c_l_k_8c = +[ + [ "main", "cs__ex3___x_t1_sources_a_c_l_k_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "NMI_ISR", "cs__ex3___x_t1_sources_a_c_l_k_8c.html#a218a5747a3785b143c62b6f09d13e717", null ], + [ "status", "cs__ex3___x_t1_sources_a_c_l_k_8c.html#a5393c99e246925076b1dfd69a64177ef", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/cs__ex3___x_t1_sources_a_c_l_k_8c_source.html b/Generated Documentation/html/cs__ex3___x_t1_sources_a_c_l_k_8c_source.html new file mode 100644 index 0000000..324c0a5 --- /dev/null +++ b/Generated Documentation/html/cs__ex3___x_t1_sources_a_c_l_k_8c_source.html @@ -0,0 +1,224 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/cs/cs_ex3_XT1SourcesACLK.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
cs_ex3_XT1SourcesACLK.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 #include "driverlib.h"
+
62 
+
63 //*****************************************************************************
+
64 //
+
65 //Variable to store status of Oscillator fault flags
+
66 //
+
67 //*****************************************************************************
+
68 uint16_t status;
+
69 
+
70 void main (void)
+
71 {
+
72  //Stop watchdog timer
+
73  WDT_A_hold(WDT_A_BASE);
+
74 
+
75  //Set P1.0 to output direction
+
76  GPIO_setAsOutputPin(
+
77  GPIO_PORT_P1,
+
78  GPIO_PIN0
+
79  );
+
80 
+
81  // Configure Pins for XIN and XOUT
+
82  //Set P2.6 and P2.7 as Module Function Input.
+
83  GPIO_setAsPeripheralModuleFunctionInputPin(
+
84  GPIO_PORT_P2,
+
85  GPIO_PIN6 + GPIO_PIN7,
+
86  GPIO_SECONDARY_MODULE_FUNCTION
+
87  );
+
88 
+
89  //Set P1.1 to output ACLK
+
90  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
91  GPIO_PORT_P1,
+
92  GPIO_PIN1,
+
93  GPIO_SECONDARY_MODULE_FUNCTION
+
94  );
+
95 
+
96  /*
+
97  * Disable the GPIO power-on default high-impedance mode to activate
+
98  * previously configured port settings
+
99  */
+
100  PMM_unlockLPM5();
+
101 
+
102  //Initializes the XT1 crystal oscillator with no timeout
+
103  //In case of failure, code hangs here.
+
104  //For time-out instead of code hang use CS_turnOnXT1LFWithTimeout()
+
105  CS_turnOnXT1LF(
+
106  CS_XT1_DRIVE_0
+
107  );
+
108 
+
109  CS_initClockSignal(
+
110  CS_ACLK,
+
111  CS_XT1CLK_SELECT,
+
112  CS_CLOCK_DIVIDER_1
+
113  );
+
114 
+
115  //clear all OSC fault flag
+
116  CS_clearAllOscFlagsWithTimeout(1000);
+
117 
+
118  //Enable oscillator fault interrupt
+
119  SFR_enableInterrupt(SFR_OSCILLATOR_FAULT_INTERRUPT);
+
120 
+
121  //Enter LPM3 w/ interrupts
+
122  __bis_SR_register(LPM3_bits + GIE);
+
123 
+
124  //For debugger
+
125  __no_operation();
+
126 }
+
127 
+
128 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
129 #pragma vector=UNMI_VECTOR
+
130 __interrupt
+
131 #elif defined(__GNUC__)
+
132 __attribute__((interrupt(UNMI_VECTOR)))
+
133 #endif
+
134 void NMI_ISR(void)
+
135 {
+
136  do {
+
137  // If it still can't clear the oscillator fault flags after the timeout,
+
138  // trap and wait here.
+
139  status = CS_clearAllOscFlagsWithTimeout(1000);
+
140  } while(status != 0);
+
141 }
+
void NMI_ISR(void)
+
uint16_t status
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/cs__ex4___x_t_sources_d_c_o_internal_8c.html b/Generated Documentation/html/cs__ex4___x_t_sources_d_c_o_internal_8c.html new file mode 100644 index 0000000..548cad2 --- /dev/null +++ b/Generated Documentation/html/cs__ex4___x_t_sources_d_c_o_internal_8c.html @@ -0,0 +1,307 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/cs/cs_ex4_XTSourcesDCOInternal.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cs_ex4_XTSourcesDCOInternal.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Macros

#define CS_XT1_TIMEOUT   50000
 
#define CS_XT2_TIMEOUT   0
 
#define CS_XT1_CRYSTAL_FREQUENCY   32768
 
+ + + + + +

+Functions

void main (void)
 
void NMI_ISR (void)
 
+ + + + + + + +

+Variables

uint8_t returnValue = 0
 
uint32_t clockValue
 
uint16_t status
 
+

Macro Definition Documentation

+ +

◆ CS_XT1_CRYSTAL_FREQUENCY

+ +
+
+ + + + +
#define CS_XT1_CRYSTAL_FREQUENCY   32768
+
+ +

Definition at line 88 of file cs_ex4_XTSourcesDCOInternal.c.

+ +
+
+ +

◆ CS_XT1_TIMEOUT

+ +
+
+ + + + +
#define CS_XT1_TIMEOUT   50000
+
+

This program demonstrates using an external 32kHz crystal to supply ACLK, and using a high speed crystal or resonator to supply SMCLK. SMLCK for the CPU is supplied by the internal DCO. The 32kHz crystal connects between pins Xin and Xout. The DCO clock is generated internally and calibrated from the 32kHz crystal. ACLK is brought out on pin P1.1, SMCLK is brought out on P1.0.

+

ACLK = XT1 = 32768Hz, SMCLK = default DCO = 32 x ACLK = 1048576Hz

+

An external watch crystal between XIN & XOUT is required for ACLK

         MSP430FR2311
+      -----------------
+ /|\ |         XIN P2.6|-
+  |  |                 | 32kHz
+  ---|RST     XOUT P2.7|-
+     |                 |
+     |                 |
+     |             P1.0|-->SMCLK = 1MHz
+     |             P1.1|-->ACLK = 32kHz Crystal Out
+     |                 |
+     |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • CS module
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 74 of file cs_ex4_XTSourcesDCOInternal.c.

+ +
+
+ +

◆ CS_XT2_TIMEOUT

+ +
+
+ + + + +
#define CS_XT2_TIMEOUT   0
+
+ +

Definition at line 81 of file cs_ex4_XTSourcesDCOInternal.c.

+ +
+
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 111 of file cs_ex4_XTSourcesDCOInternal.c.

+ +

References clockValue, CS_XT1_CRYSTAL_FREQUENCY, CS_XT1_TIMEOUT, and returnValue.

+ +
+
+ +

◆ NMI_ISR()

+ +
+
+ + + + + + + + +
void NMI_ISR (void )
+
+ +

Definition at line 185 of file cs_ex4_XTSourcesDCOInternal.c.

+ +

References status.

+ +
+
+

Variable Documentation

+ +

◆ clockValue

+ +
+
+ + + + +
uint32_t clockValue
+
+ +

Definition at line 102 of file cs_ex4_XTSourcesDCOInternal.c.

+ +

Referenced by main().

+ +
+
+ +

◆ returnValue

+ +
+
+ + + + +
uint8_t returnValue = 0
+
+ +

Definition at line 95 of file cs_ex4_XTSourcesDCOInternal.c.

+ +

Referenced by main().

+ +
+
+ +

◆ status

+ +
+
+ + + + +
uint16_t status
+
+ +

Definition at line 109 of file cs_ex4_XTSourcesDCOInternal.c.

+ +

Referenced by NMI_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/cs__ex4___x_t_sources_d_c_o_internal_8c.js b/Generated Documentation/html/cs__ex4___x_t_sources_d_c_o_internal_8c.js new file mode 100644 index 0000000..8b04898 --- /dev/null +++ b/Generated Documentation/html/cs__ex4___x_t_sources_d_c_o_internal_8c.js @@ -0,0 +1,11 @@ +var cs__ex4___x_t_sources_d_c_o_internal_8c = +[ + [ "CS_XT1_CRYSTAL_FREQUENCY", "cs__ex4___x_t_sources_d_c_o_internal_8c.html#a678b10cecc99c0f6565463de95922315", null ], + [ "CS_XT1_TIMEOUT", "cs__ex4___x_t_sources_d_c_o_internal_8c.html#a6052238269e7be2707058465616ac2bb", null ], + [ "CS_XT2_TIMEOUT", "cs__ex4___x_t_sources_d_c_o_internal_8c.html#ac59daf399ff2dbe0a0b5a1298ff646f9", null ], + [ "main", "cs__ex4___x_t_sources_d_c_o_internal_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "NMI_ISR", "cs__ex4___x_t_sources_d_c_o_internal_8c.html#a218a5747a3785b143c62b6f09d13e717", null ], + [ "clockValue", "cs__ex4___x_t_sources_d_c_o_internal_8c.html#addf85f1095ff1d9d649037237844da86", null ], + [ "returnValue", "cs__ex4___x_t_sources_d_c_o_internal_8c.html#ace921b5af751ec7156af51e685288544", null ], + [ "status", "cs__ex4___x_t_sources_d_c_o_internal_8c.html#a5393c99e246925076b1dfd69a64177ef", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/cs__ex4___x_t_sources_d_c_o_internal_8c_source.html b/Generated Documentation/html/cs__ex4___x_t_sources_d_c_o_internal_8c_source.html new file mode 100644 index 0000000..df8d845 --- /dev/null +++ b/Generated Documentation/html/cs__ex4___x_t_sources_d_c_o_internal_8c_source.html @@ -0,0 +1,272 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430FR2xx_4xx/cs/cs_ex4_XTSourcesDCOInternal.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
cs_ex4_XTSourcesDCOInternal.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
66 //*****************************************************************************
+
67 #include "driverlib.h"
+
68 
+
69 //*****************************************************************************
+
70 //
+
71 //Desired Timeout for XT1 initialization
+
72 //
+
73 //*****************************************************************************
+
74 #define CS_XT1_TIMEOUT 50000
+
75 
+
76 //*****************************************************************************
+
77 //
+
78 //Desired Timeout for XT2 initialization
+
79 //
+
80 //*****************************************************************************
+
81 #define CS_XT2_TIMEOUT 0
+
82 
+
83 //*****************************************************************************
+
84 //
+
85 //XT1 Crystal Frequency being used
+
86 //
+
87 //*****************************************************************************
+
88 #define CS_XT1_CRYSTAL_FREQUENCY 32768
+
89 
+
90 //*****************************************************************************
+
91 //
+
92 //Variable to store returned STATUS_SUCCESS or STATUS_FAIL
+
93 //
+
94 //*****************************************************************************
+
95 uint8_t returnValue = 0;
+
96 
+
97 //*****************************************************************************
+
98 //
+
99 //Variable to store current clock values
+
100 //
+
101 //*****************************************************************************
+
102 uint32_t clockValue;
+
103 
+
104 //*****************************************************************************
+
105 //
+
106 //Variable to store status of Oscillator fault flags
+
107 //
+
108 //*****************************************************************************
+
109 uint16_t status;
+
110 
+
111 void main (void)
+
112 {
+
113  //Stop WDT
+
114  WDT_A_hold(WDT_A_BASE);
+
115 
+
116  //Set P1.1 to output ACLK
+
117  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
118  GPIO_PORT_P1,
+
119  GPIO_PIN1,
+
120  GPIO_SECONDARY_MODULE_FUNCTION
+
121  );
+
122 
+
123  //Set P1.0 to output SMCLK
+
124  GPIO_setAsPeripheralModuleFunctionOutputPin(
+
125  GPIO_PORT_P1,
+
126  GPIO_PIN0,
+
127  GPIO_SECONDARY_MODULE_FUNCTION
+
128  );
+
129 
+
130  //Port select XT1
+
131  GPIO_setAsPeripheralModuleFunctionInputPin(
+
132  GPIO_PORT_P2,
+
133  GPIO_PIN6 + GPIO_PIN7,
+
134  GPIO_SECONDARY_MODULE_FUNCTION
+
135  );
+
136 
+
137  /*
+
138  * Disable the GPIO power-on default high-impedance mode to activate
+
139  * previously configured port settings
+
140  */
+
141  PMM_unlockLPM5();
+
142 
+
143  //Initializes the XT1 and XT2 crystal frequencies being used
+
144  CS_setExternalClockSource(
+ +
146  );
+
147 
+
148  //Initialize XT1. Returns STATUS_SUCCESS if initializes successfully
+
149  returnValue = CS_turnOnXT1LFWithTimeout(
+
150  CS_XT1_DRIVE_0,
+ +
152  );
+
153 
+
154  //Select XT1 as ACLK source
+
155  CS_initClockSignal(
+
156  CS_ACLK,
+
157  CS_XT1CLK_SELECT,
+
158  CS_CLOCK_DIVIDER_1
+
159  );
+
160 
+
161  //clear all OSC fault flag
+
162  CS_clearAllOscFlagsWithTimeout(1000);
+
163 
+
164  //Enable oscillator fault interrupt
+
165  SFR_enableInterrupt(SFR_OSCILLATOR_FAULT_INTERRUPT);
+
166 
+
167  // Enable global interrupt
+
168  __bis_SR_register(GIE);
+
169 
+
170  //Verify if the Clock settings are as expected
+
171  clockValue = CS_getMCLK();
+
172  clockValue = CS_getACLK();
+
173  clockValue = CS_getSMCLK();
+
174 
+
175  //Loop in place
+
176  while (1) ;
+
177 }
+
178 
+
179 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
180 #pragma vector=UNMI_VECTOR
+
181 __interrupt
+
182 #elif defined(__GNUC__)
+
183 __attribute__((interrupt(UNMI_VECTOR)))
+
184 #endif
+
185 void NMI_ISR(void)
+
186 {
+
187  do {
+
188  // If it still can't clear the oscillator fault flags after the timeout,
+
189  // trap and wait here.
+
190  status = CS_clearAllOscFlagsWithTimeout(1000);
+
191  } while(status != 0);
+
192 }
+
void NMI_ISR(void)
+
uint16_t status
+
#define CS_XT1_TIMEOUT
+
void main(void)
+
#define CS_XT1_CRYSTAL_FREQUENCY
+
uint8_t returnValue
+
uint32_t clockValue
+ +
+
+ + + + diff --git a/Generated Documentation/html/ctsd16_8c.html b/Generated Documentation/html/ctsd16_8c.html index 4bb0445..225f51f 100644 --- a/Generated Documentation/html/ctsd16_8c.html +++ b/Generated Documentation/html/ctsd16_8c.html @@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('ctsd16_8c.html',''); initResizable(); diff --git a/Generated Documentation/html/ctsd16_8c_source.html b/Generated Documentation/html/ctsd16_8c_source.html index 0a41bd3..e628c24 100644 --- a/Generated Documentation/html/ctsd16_8c_source.html +++ b/Generated Documentation/html/ctsd16_8c_source.html @@ -146,18 +146,18 @@ $(document).ready(function(){initNavTree('ctsd16_8c_source.html',''); initResiza
54 }
55 
56 void CTSD16_initConverterAdvanced(uint16_t baseAddress,
-
57  CTSD16_initConverterAdvancedParam *param)
+
57  CTSD16_initConverterAdvancedParam *param)
58 {
59  uint16_t address;
60 
61  // Getting correct CTSD16CCTLx register
-
62  address = baseAddress + (OFS_CTSD16CCTL0 + (param->converter * 0x06));
+
62  address = baseAddress + (OFS_CTSD16CCTL0 + (param->converter * 0x06));
63 
64  // Clearing previous settings for configuration
65  HWREG16(address) &= ~(CTSD16SC | CTSD16SNGL | CTSD16GRP | CTSD16OSR__32 |
66  CTSD16DF);
67 
-
68  HWREG16(address) |= (param->groupEnable | param->conversionMode | param->oversampleRatio | param->dataFormat);
+
68  HWREG16(address) |= (param->groupEnable | param->conversionMode | param->oversampleRatio | param->dataFormat);
69 
70  // Getting correct CTSD16INCTLx register
71  address += 0x2;
@@ -166,8 +166,8 @@ $(document).ready(function(){initNavTree('ctsd16_8c_source.html',''); initResiza
74  CTSD16GAIN1 | CTSD16GAIN0 | CTSD16INCH4 | CTSD16INCH3 | CTSD16INCH2 |
75  CTSD16INCH1 | CTSD16INCH0);
76 
-
77  HWREG16(address) |= (param->railToRailInput | param->interruptDelay |
-
78  param->gain | param->inputChannel);
+
77  HWREG16(address) |= (param->railToRailInput | param->interruptDelay |
+
78  param->gain | param->inputChannel);
79 
80 }
81 
@@ -369,6 +369,7 @@ $(document).ready(function(){initNavTree('ctsd16_8c_source.html',''); initResiza
277 //
280 //
281 //*****************************************************************************
+
MPU_initThreeSegmentsParam param
#define HWREG8(x)
Definition: hw_memmap.h:41
@@ -379,7 +380,7 @@ $(document).ready(function(){initNavTree('ctsd16_8c_source.html',''); initResiza diff --git a/Generated Documentation/html/ctsd16_8h.html b/Generated Documentation/html/ctsd16_8h.html index 4d4b0a8..0d34262 100644 --- a/Generated Documentation/html/ctsd16_8h.html +++ b/Generated Documentation/html/ctsd16_8h.html @@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('ctsd16_8h.html',''); initResizable(); diff --git a/Generated Documentation/html/ctsd16_8h_source.html b/Generated Documentation/html/ctsd16_8h_source.html index 1cb99ae..1054471 100644 --- a/Generated Documentation/html/ctsd16_8h_source.html +++ b/Generated Documentation/html/ctsd16_8h_source.html @@ -322,7 +322,7 @@ $(document).ready(function(){initNavTree('ctsd16_8h_source.html',''); initResiza
373 //
374 //*****************************************************************************
375 extern void CTSD16_initConverterAdvanced(uint16_t baseAddress,
-
376  CTSD16_initConverterAdvancedParam *param);
+
376  CTSD16_initConverterAdvancedParam *param);
377 
378 //*****************************************************************************
379 //
@@ -449,6 +449,7 @@ $(document).ready(function(){initNavTree('ctsd16_8h_source.html',''); initResiza
825 
826 #endif
827 #endif // __MSP430WARE_CTSD16_H__
+
MPU_initThreeSegmentsParam param
@@ -456,7 +457,7 @@ $(document).ready(function(){initNavTree('ctsd16_8h_source.html',''); initResiza diff --git a/Generated Documentation/html/ctsd16__ex1__single_ch_cont_conv_8c.html b/Generated Documentation/html/ctsd16__ex1__single_ch_cont_conv_8c.html new file mode 100644 index 0000000..2197141 --- /dev/null +++ b/Generated Documentation/html/ctsd16__ex1__single_ch_cont_conv_8c.html @@ -0,0 +1,191 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/ctsd16/ctsd16_ex1_singleChContConv.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
ctsd16_ex1_singleChContConv.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void CTSD16_ISR (void)
 
+ + + +

+Variables

uint32_t results [8]
 
+

Function Documentation

+ +

◆ CTSD16_ISR()

+ +
+
+ + + + + + + + +
void CTSD16_ISR (void )
+
+ +

Definition at line 127 of file ctsd16_ex1_singleChContConv.c.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 78 of file ctsd16_ex1_singleChContConv.c.

+ +

References __delay_cycles().

+ +
+
+

Variable Documentation

+ +

◆ results

+ +
+
+ + + + +
uint32_t results[8]
+
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • CTSD16 peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • CTSD16_VECTOR
  • +
+ +

Definition at line 76 of file ctsd16_ex1_singleChContConv.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/ctsd16__ex1__single_ch_cont_conv_8c.js b/Generated Documentation/html/ctsd16__ex1__single_ch_cont_conv_8c.js new file mode 100644 index 0000000..0d3543b --- /dev/null +++ b/Generated Documentation/html/ctsd16__ex1__single_ch_cont_conv_8c.js @@ -0,0 +1,6 @@ +var ctsd16__ex1__single_ch_cont_conv_8c = +[ + [ "CTSD16_ISR", "ctsd16__ex1__single_ch_cont_conv_8c.html#ac3524725ce36de76b45e26533d47edb2", null ], + [ "main", "ctsd16__ex1__single_ch_cont_conv_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "results", "ctsd16__ex1__single_ch_cont_conv_8c.html#a4a057392e2b0859396f477140fdf1612", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/ctsd16__ex1__single_ch_cont_conv_8c_source.html b/Generated Documentation/html/ctsd16__ex1__single_ch_cont_conv_8c_source.html new file mode 100644 index 0000000..7d1c1b1 --- /dev/null +++ b/Generated Documentation/html/ctsd16__ex1__single_ch_cont_conv_8c_source.html @@ -0,0 +1,245 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/ctsd16/ctsd16_ex1_singleChContConv.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
ctsd16_ex1_singleChContConv.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FG662x Demo - CTSD16, Continuous Rail-to-Rail Conversion, Single Channel
+
34 //
+
35 // Description: This program uses the CTSD16 module to perform continuous
+
36 // conversions on a single channel with rail-to-rail input. A CTSD16 interrupt
+
37 // occurs when a conversion has completed.
+
38 //
+
39 // Test by applying voltages to the input channel and setting a breakpoint
+
40 // at the indicated line. Run program until it reaches the breakpoint, then use
+
41 // the debugger's watch window to view the conversion results.
+
42 //
+
43 // Results (upper 16 bits only) are stored in the array "results"
+
44 //
+
45 // ACLK = 32kHz, MCLK = SMCLK = Calibrated DCO = 16.384MHz, SD_CLK = 1.024MHz
+
46 //
+
47 // Notes: For minimum Vcc required for CTSD16 module - see datasheet
+
48 // 1nF cap btw Vref and AVss is recommended when using 1.2V ref
+
49 //
+
50 // MSP430FG662x
+
51 // -----------------
+
52 // /|\| |
+
53 // | | |
+
54 // --|RST |
+
55 // | |
+
56 // Vin1+ -->|A0.0+ VREF |---+
+
57 // Vin1- -->|A0.0- | |
+
58 // | | -+- 1nF
+
59 // | | -+-
+
60 // | | |
+
61 // | AVss |---+
+
62 //
+
72 //******************************************************************************
+
73 
+
74 #include "driverlib.h"
+
75 
+
76 uint32_t results[8];
+
77 
+
78 void main(void) {
+
79  // Stop WDT
+
80  WDT_A_hold(WDT_A_BASE);
+
81 
+
82  // Select AD0+/- analog input pins
+
83  GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P6, GPIO_PIN4 | GPIO_PIN5);
+
84 
+
85  // Initialize CTSD16 using internal reference and internal resistor for clock
+
86  CTSD16_init(CTSD16_BASE,
+
87  CTSD16_RTR_INPUT_CHARGEPUMP_BURST_REQUEST_DISABLE, CTSD16_REF_INTERNAL);
+
88 
+
89  // Initialize converter 0: AD0+ / AD0- as input, 2s complement, channel 9
+
90  CTSD16_initConverterAdvancedParam convAdvParam = {0};
+
91  convAdvParam.converter = CTSD16_CONVERTER_0;
+
92  convAdvParam.conversionMode = CTSD16_CONTINUOUS_MODE;
+
93  convAdvParam.groupEnable = CTSD16_NOT_GROUPED;
+
94  convAdvParam.inputChannel = CTSD16_INPUT_CH9;
+
95  convAdvParam.dataFormat = CTSD16_DATA_FORMAT_2COMPLEMENT;
+
96  convAdvParam.railToRailInput = CTSD16_RTR_INPUT_ENABLE;
+
97  convAdvParam.interruptDelay = CTSD16_FOURTH_SAMPLE_INTERRUPT;
+
98  convAdvParam.oversampleRatio = CTSD16_OVERSAMPLE_256;
+
99  convAdvParam.gain = CTSD16_GAIN_1;
+
100  CTSD16_initConverterAdvanced(CTSD16_BASE, &convAdvParam);
+
101 
+
102  // Clear converter 0 interrupt flags
+
103  CTSD16_clearInterrupt(CTSD16_BASE, CTSD16_CONVERTER_0,
+
104  CTSD16_CONVERTER_INTERRUPT|CTSD16_CONVERTER_OVERFLOW_INTERRUPT);
+
105  // Enable converter 0 overflow, result interrupts
+
106  CTSD16_enableInterrupt(CTSD16_BASE, CTSD16_CONVERTER_0,
+
107  CTSD16_CONVERTER_INTERRUPT|CTSD16_CONVERTER_OVERFLOW_INTERRUPT);
+
108 
+
109  // Delay ~120us for 1.2V ref to settle
+
110  __delay_cycles(2000);
+
111 
+
112  // Wait for rail-to-rail input ready
+
113  while(!CTSD16_isRailToRailInputReady(CTSD16_BASE));
+
114 
+
115  // Set bit to start conversion
+
116  CTSD16_startConverterConversion(CTSD16_BASE, CTSD16_CONVERTER_0);
+
117 
+
118  __bis_SR_register(LPM0_bits | GIE); // Enter LPM0 w/ interrupts
+
119 }
+
120 
+
121 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
122 #pragma vector=CTSD16_VECTOR
+
123 __interrupt
+
124 #elif defined(__GNUC__)
+
125 __attribute__((interrupt(CTSD16_VECTOR)))
+
126 #endif
+
127 void CTSD16_ISR(void) {
+
128  static uint8_t index = 0;
+
129  switch (__even_in_range(CTSD16IV,CTSD16IV_CTSD16MEM0)) {
+
130  case CTSD16IV_NONE: break;
+
131  case CTSD16IV_CTSD16OVIFG:
+
132  // Clear overflow interrupt explicitly
+
133  CTSD16_clearInterrupt(CTSD16_BASE, CTSD16_CONVERTER_0, CTSD16_CONVERTER_OVERFLOW_INTERRUPT);
+
134  break;
+
135  case CTSD16IV_CTSD16MEM0:
+
136  // Save CH0 results (clears IFG)
+
137  results[index++] = CTSD16_getResults(CTSD16_BASE, CTSD16_CONVERTER_0);
+
138  if(index >= 8) {
+
139  index = 0; // SET BREAKPOINT HERE
+
140  }
+
141  break;
+
142  default: break;
+
143  }
+
144 }
+
uint32_t results[8]
+
void main(void)
+
void CTSD16_ISR(void)
+ +
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/ctsd16__ex2__single_ch_single_conv_polling_8c.html b/Generated Documentation/html/ctsd16__ex2__single_ch_single_conv_polling_8c.html new file mode 100644 index 0000000..2a00474 --- /dev/null +++ b/Generated Documentation/html/ctsd16__ex2__single_ch_single_conv_polling_8c.html @@ -0,0 +1,174 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/ctsd16/ctsd16_ex2_singleChSingleConvPolling.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
ctsd16_ex2_singleChSingleConvPolling.c File Reference
+
+
+
#include "inc/hw_memmap.h"
+#include "wdt_a.h"
+#include "gpio.h"
+#include "ctsd16.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+ + + +

+Variables

uint32_t results
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 82 of file ctsd16_ex2_singleChSingleConvPolling.c.

+ +

References __delay_cycles(), __no_operation(), and results.

+ +
+
+

Variable Documentation

+ +

◆ results

+ +
+
+ + + + +
uint32_t results
+
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • CTSD16 peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • CTSD16_VECTOR
  • +
+ +

Definition at line 80 of file ctsd16_ex2_singleChSingleConvPolling.c.

+ +

Referenced by main().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/ctsd16__ex2__single_ch_single_conv_polling_8c.js b/Generated Documentation/html/ctsd16__ex2__single_ch_single_conv_polling_8c.js new file mode 100644 index 0000000..b077ced --- /dev/null +++ b/Generated Documentation/html/ctsd16__ex2__single_ch_single_conv_polling_8c.js @@ -0,0 +1,5 @@ +var ctsd16__ex2__single_ch_single_conv_polling_8c = +[ + [ "main", "ctsd16__ex2__single_ch_single_conv_polling_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "results", "ctsd16__ex2__single_ch_single_conv_polling_8c.html#a51abf563ac0546e5dcbcb4225f542db0", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/ctsd16__ex2__single_ch_single_conv_polling_8c_source.html b/Generated Documentation/html/ctsd16__ex2__single_ch_single_conv_polling_8c_source.html new file mode 100644 index 0000000..3b2c27e --- /dev/null +++ b/Generated Documentation/html/ctsd16__ex2__single_ch_single_conv_polling_8c_source.html @@ -0,0 +1,213 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/ctsd16/ctsd16_ex2_singleChSingleConvPolling.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
ctsd16_ex2_singleChSingleConvPolling.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FG662x Demo - CTSD16, Single Conversion on a Single Channel, Poll IFG
+
34 //
+
35 // Description: This program uses the CTSD16 module to perform a single
+
36 // conversion on a single channel. The CTSD16 interrupt flag for CH0 is polled
+
37 // to determine when a conversion has completed.
+
38 //
+
39 // Test by applying a voltage to the input channel and setting a breakpoint
+
40 // at the indicated line. Run program until it reaches the breakpoint, then use
+
41 // the debugger's watch window to view the conversion results.
+
42 //
+
43 // Results (upper 16 bits only) are stored in the variable "results"
+
44 //
+
45 // ACLK = 32kHz, MCLK = SMCLK = Calibrated DCO = 16.384MHz, SD_CLK = 1.024MHz
+
46 // * Ensure low_level_init.c is included when building/running this example *
+
47 //
+
48 // Notes: For minimum Vcc required for CTSD16 module - see datasheet
+
49 // 1nF cap btw Vref and AVss is recommended when using 1.2V ref
+
50 //
+
51 // MSP430FG662x
+
52 // -----------------
+
53 // /|\| |
+
54 // | | |
+
55 // --|RST |
+
56 // | |
+
57 // Vin1+ -->|P6.4/A0.0+ VREF |---+
+
58 // Vin1- -->|P6.5/A0.0- | |
+
59 // | | -+- 1nF
+
60 // | | -+-
+
61 // | | |
+
62 // | AVss |---+
+
63 //
+
64 //
+
74 //******************************************************************************
+
75 #include "inc/hw_memmap.h"
+
76 #include "wdt_a.h"
+
77 #include "gpio.h"
+
78 #include "ctsd16.h"
+
79 
+
80 uint32_t results; // CTSD16 Conversion Results
+
81 
+
82 void main(void) {
+
83  // Stop WDT
+
84  WDT_A_hold(WDT_A_BASE);
+
85 
+
86  // Select AD0+/- analog input pins
+
87  GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P6, GPIO_PIN4 | GPIO_PIN5);
+
88 
+
89  // Initialize CTSD16 using internal reference and internal resistor for clock
+
90  CTSD16_init(CTSD16_BASE,
+
91  CTSD16_RTR_INPUT_CHARGEPUMP_BURST_REQUEST_DISABLE, CTSD16_REF_INTERNAL);
+
92 
+
93  // Initialize converter 0: AD0+ / AD0- as input, channel 9
+
94  CTSD16_initConverter(CTSD16_BASE, CTSD16_CONVERTER_0, CTSD16_SINGLE_MODE,
+
95  CTSD16_INPUT_CH9);
+
96 
+
97  // Delay ~120us for 1.2V ref to settle
+
98  __delay_cycles(2000);
+
99 
+
100  while(1) {
+
101  // Set bit to start conversion
+
102  CTSD16_startConverterConversion(CTSD16_BASE, CTSD16_CONVERTER_0);
+
103  // Poll IFG until conversion completes
+
104  while(!CTSD16_getInterruptStatus(CTSD16_BASE, CTSD16_CONVERTER_0, CTSD16_CONVERTER_INTERRUPT));
+
105  // Save CTSD16 conversion results
+
106  results = CTSD16_getResults(CTSD16_BASE, CTSD16_CONVERTER_0);
+
107  __no_operation(); // SET BREAKPOINT HERE
+
108  }
+
109 }
+ + + + +
__no_operation()
+ +
__delay_cycles(500000)
+ +
+
+ + + + diff --git a/Generated Documentation/html/ctsd16__ex3__single_ch_single_conv_interrupt_8c.html b/Generated Documentation/html/ctsd16__ex3__single_ch_single_conv_interrupt_8c.html new file mode 100644 index 0000000..e0578af --- /dev/null +++ b/Generated Documentation/html/ctsd16__ex3__single_ch_single_conv_interrupt_8c.html @@ -0,0 +1,198 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/ctsd16/ctsd16_ex3_singleChSingleConvInterrupt.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
ctsd16_ex3_singleChSingleConvInterrupt.c File Reference
+
+
+
#include "inc/hw_memmap.h"
+#include "wdt_a.h"
+#include "gpio.h"
+#include "ctsd16.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void CTSD16_ISR (void)
 
+ + + +

+Variables

uint32_t results
 
+

Function Documentation

+ +

◆ CTSD16_ISR()

+ +
+
+ + + + + + + + +
void CTSD16_ISR (void )
+
+ +

Definition at line 122 of file ctsd16_ex3_singleChSingleConvInterrupt.c.

+ +

References __bic_SR_register_on_exit(), and results.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 82 of file ctsd16_ex3_singleChSingleConvInterrupt.c.

+ +

References __delay_cycles(), and __no_operation().

+ +
+
+

Variable Documentation

+ +

◆ results

+ +
+
+ + + + +
uint32_t results
+
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • CTSD16 peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • CTSD16_VECTOR
  • +
+ +

Definition at line 80 of file ctsd16_ex3_singleChSingleConvInterrupt.c.

+ +

Referenced by CTSD16_ISR().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/ctsd16__ex3__single_ch_single_conv_interrupt_8c.js b/Generated Documentation/html/ctsd16__ex3__single_ch_single_conv_interrupt_8c.js new file mode 100644 index 0000000..19a8ba6 --- /dev/null +++ b/Generated Documentation/html/ctsd16__ex3__single_ch_single_conv_interrupt_8c.js @@ -0,0 +1,6 @@ +var ctsd16__ex3__single_ch_single_conv_interrupt_8c = +[ + [ "CTSD16_ISR", "ctsd16__ex3__single_ch_single_conv_interrupt_8c.html#ac3524725ce36de76b45e26533d47edb2", null ], + [ "main", "ctsd16__ex3__single_ch_single_conv_interrupt_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "results", "ctsd16__ex3__single_ch_single_conv_interrupt_8c.html#a51abf563ac0546e5dcbcb4225f542db0", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/ctsd16__ex3__single_ch_single_conv_interrupt_8c_source.html b/Generated Documentation/html/ctsd16__ex3__single_ch_single_conv_interrupt_8c_source.html new file mode 100644 index 0000000..e424fd8 --- /dev/null +++ b/Generated Documentation/html/ctsd16__ex3__single_ch_single_conv_interrupt_8c_source.html @@ -0,0 +1,239 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/ctsd16/ctsd16_ex3_singleChSingleConvInterrupt.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
ctsd16_ex3_singleChSingleConvInterrupt.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FG662x Demo - CTSD16, Single Conversion on a Single Channel, Use ISR
+
34 //
+
35 // Description: This program uses the CTSD16 module to perform a single
+
36 // conversion on a single channel. A CTSD16 interrupt occurs when a conversion
+
37 // has completed.
+
38 //
+
39 // Test by applying a voltage to the input channel and setting a breakpoint
+
40 // at the indicated line. Run program until it reaches the breakpoint, then use
+
41 // the debugger's watch window to view the conversion results.
+
42 //
+
43 // Results (upper 16 bits only) are stored in the variable "results"
+
44 //
+
45 // ACLK = 32kHz, MCLK = SMCLK = Calibrated DCO = 16.384MHz, SD_CLK = 1.024MHz
+
46 // * Ensure low_level_init.c is included when building/running this example *
+
47 //
+
48 // Notes: For minimum Vcc required for CTSD16 module - see datasheet
+
49 // 1nF cap btw Vref and AVss is recommended when using 1.2V ref
+
50 //
+
51 // MSP430FG662x
+
52 // -----------------
+
53 // /|\| |
+
54 // | | |
+
55 // --|RST |
+
56 // | |
+
57 // Vin1+ -->|A0.0+ VREF |---+
+
58 // Vin1- -->|A0.0- | |
+
59 // | | -+- 1nF
+
60 // | | -+-
+
61 // | | |
+
62 // | AVss |---+
+
63 //
+
64 //
+
74 //******************************************************************************
+
75 #include "inc/hw_memmap.h"
+
76 #include "wdt_a.h"
+
77 #include "gpio.h"
+
78 #include "ctsd16.h"
+
79 
+
80 uint32_t results; // CTSD16 Conversion Results
+
81 
+
82 void main(void) {
+
83  // Stop WDT
+
84  WDT_A_hold(WDT_A_BASE);
+
85 
+
86  // Select AD0+/- analog input pins
+
87  GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P6, GPIO_PIN4 | GPIO_PIN5);
+
88 
+
89  // Initialize CTSD16 using internal reference and internal resistor for clock
+
90  CTSD16_init(CTSD16_BASE,
+
91  CTSD16_RTR_INPUT_CHARGEPUMP_BURST_REQUEST_DISABLE, CTSD16_REF_INTERNAL);
+
92 
+
93  // Initialize converter 0: AD0+ / AD0- as input, channel 9
+
94  CTSD16_initConverter(CTSD16_BASE, CTSD16_CONVERTER_0, CTSD16_SINGLE_MODE,
+
95  CTSD16_INPUT_CH9);
+
96 
+
97  // Clear converter 0 interrupt flags
+
98  CTSD16_clearInterrupt(CTSD16_BASE, CTSD16_CONVERTER_0,
+
99  CTSD16_CONVERTER_INTERRUPT);
+
100  // Enable result interrupts
+
101  CTSD16_enableInterrupt(CTSD16_BASE, CTSD16_CONVERTER_0,
+
102  CTSD16_CONVERTER_INTERRUPT);
+
103 
+
104  // Delay ~120us for 1.2V ref to settle
+
105  __delay_cycles(2000);
+
106 
+
107  while(1) {
+
108  __no_operation(); // SET BREAKPOINT HERE
+
109  // Set bit to start conversion
+
110  CTSD16_startConverterConversion(CTSD16_BASE, CTSD16_CONVERTER_0);
+
111  __bis_SR_register(LPM0_bits | GIE); // Enter LPM0 w/ interrupts
+
112  __no_operation(); // For debugger
+
113  }
+
114 }
+
115 
+
116 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
117 #pragma vector=CTSD16_VECTOR
+
118 __interrupt
+
119 #elif defined(__GNUC__)
+
120 __attribute__((interrupt(CTSD16_VECTOR)))
+
121 #endif
+
122 void CTSD16_ISR(void) {
+
123  switch (__even_in_range(CTSD16IV,CTSD16IV_CTSD16MEM0)) {
+
124  case CTSD16IV_NONE: break;
+
125  case CTSD16IV_CTSD16OVIFG: break;
+
126  case CTSD16IV_CTSD16MEM0:
+
127  // Save CH0 results (clears IFG)
+
128  results = CTSD16_getResults(CTSD16_BASE, CTSD16_CONVERTER_0);
+
129  break;
+
130  default: break;
+
131  }
+
132  __bic_SR_register_on_exit(LPM0_bits); // Wake up from LPM0
+
133 }
+ + + + + +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+ +
__delay_cycles(500000)
+ +
+
+ + + + diff --git a/Generated Documentation/html/ctsd16__ex4__internal_temp_sensor_8c.html b/Generated Documentation/html/ctsd16__ex4__internal_temp_sensor_8c.html new file mode 100644 index 0000000..8f9be47 --- /dev/null +++ b/Generated Documentation/html/ctsd16__ex4__internal_temp_sensor_8c.html @@ -0,0 +1,198 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/ctsd16/ctsd16_ex4_internalTempSensor.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
ctsd16_ex4_internalTempSensor.c File Reference
+
+
+
#include "inc/hw_memmap.h"
+#include "wdt_a.h"
+#include "gpio.h"
+#include "ctsd16.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void CTSD16_ISR (void)
 
+ + + +

+Variables

uint32_t results [4]
 
+

Function Documentation

+ +

◆ CTSD16_ISR()

+ +
+
+ + + + + + + + +
void CTSD16_ISR (void )
+
+ +

Definition at line 142 of file ctsd16_ex4_internalTempSensor.c.

+ +

References __bic_SR_register_on_exit(), and results.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 95 of file ctsd16_ex4_internalTempSensor.c.

+ +

References __delay_cycles(), __no_operation(), and results.

+ +
+
+

Variable Documentation

+ +

◆ results

+ +
+
+ + + + +
uint32_t results[4]
+
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • CTSD16 peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • CTSD16_VECTOR
  • +
+ +

Definition at line 89 of file ctsd16_ex4_internalTempSensor.c.

+ +

Referenced by CTSD16_ISR(), and main().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/ctsd16__ex4__internal_temp_sensor_8c.js b/Generated Documentation/html/ctsd16__ex4__internal_temp_sensor_8c.js new file mode 100644 index 0000000..f1c1507 --- /dev/null +++ b/Generated Documentation/html/ctsd16__ex4__internal_temp_sensor_8c.js @@ -0,0 +1,6 @@ +var ctsd16__ex4__internal_temp_sensor_8c = +[ + [ "CTSD16_ISR", "ctsd16__ex4__internal_temp_sensor_8c.html#ac3524725ce36de76b45e26533d47edb2", null ], + [ "main", "ctsd16__ex4__internal_temp_sensor_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "results", "ctsd16__ex4__internal_temp_sensor_8c.html#a91bff0d07048cf514e6fbd560589705a", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/ctsd16__ex4__internal_temp_sensor_8c_source.html b/Generated Documentation/html/ctsd16__ex4__internal_temp_sensor_8c_source.html new file mode 100644 index 0000000..973606d --- /dev/null +++ b/Generated Documentation/html/ctsd16__ex4__internal_temp_sensor_8c_source.html @@ -0,0 +1,260 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/ctsd16/ctsd16_ex4_internalTempSensor.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
ctsd16_ex4_internalTempSensor.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FG662x Demo - CTSD16, Using the Integrated Temperature Sensor, Ext. Res.
+
34 //
+
35 // Description: This program uses the CTSD16 module to perform a single
+
36 // conversion on a single channel which is internally connected to the CTSD16's
+
37 // temperature sensor and an external resistor feeding the CTSD16 clock. Once
+
38 // the conversion is completed, the result is stored in a variable then converted
+
39 // into Celsius and Fahrenheit values.
+
40 //
+
41 // Test by setting a breakpoint at the indicated line. Upon reaching the breakpoint
+
42 // the conversion result will be stored in the results array. The result will
+
43 // then be taken and converted into degrees K, C, and F and be saved in the same
+
44 // array.
+
45 //
+
46 // ACLK = 32kHz, MCLK = SMCLK = Calibrated DCO = 16.384MHz, SD_CLK = 1.024MHz
+
47 // * Ensure low_level_init.c is included when building/running this example *
+
48 //
+
49 // Notes: For minimum Vcc required for CTSD16 module - see datasheet
+
50 // 1nF cap btw Vref and AVss is recommended when using 1.2V ref
+
51 //
+
52 // Sensor's temperature coefficient is 2.158mV/K (from datasheet)
+
53 // Sensor's offset voltage ranges from -100mv to 100mV (assume 0)
+
54 // Vsensor = 1.32mV * DegK + Vsensor_offset (assuming 0mv for offset)
+
55 // Vsensor = (CTSD16MEM0)/32767 * Vref(mV)
+
56 // DegK = (CTSD16MEM0 * 1200)/32767/2.158 = (CTSD16MEM0 * 1200)/70711
+
57 // DegC = DegK - 273
+
58 // DegF = (DegC * 9/5) + 32
+
59 //
+
60 //
+
61 // MSP430FG662x
+
62 // -----------------
+
63 // /|\| |
+
64 // | | |
+
65 // --|RST |
+
66 // | | (A0.6+/- connected internally)
+
67 // |A0.6+ VREF |---+ (to CTSD16's temperature sensor)
+
68 // |A0.6- | |
+
69 // | | -+- 1nF
+
70 // | | -+-
+
71 // | | |
+
72 // | AVss |---+
+
73 //
+
83 //******************************************************************************
+
84 #include "inc/hw_memmap.h"
+
85 #include "wdt_a.h"
+
86 #include "gpio.h"
+
87 #include "ctsd16.h"
+
88 
+
89 uint32_t results[4]; // CTSD16 Conversion and Temp Results
+
90  // results[0] = raw CTSD16 results
+
91  // results[1] = temp in K
+
92  // results[2] = temp in C
+
93  // results[3] = temp in F
+
94 
+
95 void main(void) {
+
96  // Stop WDT
+
97  WDT_A_hold(WDT_A_BASE);
+
98 
+
99  // Select AD0+/- analog input pins
+
100  GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P6, GPIO_PIN4 | GPIO_PIN5);
+
101 
+
102  // Initialize CTSD16 using internal reference and internal resistor for clock
+
103  CTSD16_init(CTSD16_BASE,
+
104  CTSD16_RTR_INPUT_CHARGEPUMP_BURST_REQUEST_DISABLE, CTSD16_REF_INTERNAL);
+
105 
+
106  // Initialize converter 0: internal temperature sensor channel 6
+
107  CTSD16_initConverter(CTSD16_BASE, CTSD16_CONVERTER_0, CTSD16_SINGLE_MODE,
+
108  CTSD16_INPUT_CH6);
+
109 
+
110  // Clear converter 0 interrupt flag
+
111  CTSD16_clearInterrupt(CTSD16_BASE, CTSD16_CONVERTER_0,
+
112  CTSD16_CONVERTER_INTERRUPT);
+
113  // Enable result interrupt
+
114  CTSD16_enableInterrupt(CTSD16_BASE, CTSD16_CONVERTER_0,
+
115  CTSD16_CONVERTER_INTERRUPT);
+
116 
+
117  // Delay ~120us for 1.2V ref to settle
+
118  __delay_cycles(2000);
+
119 
+
120  while(1) {
+
121  __no_operation(); // SET BREAKPOINT HERE
+
122  // Set bit to start conversion
+
123  CTSD16_startConverterConversion(CTSD16_BASE, CTSD16_CONVERTER_0);
+
124  __bis_SR_register(LPM0_bits | GIE); // Enter LPM0 w/ interrupts
+
125  __no_operation(); // For debugger
+
126 
+
127  // Calculate Temperatures in different scales
+
128  results[1] = ((unsigned long)results[0] * 1200)/70711;
+
129  results[2] = results[1] - 273;
+
130  results[3] = (results[2] * 9/5) + 32;
+
131 
+
132  __no_operation(); // SET BREAKPOINT HERE
+
133  }
+
134 }
+
135 
+
136 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
137 #pragma vector=CTSD16_VECTOR
+
138 __interrupt
+
139 #elif defined(__GNUC__)
+
140 __attribute__((interrupt(CTSD16_VECTOR)))
+
141 #endif
+
142 void CTSD16_ISR(void) {
+
143  switch (__even_in_range(CTSD16IV,CTSD16IV_CTSD16MEM0)) {
+
144  case CTSD16IV_NONE: break;
+
145  case CTSD16IV_CTSD16OVIFG: break;
+
146  case CTSD16IV_CTSD16MEM0:
+
147  // Save CH0 results (clears IFG)
+
148  results[0] = CTSD16_getResults(CTSD16_BASE, CTSD16_CONVERTER_0);
+
149  break;
+
150  default: break;
+
151  }
+
152  __bic_SR_register_on_exit(LPM0_bits); // Wake up from LPM0
+
153 }
+
154 
+ +
void main(void)
+
uint32_t results[4]
+
void CTSD16_ISR(void)
+ +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+ +
__delay_cycles(500000)
+ +
+
+ + + + diff --git a/Generated Documentation/html/ctsd16__ex5__three_ch_single_conv_8c.html b/Generated Documentation/html/ctsd16__ex5__three_ch_single_conv_8c.html new file mode 100644 index 0000000..3d7f8dd --- /dev/null +++ b/Generated Documentation/html/ctsd16__ex5__three_ch_single_conv_8c.html @@ -0,0 +1,261 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/ctsd16/ctsd16_ex5_threeChSingleConv.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
ctsd16_ex5_threeChSingleConv.c File Reference
+
+
+
#include "inc/hw_memmap.h"
+#include "wdt_a.h"
+#include "gpio.h"
+#include "ctsd16.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define Num_of_Channels   3
 
+ + + + + +

+Functions

void main (void)
 
void CTSD16_ISR (void)
 
+ + + + + + + +

+Variables

uint32_t Chresults [Num_of_Channels]
 
uint8_t i = 0
 
uint8_t channels [Num_of_Channels] = {CTSD16_INPUT_CH9, CTSD16_INPUT_CH11, CTSD16_INPUT_CH13}
 
+

Macro Definition Documentation

+ +

◆ Num_of_Channels

+ +
+
+ + + + +
#define Num_of_Channels   3
+
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • CTSD16 peripheral
  • +
  • GPIO Port peripheral
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • CTSD16_VECTOR
  • +
+ +

Definition at line 81 of file ctsd16_ex5_threeChSingleConv.c.

+ +
+
+

Function Documentation

+ +

◆ CTSD16_ISR()

+ +
+
+ + + + + + + + +
void CTSD16_ISR (void )
+
+ +

Definition at line 134 of file ctsd16_ex5_threeChSingleConv.c.

+ +

References __bic_SR_register_on_exit(), Chresults, and i.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 88 of file ctsd16_ex5_threeChSingleConv.c.

+ +

References __delay_cycles(), __no_operation(), channels, i, and Num_of_Channels.

+ +
+
+

Variable Documentation

+ +

◆ channels

+ +
+
+ + + + +
uint8_t channels[Num_of_Channels] = {CTSD16_INPUT_CH9, CTSD16_INPUT_CH11, CTSD16_INPUT_CH13}
+
+ +

Definition at line 86 of file ctsd16_ex5_threeChSingleConv.c.

+ +

Referenced by main().

+ +
+
+ +

◆ Chresults

+ +
+
+ + + + +
uint32_t Chresults[Num_of_Channels]
+
+ +

Definition at line 84 of file ctsd16_ex5_threeChSingleConv.c.

+ +

Referenced by CTSD16_ISR().

+ +
+
+ +

◆ i

+ +
+
+ + + + +
uint8_t i = 0
+
+ +

Definition at line 85 of file ctsd16_ex5_threeChSingleConv.c.

+ +

Referenced by CTSD16_ISR(), delay(), main(), and setup_DMA().

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/ctsd16__ex5__three_ch_single_conv_8c.js b/Generated Documentation/html/ctsd16__ex5__three_ch_single_conv_8c.js new file mode 100644 index 0000000..867c593 --- /dev/null +++ b/Generated Documentation/html/ctsd16__ex5__three_ch_single_conv_8c.js @@ -0,0 +1,9 @@ +var ctsd16__ex5__three_ch_single_conv_8c = +[ + [ "Num_of_Channels", "ctsd16__ex5__three_ch_single_conv_8c.html#ab6613dbdcff05dfa90b520f2870c1617", null ], + [ "CTSD16_ISR", "ctsd16__ex5__three_ch_single_conv_8c.html#ac3524725ce36de76b45e26533d47edb2", null ], + [ "main", "ctsd16__ex5__three_ch_single_conv_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ], + [ "channels", "ctsd16__ex5__three_ch_single_conv_8c.html#a4b830f1c82acdd757c15ea067c30fa2d", null ], + [ "Chresults", "ctsd16__ex5__three_ch_single_conv_8c.html#a2bcd6692df8aa6e3bca00378abcc76db", null ], + [ "i", "ctsd16__ex5__three_ch_single_conv_8c.html#af27e3188294c2df66d975b74a09c001d", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/ctsd16__ex5__three_ch_single_conv_8c_source.html b/Generated Documentation/html/ctsd16__ex5__three_ch_single_conv_8c_source.html new file mode 100644 index 0000000..23b046d --- /dev/null +++ b/Generated Documentation/html/ctsd16__ex5__three_ch_single_conv_8c_source.html @@ -0,0 +1,254 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/ctsd16/ctsd16_ex5_threeChSingleConv.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
ctsd16_ex5_threeChSingleConv.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 // MSP430FG662x Demo - CTSD16, Single Conversion of 3 Input Channels
+
34 //
+
35 // Description: This program uses the CTSD16 module to perform a single
+
36 // conversion on 3 input channels (0, 1, and 2). A CTSD16 interrupt occurs when
+
37 // the conversions have completed.
+
38 //
+
39 // Test by applying voltages to the input channel and setting a breakpoint
+
40 // at the indicated line. Run program until it reaches the breakpoint, then use
+
41 // the debugger's watch window to view the conversion result.
+
42 //
+
43 // Results (upper 16 bits only) are stored in the arrays "Chresults", with the
+
44 // input channel number equal to the value's index (ex. input channel 0 stored
+
45 // at Chresults[0]).
+
46 //
+
47 // ACLK = 32kHz, MCLK = SMCLK = Calibrated DCO = 16.384MHz, SD_CLK = 1.024MHz
+
48 // * Ensure low_level_init.c is included when building/running this example *
+
49 //
+
50 // Notes: For minimum Vcc required for CTSD16 module - see datasheet
+
51 // 1nF cap btw Vref and AVss is recommended when using 1.2V ref
+
52 //
+
53 // MSP430FG662x
+
54 // -----------------
+
55 // /|\| |
+
56 // | | |
+
57 // --|RST |
+
58 // | |
+
59 // Vin1+ -->|P6.4/AD0+ VREF |---+
+
60 // Vin1- -->|P6.5/AD0- | |
+
61 // Vin2+ -->|P6.6/AD0+ | -+- 1nF
+
62 // Vin2- -->|P6.7/AD0- | -+-
+
63 // Vin3+ -->|P7.4/AD0+ | |
+
64 // Vin3- -->|P7.5/AD0- AVss |---+
+
65 //
+
75 //******************************************************************************
+
76 #include "inc/hw_memmap.h"
+
77 #include "wdt_a.h"
+
78 #include "gpio.h"
+
79 #include "ctsd16.h"
+
80 
+
81 #define Num_of_Channels 3
+
82 
+
83 /* Arrays to store CTSD16 conversion results */
+ +
85 uint8_t i = 0;
+
86 uint8_t channels[Num_of_Channels] = {CTSD16_INPUT_CH9, CTSD16_INPUT_CH11, CTSD16_INPUT_CH13};
+
87 
+
88 void main(void) {
+
89  // Stop WDT
+
90  WDT_A_hold(WDT_A_BASE);
+
91 
+
92  // Select AD0+/- analog input pins
+
93  GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P6, GPIO_PIN4 | GPIO_PIN5 |
+
94  GPIO_PIN6 | GPIO_PIN7);
+
95  GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P7, GPIO_PIN4 | GPIO_PIN5);
+
96 
+
97  // Initialize CTSD16 using internal reference and internal resistor for clock
+
98  CTSD16_init(CTSD16_BASE,
+
99  CTSD16_RTR_INPUT_CHARGEPUMP_BURST_REQUEST_DISABLE, CTSD16_REF_INTERNAL);
+
100 
+
101  // Initialize converter 0: AD0+ / AD0- as input, channel 9
+
102  CTSD16_initConverter(CTSD16_BASE, CTSD16_CONVERTER_0, CTSD16_SINGLE_MODE,
+
103  CTSD16_INPUT_CH9);
+
104 
+
105  // Clear converter 0 interrupt flags
+
106  CTSD16_clearInterrupt(CTSD16_BASE, CTSD16_CONVERTER_0,
+
107  CTSD16_CONVERTER_INTERRUPT);
+
108  // Enable result interrupts
+
109  CTSD16_enableInterrupt(CTSD16_BASE, CTSD16_CONVERTER_0,
+
110  CTSD16_CONVERTER_INTERRUPT);
+
111 
+
112  // Delay ~120us for 1.2V ref to settle
+
113  __delay_cycles(2000);
+
114 
+
115  while(1) {
+
116  // Set bit to start conversion
+
117  CTSD16_startConverterConversion(CTSD16_BASE, CTSD16_CONVERTER_0);
+
118  __bis_SR_register(LPM0_bits | GIE); // Enter LPM0 w/ interrupts
+
119  __no_operation(); // For debugger
+
120 
+
121  if (i >= Num_of_Channels) {
+
122  i = 0;
+
123  }
+
124  CTSD16_setInputChannel(CTSD16_BASE, CTSD16_CONVERTER_0, channels[i]);
+
125  }
+
126 }
+
127 
+
128 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
129 #pragma vector=CTSD16_VECTOR
+
130 __interrupt
+
131 #elif defined(__GNUC__)
+
132 __attribute__((interrupt(CTSD16_VECTOR)))
+
133 #endif
+
134 void CTSD16_ISR(void) {
+
135  switch (__even_in_range(CTSD16IV,CTSD16IV_CTSD16MEM0)) {
+
136  case CTSD16IV_NONE: break;
+
137  case CTSD16IV_CTSD16OVIFG: break;
+
138  case CTSD16IV_CTSD16MEM0:
+
139  // Save CH0 results (clears IFG)
+
140  Chresults[i++] = CTSD16_getResults(CTSD16_BASE, CTSD16_CONVERTER_0);
+
141  __bic_SR_register_on_exit(LPM0_bits); // Wake up
+
142  break;
+
143  default: break;
+
144  }
+
145 }
+ +
uint32_t Chresults[Num_of_Channels]
+
uint8_t channels[Num_of_Channels]
+
void main(void)
+
#define Num_of_Channels
+
void CTSD16_ISR(void)
+ + +
__no_operation()
+
__bic_SR_register_on_exit(LPM3_bits|GIE)
+ +
__delay_cycles(500000)
+ +
+
+ + + + diff --git a/Generated Documentation/html/dac12__a_8c.html b/Generated Documentation/html/dac12__a_8c.html index f52f4a0..df33671 100644 --- a/Generated Documentation/html/dac12__a_8c.html +++ b/Generated Documentation/html/dac12__a_8c.html @@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('dac12__a_8c.html',''); initResizable() diff --git a/Generated Documentation/html/dac12__a_8c_source.html b/Generated Documentation/html/dac12__a_8c_source.html index 421ed40..233b02a 100644 --- a/Generated Documentation/html/dac12__a_8c_source.html +++ b/Generated Documentation/html/dac12__a_8c_source.html @@ -110,21 +110,21 @@ $(document).ready(function(){initNavTree('dac12__a_8c_source.html',''); initResi
18 
19 #include <assert.h>
20 
-
21 bool DAC12_A_init(uint16_t baseAddress, DAC12_A_initParam *param)
+
21 bool DAC12_A_init(uint16_t baseAddress, DAC12_A_initParam *param)
22 {
-
23  baseAddress += param->submoduleSelect; //Add 0x10 to base address IF
+
23  baseAddress += param->submoduleSelect; //Add 0x10 to base address IF
24  //DAC12_A_1 is selected.
25  HWREG16(baseAddress + OFS_DAC12_0CTL1) &= ~(DAC12OG + DAC12DFJ);
26 
27  //Reset and Set DAC12_A Control 0 Bits
-
28  HWREG16(baseAddress + OFS_DAC12_0CTL0) = param->outputSelect
-
29  + param->positiveReferenceVoltage
-
30  + param->amplifierSetting
-
31  + param->conversionTriggerSelect;
+
28  HWREG16(baseAddress + OFS_DAC12_0CTL0) = param->outputSelect
+
29  + param->positiveReferenceVoltage
+
30  + param->amplifierSetting
+
31  + param->conversionTriggerSelect;
32 
-
33  if (DAC12_A_VREFx1 == param->outputVoltageMultiplier){
+
33  if (DAC12_A_VREFx1 == param->outputVoltageMultiplier){
34  HWREG16(baseAddress + OFS_DAC12_0CTL0) |= DAC12IR;
-
35  } else if (DAC12_A_VREFx2 == param->outputVoltageMultiplier){
+
35  } else if (DAC12_A_VREFx2 == param->outputVoltageMultiplier){
36  HWREG16(baseAddress + OFS_DAC12_0CTL1) |= DAC12OG;
37  }
38  //else if(DAC12_A_VREFx3 == outputVoltageMultiplier)
@@ -300,6 +300,7 @@ $(document).ready(function(){initNavTree('dac12__a_8c_source.html',''); initResi
208 //
211 //
212 //*****************************************************************************
+
MPU_initThreeSegmentsParam param
#define HWREG16(x)
Definition: hw_memmap.h:39
@@ -310,7 +311,7 @@ $(document).ready(function(){initNavTree('dac12__a_8c_source.html',''); initResi diff --git a/Generated Documentation/html/dac12__a_8h.html b/Generated Documentation/html/dac12__a_8h.html index e953525..5a4b133 100644 --- a/Generated Documentation/html/dac12__a_8h.html +++ b/Generated Documentation/html/dac12__a_8h.html @@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('dac12__a_8h.html',''); initResizable() diff --git a/Generated Documentation/html/dac12__a_8h_source.html b/Generated Documentation/html/dac12__a_8h_source.html index ecb8661..b886eae 100644 --- a/Generated Documentation/html/dac12__a_8h_source.html +++ b/Generated Documentation/html/dac12__a_8h_source.html @@ -255,7 +255,7 @@ $(document).ready(function(){initNavTree('dac12__a_8h_source.html',''); initResi
235 //
236 //*****************************************************************************
237 extern bool DAC12_A_init(uint16_t baseAddress,
-
238  DAC12_A_initParam *param);
+
238  DAC12_A_initParam *param);
239 
240 //*****************************************************************************
241 //
@@ -391,6 +391,7 @@ $(document).ready(function(){initNavTree('dac12__a_8h_source.html',''); initResi
663 
664 #endif
665 #endif // __MSP430WARE_DAC12_A_H__
+
MPU_initThreeSegmentsParam param
@@ -398,7 +399,7 @@ $(document).ready(function(){initNavTree('dac12__a_8h_source.html',''); initResi diff --git a/Generated Documentation/html/dac12__a__ex1__1_v5_out_8c.html b/Generated Documentation/html/dac12__a__ex1__1_v5_out_8c.html new file mode 100644 index 0000000..a343009 --- /dev/null +++ b/Generated Documentation/html/dac12__a__ex1__1_v5_out_8c.html @@ -0,0 +1,156 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/dac12_a/dac12_a_ex1_1V5Out.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
dac12_a_ex1_1V5Out.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

MSP430F6638 Example DAC12 - 1.5V Output on DAC12_0

+

Using DAC12_0 and AVcc reference with a gain of 1, output 1.5V on DAC0. ACLK = n/a, MCLK = SMCLK = default DCO

          MSP430F66x
+      -----------------
+  /|\|              XIN|-
+   | |                 |
+   --|RST          XOUT|-
+     |                 |
+     |        P7.6/DAC0|-> 1.5V
+     |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • DAC12 peripheral
  • +
  • GPIO Port peripheral
  • +
  • DAC0
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 65 of file dac12_a_ex1_1V5Out.c.

+ +

References param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/dac12__a__ex1__1_v5_out_8c.js b/Generated Documentation/html/dac12__a__ex1__1_v5_out_8c.js new file mode 100644 index 0000000..e2083a3 --- /dev/null +++ b/Generated Documentation/html/dac12__a__ex1__1_v5_out_8c.js @@ -0,0 +1,4 @@ +var dac12__a__ex1__1_v5_out_8c = +[ + [ "main", "dac12__a__ex1__1_v5_out_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/dac12__a__ex1__1_v5_out_8c_source.html b/Generated Documentation/html/dac12__a__ex1__1_v5_out_8c_source.html new file mode 100644 index 0000000..cb33bbb --- /dev/null +++ b/Generated Documentation/html/dac12__a__ex1__1_v5_out_8c_source.html @@ -0,0 +1,179 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/dac12_a/dac12_a_ex1_1V5Out.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
dac12_a_ex1_1V5Out.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 #include "driverlib.h"
+
33 
+
34 //*******************************************************************************
+
63 //******************************************************************************
+
64 
+
65 void main (void)
+
66 {
+
67  //Stop Watchdog Timer
+
68  WDT_A_hold(WDT_A_BASE);
+
69 
+
70  /*
+
71  * // Initialize DAC12_0,
+
72  * // Choose P7.6 as output
+
73  * // Use AVcc as Vref+
+
74  * // Multiply Vout by 1
+
75  * // Use medium settling speed/current
+
76  * // Auto trigger as soon as data is set
+
77  */
+
78  DAC12_A_initParam param = {0};
+
79  param.submoduleSelect = DAC12_A_SUBMODULE_0;
+
80  param.outputSelect = DAC12_A_OUTPUT_1;
+
81  param.positiveReferenceVoltage = DAC12_A_VREF_AVCC;
+
82  param.outputVoltageMultiplier = DAC12_A_VREFx1;
+
83  param.amplifierSetting = DAC12_A_AMP_MEDIN_MEDOUT;
+
84  param.conversionTriggerSelect = DAC12_A_TRIGGER_ENCBYPASS;
+
85  DAC12_A_init(DAC12_A_BASE, &param);
+
86 
+
87  //Calibrate output buffer for DAC12_0
+
88  DAC12_A_calibrateOutput(DAC12_A_BASE,
+
89  DAC12_A_SUBMODULE_0);
+
90 
+
91  //Set 0x07FF (~1.5V) into data buffer for DAC12_0
+
92  DAC12_A_setData(DAC12_A_BASE,
+
93  DAC12_A_SUBMODULE_0,
+
94  0x7FF);
+
95 
+
96  //Enter LPM4
+
97  __bis_SR_register(LPM4_bits);
+
98 }
+
99 
+
MPU_initThreeSegmentsParam param
+
void main(void)
+ +
+
+ + + + diff --git a/Generated Documentation/html/dac12__a__ex2__0_v75_out_8c.html b/Generated Documentation/html/dac12__a__ex2__0_v75_out_8c.html new file mode 100644 index 0000000..e7fa135 --- /dev/null +++ b/Generated Documentation/html/dac12__a__ex2__0_v75_out_8c.html @@ -0,0 +1,156 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/dac12_a/dac12_a_ex2_0V75Out.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
dac12_a_ex2_0V75Out.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+

DAC12_A - 0.75V Output on DAC12_A

+

MSP430F6638 Example Using DAC12_A_1 and 1.5V reference with a gain of 1, output 0.75V on DAC1. ACLK = n/a, MCLK = SMCLK = default DCO

          MSP430F66x
+      -----------------
+  /|\|              XIN|-
+   | |                 |
+   --|RST          XOUT|-
+     |                 |
+     |        P7.7/DAC1|-> 0.75V
+     |                 |
+

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

    +
  • DAC12_A peripheral
  • +
  • GPIO Port peripheral
  • +
  • DAC1
  • +
+

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

    +
  • None.
  • +
+ +

Definition at line 64 of file dac12_a_ex2_0V75Out.c.

+ +

References __delay_cycles(), and param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/dac12__a__ex2__0_v75_out_8c.js b/Generated Documentation/html/dac12__a__ex2__0_v75_out_8c.js new file mode 100644 index 0000000..de451aa --- /dev/null +++ b/Generated Documentation/html/dac12__a__ex2__0_v75_out_8c.js @@ -0,0 +1,4 @@ +var dac12__a__ex2__0_v75_out_8c = +[ + [ "main", "dac12__a__ex2__0_v75_out_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/dac12__a__ex2__0_v75_out_8c_source.html b/Generated Documentation/html/dac12__a__ex2__0_v75_out_8c_source.html new file mode 100644 index 0000000..f5de2d2 --- /dev/null +++ b/Generated Documentation/html/dac12__a__ex2__0_v75_out_8c_source.html @@ -0,0 +1,197 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/dac12_a/dac12_a_ex2_0V75Out.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
dac12_a_ex2_0V75Out.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
60 //******************************************************************************
+
61 
+
62 #include "driverlib.h"
+
63 
+
64 void main (void)
+
65 {
+
66  //Stop Watchdog Timer
+
67  WDT_A_hold(WDT_A_BASE);
+
68 
+
69  //Refernce is autmatically turned on from the REF module on DAC request
+
70  //REF module default 1.5V is used
+
71 
+
72  /*
+
73  * // Initialize DAC12_A_1,
+
74  * // Choose P7.7 as output,
+
75  * // Use internally generated 1.5V as Vref+,
+
76  * // Multiply Vout by 1,
+
77  * // Use medium settling speed/current,
+
78  * // Auto trigger as soon as data is set
+
79  */
+
80  DAC12_A_initParam param = {0};
+
81  param.submoduleSelect = DAC12_A_SUBMODULE_1;
+
82  param.outputSelect = DAC12_A_OUTPUT_1;
+
83  param.positiveReferenceVoltage = DAC12_A_VREF_INT;
+
84  param.outputVoltageMultiplier = DAC12_A_VREFx1;
+
85  param.amplifierSetting = DAC12_A_AMP_MEDIN_MEDOUT;
+
86  param.conversionTriggerSelect = DAC12_A_TRIGGER_ENCBYPASS;
+
87  DAC12_A_init(DAC12_A_BASE, &param);
+
88 
+
89  //Calibrate output buffer for DAC12_A_0
+
90  DAC12_A_calibrateOutput(DAC12_A_BASE,
+
91  DAC12_A_SUBMODULE_0);
+
92 
+
93  //Configure internal reference If ref generator busy, WAIT
+
94  while ( REF_ACTIVE == Ref_isRefGenBusy(REF_BASE) ) ;
+
95 
+
96  //Select internal ref = 1.5V
+
97  Ref_setReferenceVoltage(REF_BASE,
+
98  REF_VREF1_5V);
+
99 
+
100  //Internal Reference ON
+
101  Ref_enableReferenceVoltage(REF_BASE);
+
102 
+
103  //Delay (~75us) for Ref to settle
+
104  __delay_cycles(75);
+
105 
+
106  //Set 0x7FF (~0.75V) into data buffer for DAC12_A_1
+
107  DAC12_A_setData(DAC12_A_BASE,
+
108  DAC12_A_SUBMODULE_1,
+
109  0x7FF
+
110  );
+
111 
+
112  //Enter LPM4
+
113  __bis_SR_register(LPM4_bits);
+
114 }
+
115 
+
MPU_initThreeSegmentsParam param
+
void main(void)
+ +
__delay_cycles(500000)
+
+
+ + + + diff --git a/Generated Documentation/html/dac12__a__ex3__positive_ramp_int_8c.html b/Generated Documentation/html/dac12__a__ex3__positive_ramp_int_8c.html new file mode 100644 index 0000000..f0f49a4 --- /dev/null +++ b/Generated Documentation/html/dac12__a__ex3__positive_ramp_int_8c.html @@ -0,0 +1,161 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/dac12_a/dac12_a_ex3_positiveRampInt.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
dac12_a_ex3_positiveRampInt.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

void main (void)
 
void DAC12_A_ISR (void)
 
+

Function Documentation

+ +

◆ DAC12_A_ISR()

+ +
+
+ + + + + + + + +
void DAC12_A_ISR (void )
+
+ +

Definition at line 144 of file dac12_a_ex3_positiveRampInt.c.

+ +
+
+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 69 of file dac12_a_ex3_positiveRampInt.c.

+ +

References param.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/dac12__a__ex3__positive_ramp_int_8c.js b/Generated Documentation/html/dac12__a__ex3__positive_ramp_int_8c.js new file mode 100644 index 0000000..13af3a3 --- /dev/null +++ b/Generated Documentation/html/dac12__a__ex3__positive_ramp_int_8c.js @@ -0,0 +1,5 @@ +var dac12__a__ex3__positive_ramp_int_8c = +[ + [ "DAC12_A_ISR", "dac12__a__ex3__positive_ramp_int_8c.html#a94ae868779d51f3f26a679c87eea886d", null ], + [ "main", "dac12__a__ex3__positive_ramp_int_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/dac12__a__ex3__positive_ramp_int_8c_source.html b/Generated Documentation/html/dac12__a__ex3__positive_ramp_int_8c_source.html new file mode 100644 index 0000000..3e515e3 --- /dev/null +++ b/Generated Documentation/html/dac12__a__ex3__positive_ramp_int_8c_source.html @@ -0,0 +1,239 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/dac12_a/dac12_a_ex3_positiveRampInt.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
dac12_a_ex3_positiveRampInt.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
63 //******************************************************************************
+
64 
+
65 #include "driverlib.h"
+
66 
+
67 static uint16_t dataToConvert = 0;
+
68 
+
69 void main (void)
+
70 {
+
71  //Stop Watchdog Timer
+
72  WDT_A_hold(WDT_A_BASE);
+
73 
+
74  /*
+
75  * // Initialize DAC12_A_0,
+
76  * // Choose P7.6 as output
+
77  * // Use AVcc as Vref+
+
78  * // Multiply Vout by 1
+
79  * // Use medium settling speed/current
+
80  * // Use Timer_B OUT2 as data-latch trigger
+
81  */
+
82  DAC12_A_initParam param = {0};
+
83  param.submoduleSelect = DAC12_A_SUBMODULE_0;
+
84  param.outputSelect = DAC12_A_OUTPUT_1;
+
85  param.positiveReferenceVoltage = DAC12_A_VREF_AVCC;
+
86  param.outputVoltageMultiplier = DAC12_A_VREFx1;
+
87  param.amplifierSetting = DAC12_A_AMP_MEDIN_MEDOUT;
+
88  param.conversionTriggerSelect = DAC12_A_TRIGGER_TB;
+
89  DAC12_A_init(DAC12_A_BASE, &param);
+
90 
+
91  //Enable the DAC12_A_0 interrupt
+
92  DAC12_A_enableInterrupt(DAC12_A_BASE,
+
93  DAC12_A_SUBMODULE_0);
+
94 
+
95  //Calibrate output buffer for DAC12_A_0
+
96  DAC12_A_calibrateOutput(DAC12_A_BASE,
+
97  DAC12_A_SUBMODULE_0);
+
98 
+
99  //Enable conversions for DAC12_A_0
+
100  DAC12_A_enableConversions(DAC12_A_BASE,
+
101  DAC12_A_SUBMODULE_0);
+
102 
+
104  DAC12_A_setData(DAC12_A_BASE,
+
105  DAC12_A_SUBMODULE_0,
+
106  dataToConvert
+
107  );
+
108 
+
109  //Start Timer B0
+
110  Timer_B_initUpModeParam initUpModeParam = {0};
+
111  initUpModeParam.clockSource = TIMER_B_CLOCKSOURCE_SMCLK;
+
112  initUpModeParam.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_1;
+
113  initUpModeParam.timerPeriod = 0x33;
+
114  initUpModeParam.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_DISABLE;
+
115  initUpModeParam.captureCompareInterruptEnable_CCR0_CCIE =
+
116  TIMER_B_CCIE_CCR0_INTERRUPT_DISABLE;
+
117  initUpModeParam.timerClear = TIMER_B_DO_CLEAR;
+
118  initUpModeParam.startTimer = true;
+
119  Timer_B_initUpMode(TIMER_B0_BASE, &initUpModeParam);
+
120 
+
121 
+
122  Timer_B_initCompareModeParam initCompParam = {0};
+
123  initCompParam.compareRegister = TIMER_B_CAPTURECOMPARE_REGISTER_2;
+
124  initCompParam.compareInterruptEnable = TIMER_B_CAPTURECOMPARE_INTERRUPT_DISABLE;
+
125  initCompParam.compareOutputMode = TIMER_B_OUTPUTMODE_TOGGLE;
+
126  initCompParam.compareValue = 0x32;
+
127  Timer_B_initCompareMode(TIMER_B0_BASE, &initCompParam);
+
128 
+
129  //Enter LPM0
+
130  __bis_SR_register(CPUOFF + GIE);
+
131 }
+
132 
+
133 //******************************************************************************
+
134 //
+
135 //This is the DAC12_A_VECTOR interrupt vector service routine.
+
136 //
+
137 //******************************************************************************
+
138 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+
139 #pragma vector=DAC12_VECTOR
+
140 __interrupt
+
141 #elif defined(__GNUC__)
+
142 __attribute__((interrupt(DAC12_VECTOR)))
+
143 #endif
+
144 void DAC12_A_ISR (void)
+
145 {
+
146  //Clear interrupt flag to stop asserts
+
147  DAC12_A_clearInterrupt(DAC12_A_BASE,
+
148  DAC12_A_SUBMODULE_0);
+
149 
+
150  //Increment ramp
+
151  dataToConvert++;
+
152 
+
153  //Set the variable dataToConvert into data buffer for DAC12_A_0
+
154  DAC12_A_setData(DAC12_A_BASE,
+
155  DAC12_A_SUBMODULE_0,
+
156  dataToConvert
+
157  );
+
158  __no_operation();
+
159 }
+
MPU_initThreeSegmentsParam param
+
Timer_A_initUpModeParam initUpModeParam
+
void main(void)
+
void DAC12_A_ISR(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/dac12__a__ex4__grouped_8c.html b/Generated Documentation/html/dac12__a__ex4__grouped_8c.html new file mode 100644 index 0000000..8b262a1 --- /dev/null +++ b/Generated Documentation/html/dac12__a__ex4__grouped_8c.html @@ -0,0 +1,137 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/dac12_a/dac12_a_ex4_grouped.c File Reference + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
dac12_a_ex4_grouped.c File Reference
+
+
+
#include "driverlib.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void main (void)
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + +
void main (void )
+
+ +

Definition at line 72 of file dac12_a_ex4_grouped.c.

+ +
+
+
+
+ + + + diff --git a/Generated Documentation/html/dac12__a__ex4__grouped_8c.js b/Generated Documentation/html/dac12__a__ex4__grouped_8c.js new file mode 100644 index 0000000..824c5b2 --- /dev/null +++ b/Generated Documentation/html/dac12__a__ex4__grouped_8c.js @@ -0,0 +1,4 @@ +var dac12__a__ex4__grouped_8c = +[ + [ "main", "dac12__a__ex4__grouped_8c.html#a6288eba0f8e8ad3ab1544ad731eb7667", null ] +]; \ No newline at end of file diff --git a/Generated Documentation/html/dac12__a__ex4__grouped_8c_source.html b/Generated Documentation/html/dac12__a__ex4__grouped_8c_source.html new file mode 100644 index 0000000..b1977d5 --- /dev/null +++ b/Generated Documentation/html/dac12__a__ex4__grouped_8c_source.html @@ -0,0 +1,220 @@ + + + + + + + +2020-2021 Sunseeker Telemetry and Lighting System: Resources/Software/msp430_driverlib_2_91_13_01/examples/MSP430F5xx_6xx/dac12_a/dac12_a_ex4_grouped.c Source File + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
2020-2021 Sunseeker Telemetry and Lighting System +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
dac12_a_ex4_grouped.c
+
+
+Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
+
2  * Copyright (c) 2017, Texas Instruments Incorporated
+
3  * All rights reserved.
+
4  *
+
5  * Redistribution and use in source and binary forms, with or without
+
6  * modification, are permitted provided that the following conditions
+
7  * are met:
+
8  *
+
9  * * Redistributions of source code must retain the above copyright
+
10  * notice, this list of conditions and the following disclaimer.
+
11  *
+
12  * * Redistributions in binary form must reproduce the above copyright
+
13  * notice, this list of conditions and the following disclaimer in the
+
14  * documentation and/or other materials provided with the distribution.
+
15  *
+
16  * * Neither the name of Texas Instruments Incorporated nor the names of
+
17  * its contributors may be used to endorse or promote products derived
+
18  * from this software without specific prior written permission.
+
19  *
+
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
31  * --/COPYRIGHT--*/
+
32 //******************************************************************************
+
33 //MSP430F66x Demo - DAC12_A_0 & DAC12_A_1 grouped, positive ramp on DAC12_A_0 and
+
34 //negative ramp on DAC12_A_1, high settling speed/current.
+
68 //******************************************************************************
+
69 
+
70 #include "driverlib.h"
+
71 
+
72 void main (void)
+
73 {
+
74  uint16_t dataToConvert = 0;
+
75 
+
76  //Stop Watchdog Timer
+
77  WDT_A_hold(WDT_A_BASE);
+
78 
+
79  /*
+
80  * Initialize DAC12_A_0
+
81  * Multiply Vout by 1
+
82  * Use high settling speed/current,
+
83  * Auto trigger when data is set as,
+
84  * long as conversions are enabled
+
85  */
+
86  DAC12_A_initParam param0 = {0};
+
87  param0.submoduleSelect = DAC12_A_SUBMODULE_0;
+
88  param0.outputSelect = DAC12_A_OUTPUT_1;
+
89  param0.positiveReferenceVoltage = DAC12_A_VREF_AVCC;
+
90  param0.outputVoltageMultiplier = DAC12_A_VREFx1;
+
91  param0.amplifierSetting = DAC12_A_AMP_HIGHIN_HIGHOUT;
+
92  param0.conversionTriggerSelect = DAC12_A_TRIGGER_ENC;
+
93  DAC12_A_init(DAC12_A_BASE, &param0);
+
94 
+
95  /*Initialize DAC12_A_1
+
96  * Choose P6.7 as output
+
97  * Use AVcc as Vref+
+
98  * Multiply Vout by 1
+
99  * Use high settling speed/current
+
100  * Auto trigger when data is set as long as conversions are enabled
+
101  */
+
102  DAC12_A_initParam param1 = {0};
+
103  param1.submoduleSelect = DAC12_A_SUBMODULE_1;
+
104  param1.outputSelect = DAC12_A_OUTPUT_1;
+
105  param1.positiveReferenceVoltage = DAC12_A_VREF_AVCC;
+
106  param1.outputVoltageMultiplier = DAC12_A_VREFx1;
+
107  param1.amplifierSetting = DAC12_A_AMP_HIGHIN_HIGHOUT;
+
108  param1.conversionTriggerSelect = DAC12_A_TRIGGER_ENC;
+
109  DAC12_A_init(DAC12_A_BASE, &param1);
+
110 
+
111 
+
112  //Group both DAC12_A's to sync output
+
113  DAC12_A_enableGrouping(DAC12_A_BASE);
+
114 
+
115  //Calibrate output buffer for DAC12_A_0
+
116  DAC12_A_calibrateOutput(DAC12_A_BASE,
+
117  DAC12_A_SUBMODULE_0);
+
118 
+
119  //Calibrate output buffer for DAC12_A_0
+
120  DAC12_A_calibrateOutput(DAC12_A_BASE,
+
121  DAC12_A_SUBMODULE_1);
+
122 
+
123  //Enable Conversions for both DAC12_A_0 and DAC12_A_1
+
124  DAC12_A_enableConversions(DAC12_A_BASE,
+
125  DAC12_A_SUBMODULE_0);
+
126  DAC12_A_enableConversions(DAC12_A_BASE,
+
127  DAC12_A_SUBMODULE_1);
+
128 
+
129  for (;;)
+
130  {
+
131  dataToConvert++;
+
132 
+
133  //Set data for DAC12_A_0, which will not latch because it is grouped
+
134  DAC12_A_setData(DAC12_A_BASE,
+
135  DAC12_A_SUBMODULE_0,
+
136  dataToConvert);
+
137 
+
138  //Set data for DAC12_A_1, which will latch both DAC's data buffers
+
139  DAC12_A_setData(DAC12_A_BASE,
+
140  DAC12_A_SUBMODULE_1,
+
141  ~(dataToConvert));
+
142  __no_operation();
+
143  }
+
144 }
+
145 
+
void main(void)
+ +
__no_operation()
+
+
+ + + + diff --git a/Generated Documentation/html/design_choices.html b/Generated Documentation/html/design_choices.html index b201655..80c73d2 100644 --- a/Generated Documentation/html/design_choices.html +++ b/Generated Documentation/html/design_choices.html @@ -114,32 +114,34 @@ Universal Serial Communication Interfaces (USCIs):
  • A - Supporting up to four total of UART and/or SPI
  • B - Supporting up to four total of I2C and/or SPI