Tool/software: TI-RTOS
Hi,
For a project we have an msp430fr connected to the cc1350 uart. To flash this msp from the CC1350. To do this I've ported the "CC2640R2Host_UART_BSL_MSP430FR" example, but I'm running into a problem.
When writing the password through UART, it calls an UART_write:
UART_SendByteArray(sendBuffer, PASSWORD_LENGTH + 6);
//*****************************************************************************
// Send byte array through UART ***********************************************
// byteArray: the array of the bytes to write *********************************
// size: the size of the data array *******************************************
//*****************************************************************************
void UART_SendByteArray(uint8_t * byteArray, uint16_t size)
{
UART_write(uart, byteArray, size);
}
And in the UART_write functiojn it calls the HwIP_disable() function but then it hangs and doesn't continue.
/* Disable preemption while checking if the UART is in use. */
key = HwiP_disable();
The code is in the UARTCC26XX.c and this uart works fine on another firmware for this chip.
int_fast32_t UARTCC26XX_write(UART_Handle handle, const void *buffer,
size_t size)
{
unsigned int key;
UARTCC26XX_Object *object;
UARTCC26XX_HWAttrsV2 const *hwAttrs;
/* Get the pointer to the object */
object = handle->object;
hwAttrs = handle->hwAttrs;
/* Check that there is data to write */
DebugP_assert(size != 0);
/* Disable preemption while checking if the UART is in use. */
key = HwiP_disable();
/* The UART TX is disabled after a successful write, if it is
* still active another write is in progress, reject. */
uint32_t writeActive = HWREG(hwAttrs->baseAddr + UART_O_CTL) & (UART_CTL_TXE);
if (!object->opened || writeActive) {
HwiP_restore(key);
DebugP_log1("UART:(%p) Could not write data, uart closed or in use.",
((UARTCC26XX_HWAttrsV2 const *)(handle->hwAttrs))->baseAddr);
return (UART_ERROR);
}
We're using the latest "simplelink_cc13x0_sdk_2_30_00_20" and "tirtos_builds_CC1350_LAUNCHXL_release_ccs_2_30_00_20", but with a custom board.
What can this be??