【英飞凌CYW20829测评】篇2 串口打印测试

CYW20829与友商一款对比:
 



二、应用场景

  • CYW20829:专为物联网、智能家居和工业应用设计,能够支持所有的低功耗蓝牙应用场景,包括传感器、照明、蓝牙Mesh、遥控器等。其低功耗和出色的性能表现使其成为这些领域的理想选择。
  • Nordic **:作为nRF52系列中最先进的成员,它支持低功耗蓝牙、蓝牙网状网络、NFC、Thread和Zigbee的多协议蓝牙SoC。适用于需要协议并发性和丰富多样的外围设备和功能的复杂应用程序,如智能穿戴设备、医疗设备、智能家居设备等。

三、小结

  综上所述,CYW20829与Nordic nRF52**在蓝牙版本、处理器性能、内存与存储规格、功耗、射频性能、接口与外设以及安全性等方面均有所不同。选择哪款芯片取决于具体的应用场景、性能需求和预算等因素。例如,如果应用需要最新的蓝牙5.3支持,那么CYW20829可能是一个更好的选择


APP  工程建立
 


 



ModusToolbox™ CPU 内存消耗
 




 



软件只跑串口打印

复制
int main(void)

{

    cy_rslt_t result;



#if defined (CY_DEVICE_SECURE)

    cyhal_wdt_t wdt_obj;



    /* Clear watchdog timer so that it doesn't trigger a reset */

    result = cyhal_wdt_init(&wdt_obj, cyhal_wdt_get_max_timeout_ms());

    CY_ASSERT(CY_RSLT_SUCCESS == result);

    cyhal_wdt_free(&wdt_obj);

#endif /* #if defined (CY_DEVICE_SECURE) */



    /* Initialize the device and board peripherals */

    result = cybsp_init();



    /* Board init failed. Stop program execution */

    if (result != CY_RSLT_SUCCESS)

    {

        CY_ASSERT(0);

    }



    /* Enable global interrupts */

    __enable_irq();



    /* Initialize retarget-io to use the debug UART port */

    result = cy_retarget_io_init_fc(CYBSP_DEBUG_UART_TX, CYBSP_DEBUG_UART_RX,

            CYBSP_DEBUG_UART_CTS,CYBSP_DEBUG_UART_RTS,CY_RETARGET_IO_BAUDRATE);



    /* retarget-io init failed. Stop program execution */

    if (result != CY_RSLT_SUCCESS)

    {

        CY_ASSERT(0);

    }



    /* Initialize the User LED */

    result = cyhal_gpio_init(CYBSP_USER_LED, CYHAL_GPIO_DIR_OUTPUT,

                             CYHAL_GPIO_DRIVE_STRONG, CYBSP_LED_STATE_OFF);



    /* GPIO init failed. Stop program execution */

    if (result != CY_RSLT_SUCCESS)

    {

        CY_ASSERT(0);

    }



    /* \x1b[2J\x1b[;H - ANSI ESC sequence for clear screen */

    printf("\x1b[2J\x1b[;H");



    printf("****************** "

           "HAL: Hello World! Example "

           "****************** \r\n\n");



    printf("Hello World!!!\r\n\n");



    printf("For more projects, "

           "visit our code examples repositories:\r\n\n");



    printf("https://github.com/Infineon/"

           "Code-Examples-for-ModusToolbox-Software\r\n\n");



    /* Initialize timer to toggle the LED */

    timer_init();



    printf("Press 'Enter' key to pause or "

           "resume blinking the user LED \r\n\r\n");



    printf("Hello 21ic, Hello Infineon CYW20829!\r\n\n");



    for (;;)

    {

        /* Check if 'Enter' key was pressed */

        if (cyhal_uart_getc(&cy_retarget_io_uart_obj, &uart_read_value, 1)

             == CY_RSLT_SUCCESS)

        {

            if (uart_read_value == '\r')

            {

                /* Pause LED blinking by stopping the timer */

                if (led_blink_active_flag)

                {

                    cyhal_timer_stop(&led_blink_timer);



                    printf("LED blinking paused \r\n");

                }

                else /* Resume LED blinking by starting the timer */

                {

                    cyhal_timer_start(&led_blink_timer);



                    printf("LED blinking resumed\r\n");

                }



                /* Move cursor to previous line */

                printf("\x1b[1F");



                led_blink_active_flag ^= 1;

            }

        }

        /* Check if timer elapsed (interrupt fired) and toggle the LED */

        if (timer_interrupt_flag)

        {

            /* Clear the flag */

            timer_interrupt_flag = false;



            /* Invert the USER LED state */

            cyhal_gpio_toggle(CYBSP_USER_LED);

        }

    }

}



编译结束:
 

 串口打印结果


---------------------
作者:abner_ma
链接:https://bbs.21ic.com/icview-3391196-1-1.html
来源:21ic.com
此文章已获得原创/原创奖标签,著作权归21ic所有,任何人未经允许禁止转载。 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值