mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-22 15:40:16 +00:00
msp432p401lp-cc256x: trace time in hal_uart_dma_harvest via gpio
This commit is contained in:
parent
3c367d7cc3
commit
0e19a6f090
@ -211,6 +211,9 @@ Pin 36: BTRTS=GPIO-P6.6
|
|||||||
Pin 37: BTCTS=GPIO-P5.6
|
Pin 37: BTCTS=GPIO-P5.6
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// #define BLUETOOTH_DEBUG_PORT GPIO_PORT_P5
|
||||||
|
// #define BLUETOOTH_DEBUG_PIN GPIO_PIN0
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// Unclear
|
// Unclear
|
||||||
#define BLUETOOTH_TX_PORT GPIO_PORT_P3
|
#define BLUETOOTH_TX_PORT GPIO_PORT_P3
|
||||||
@ -360,20 +363,24 @@ static void hal_uart_dma_harvest(void){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DMA_INT1_IRQHandler(void)
|
void DMA_INT1_IRQHandler(void){
|
||||||
{
|
|
||||||
MAP_DMA_clearInterruptFlag(DMA_CH4_EUSCIA2TX & 0x0F);
|
MAP_DMA_clearInterruptFlag(DMA_CH4_EUSCIA2TX & 0x0F);
|
||||||
MAP_DMA_disableChannel(DMA_CH4_EUSCIA2TX & 0x0F);
|
MAP_DMA_disableChannel(DMA_CH4_EUSCIA2TX & 0x0F);
|
||||||
(*tx_done_handler)();
|
(*tx_done_handler)();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DMA_INT2_IRQHandler(void)
|
void DMA_INT2_IRQHandler(void){
|
||||||
{
|
|
||||||
MAP_DMA_clearInterruptFlag(DMA_CH5_EUSCIA2RX & 0x0F);
|
MAP_DMA_clearInterruptFlag(DMA_CH5_EUSCIA2RX & 0x0F);
|
||||||
// update RTS
|
// update RTS
|
||||||
hal_uart_dma_update_rts();
|
hal_uart_dma_update_rts();
|
||||||
// process data
|
// process data
|
||||||
|
#ifdef BLUETOOTH_DEBUG_PORT
|
||||||
|
MAP_GPIO_setOutputHighOnPin(BLUETOOTH_DEBUG_PIN, BLUETOOTH_DEBUG_PORT);
|
||||||
|
#endif
|
||||||
hal_uart_dma_harvest();
|
hal_uart_dma_harvest();
|
||||||
|
#ifdef BLUETOOTH_DEBUG_PORT
|
||||||
|
MAP_GPIO_setOutputLowOnPin(BLUETOOTH_DEBUG_PIN, BLUETOOTH_DEBUG_PORT);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -389,6 +396,12 @@ void hal_uart_dma_init(void){
|
|||||||
MAP_GPIO_setAsPeripheralModuleFunctionInputPin(BLUETOOTH_TX_PORT, BLUETOOTH_TX_PIN, GPIO_PRIMARY_MODULE_FUNCTION);
|
MAP_GPIO_setAsPeripheralModuleFunctionInputPin(BLUETOOTH_TX_PORT, BLUETOOTH_TX_PIN, GPIO_PRIMARY_MODULE_FUNCTION);
|
||||||
MAP_GPIO_setAsPeripheralModuleFunctionInputPin(BLUETOOTH_RX_PORT, BLUETOOTH_RX_PIN, GPIO_PRIMARY_MODULE_FUNCTION);
|
MAP_GPIO_setAsPeripheralModuleFunctionInputPin(BLUETOOTH_RX_PORT, BLUETOOTH_RX_PIN, GPIO_PRIMARY_MODULE_FUNCTION);
|
||||||
|
|
||||||
|
#ifdef BLUETOOTH_DEBUG_PORT
|
||||||
|
// debug pin
|
||||||
|
MAP_GPIO_setAsOutputPin(BLUETOOTH_DEBUG_PIN, BLUETOOTH_DEBUG_PORT);
|
||||||
|
MAP_GPIO_setOutputLowOnPin(BLUETOOTH_DEBUG_PIN, BLUETOOTH_DEBUG_PORT);
|
||||||
|
#endif
|
||||||
|
|
||||||
// UART
|
// UART
|
||||||
|
|
||||||
/* Configuring and enable UART Module */
|
/* Configuring and enable UART Module */
|
||||||
@ -525,7 +538,13 @@ static volatile uint32_t systick;
|
|||||||
void SysTick_Handler(void){
|
void SysTick_Handler(void){
|
||||||
systick++;
|
systick++;
|
||||||
// process received data
|
// process received data
|
||||||
|
#ifdef BLUETOOTH_DEBUG_PORT
|
||||||
|
MAP_GPIO_setOutputHighOnPin(BLUETOOTH_DEBUG_PIN, BLUETOOTH_DEBUG_PORT);
|
||||||
|
#endif
|
||||||
hal_uart_dma_harvest();
|
hal_uart_dma_harvest();
|
||||||
|
#ifdef BLUETOOTH_DEBUG_PORT
|
||||||
|
MAP_GPIO_setOutputLowOnPin(BLUETOOTH_DEBUG_PIN, BLUETOOTH_DEBUG_PORT);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user