完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,
我的节目刚开始就开始了。 我开始初始化,右跳到无限循环中。 氰去甲肾上腺素 CysISR(InDebug) { / ************************************************************************************************* 我们不能到这儿来。如果我们这样做,一个严重的问题发生,所以进入 *无限循环。 *** 如果定义的话 如果(ErNONO=EnOMIM) { YiFiDEF CyBooTytingDeFultTyHoLeRel.EnOnMeMeExpRead回调 CyBoOtTyTunDebug和LeRelyEnMeMeMeExpExtAcLead(); { Endof/*CyBooTytIngDeFultTyHyrl ErnMeMeMeExpRead回调*/* (1) { /*堆外空间 *可以在设计范围资源的系统选项卡中增加。 */ } } 我不知道该怎么办。 谢谢 项目01.ZIP 4.6兆字节 以上来自于百度翻译 以下为原文 Hi there, my program stucks right at the beginning. I start the initialization and right it jumps into a infinite loop. CY_NORETURN CY_ISR(IntDefaultHandler) { /*************************************************************************** * We must not get here. If we do, a serious problem occurs, so go into * an infinite loop. ***************************************************************************/ #if defined(__GNUC__) if (errno == ENOMEM) { #ifdef CY_BOOT_INT_DEFAULT_HANDLER_ENOMEM_EXCEPTION_CALLBACK CyBoot_IntDefaultHandler_Enomem_Exception_Callback(); #endif /* CY_BOOT_INT_DEFAULT_HANDLER_ENOMEM_EXCEPTION_CALLBACK */ while(1) { /* Out Of Heap Space * This can be increased in the System tab of the Design Wide Resources. */ } } I don't know what to do here. Thanks
|
|
相关推荐
5个回答
|
|
Chrisse,我想printf()呼叫发送您的项目为电子高飞。有thepsoc没有操作系统,那么应该如何编译器知道你想发送数据到一个组件命名的UART。
使用sprintf()格式化您的数据和uart_putstring() API发送数据。 快乐编码 鲍勃 PS:德国在哪里吗?我住在不来梅附近 以上来自于百度翻译 以下为原文 Chrisse, I suppose the printf() call sends your project into electronic nirwana. There is no OS in thePSoC, so how should the compiler know that you want to send the data to a component named UART. Use sprintf() to format your data and UART_PutString() API to send the data. Happy coding Bob PS: Where in Germany are you located? I live near Bremen |
|
|
|
ncmza 发表于 2018-8-16 07:03 嗨,鲍伯, 读了这篇文章后,我觉得这个评论。 谢谢你的回复。 我住在因斯布鲁克的奥地利。 克里斯 以上来自于百度翻译 以下为原文 Hi Bob, after reading this comment I feel like dumbass. Thanks for your response. I live in Austria, Inn***ruck. Chris |
|
|
|
克里斯,我只是一位比你大,。这并不意味着我是聪明的,它只意味着我比你更多的错误。;-) 鲍勃 以上来自于百度翻译 以下为原文 Chris, I am just a bit older than you,. That doesn't mean I am wiser, it only means I've made more errors than you did. ;-) Bob |
|
|
|
这是正确的。 这就是为什么我需要额外的帮助。 代码是针对我现在正在工作的项目。 我试图在我的PSoC和BraveRADOS传感器——Syror Bug之间建立连接。 在建立连接之后,接下来的事情是读出传感器测量的光数据。 我受过C语言训练,在学校里学习过,所以我认为我能做到这一点,没有问题。 但我马上意识到我错了,特别是API的BLE盒让我疯狂。 所以我试图建立与我的连接代码,我已经发布,但它不会连接。 我要到一个地步,我不知道该怎么做了,我会需要一些帮助。 我的代码总是在相同的位置停止。 无效CustomEventHandler(UIT32事件,ValueEndoPARAM) { *声明局部变量*/ UIT8I; CyBLY-GAPCL AdvestReStReSCAN报告; 聚伞花序; 查尔瓦德勒(30); 开关(事件) { Cyulay-Evtth-Staskon: SaveTFF(ValHunter,“Load Stand on:rn”); UARTHI推杆(Valman); //PrimTf(“Load Stad on:rn”); /*开始扫描后堆叠* CyBLY-GAPCSTARSTCAN(CysLySCAN); 断裂; 案例cyble_evt_gapc_scan_progress_result: scanreport = *(cyble_gapc_adv_report_t *)eventparam; / *制造商特定的数据检查扫描响应* / 如果(scanreport [1 ]。数据= = manufacturer_specific_data &;&;scanreport [2 ]。数据= = company_l*** &;&;scanreport。[ 3] = = company_m***数据 &;&;scanreport。数据[ 4 ] = = man_spec_data_l*** &;&;scanreport。数据[ 5 ] = = man_spec_data_m***) { sprintf(varhandler,“同行地址:rn”); UARTHI推杆(Valman); //PrimTf(“对等地址:rn”); 为(i = 0;我& lt;cyble_gap_bd_addr_size;i++) { peerdeviceaddr。bdaddr [我] = scanreport peerbdaddr [我]; sprintf(varhandler,“% 2.2x”,scanreport。peerbdaddr [ cyble_gap_bd_addr_size-1-i ]); UARTHI推杆(Valman); // printf(“% 2.2x”,scanreport。peerbdaddr [ cyble_gap_bd_addr_size-1-i ]); } sprintf(varhandler,“rn”); uart_putstring(varhandler); // printf(“rn”); devicedetected =真; /*开始断开后*扫描/ cyble_gapcstopscan(); } 打破; 案例cyble_evt_gapc_scan_start_stop: 如果(cyble_getstate() = = cyble_state_scanning) { sprintf(varhandler,“开始扫描rn”); uart_putstring(varhandler); // printf(“开始扫描rn”); } 如果(cyble_getstate() = = cyble_state_disconnected) { sprintf(varhandler,“停止扫描:rn”); uart_putstring(varhandler); // printf(“停止扫描:rn”); 如果(devicedetected = =真) { apiresult = cyble_gapcconnectdevice(&;peerdeviceaddr); 如果(apiresult = = cyble_error_ok) { sprintf(varhandler,“成功rn”); uart_putstring(varhandler); // printf(“成功rn”); } 其他的 { sprintf(varhandler,“连接失败:%x rn”,apiresult); uart_putstring(varhandler); // printf(“连接失败:%x rn”,apiresult); } devicedetected = false; } } 打破; 案例cyble_evt_gap_device_connected: /*开始发现的服务servioes连接后* / cyble_gattcstartdiscovery(cyble_connhandle); 打破; 案例cyble_evt_gap_device_disconnected: /*开始断开后*扫描/ cyble_gapcstartscan(cyble_scanning_fast); 打破; 案例cyble_evt_gattc_discovery_complete: sprintf(varhandler,“rn”); uart_putstring(varhandler); // printf(“rn”); sprintf(varhandler,“发现完整。rn”); uart_putstring(varhandler); // printf(“发现完整。rn”); 对(我= 0u;我& lt;cyble_srvi_count;i++) { / *检查发射机电源服务* / 如果(cyble_serverinfo [我]。UUID = = cyble_uuid_tx_power_service) { 如果(cyble_serverinfo [我]。range.starthandle <;cyble_serverinfo [我]的范围。endhandle) { sprintf(varhandler,“对等设备支持发射功率服务rn”); uart_putstring(varhandler); // printf(“对等设备支持发射功率服务rn”); } 其他的 { sprintf(varhandler,“对等设备不支持发射功率服务rn”); uart_putstring(varhandler); // printf(“对等设备不支持发射功率服务rn”); } } } sprintf(varhandler,“rn”); uart_putstring(varhandler); // printf(“rn”); 打破; 违约: 打破; } } 它总是试图给MSD的他阅读比赛。但他们不匹配,我不知道为什么。主要是因为我不知道这些数据是什么给。我试着读出来的数据表,但是有一些数据称为MSD但不是公司的具体数据和manufactuerer具体数据。 谢谢 克里斯 以上来自于百度翻译 以下为原文 That's right. That is why I could need some extra help. The code is for a project on which I am working at the moment. I am trying to establish a connection between my PSOC and a BlueRadios Sensor -Sensorbug-. After establishing the connection the next thing would be to read out the light data which the sensor measures. I am trained in C and learned - learning it in school and so I thought I could do this without a problem. But I realized pretty soon that I was wrong especially the API's for the BLE Kit are driving me crazy. So I tried to establish the connection with my code, which I posted already, but it won't connect. And I am coming to a point where I don't know what to do anymore, I am stuck and would need some help. My code always stops at the same position. void CustomEventHandler(uint32 event, void * eventParam) { /*Declaring Local variables*/ uint8 i; CYBLE_GAPC_ADV_REPORT_T scanReport; CYBLE_API_RESULT_T apiResult; char varhandler [30]; switch(event) { case CYBLE_EVT_STACK_ON: sprintf(varhandler, "BLE Stack ON:rn"); UART_PutString(varhandler); //printf("BLE Stack ON:rn"); /*Start to Scan after Stack ON*/ CyBle_GapcStartScan(CYBLE_SCANNING_FAST); break; case CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT: scanReport= *(CYBLE_GAPC_ADV_REPORT_T*)eventParam; /*Check for the Manufacturer specific data in scan response*/ if(scanReport.data[1] == MANUFACTURER_SPECIFIC_DATA && scanReport.data[2] == COMPANY_LSB && scanReport.data[3] == COMPANY_MSB && scanReport.data[4] == MAN_SPEC_DATA_LSB && scanReport.data[5] == MAN_SPEC_DATA_MSB) { sprintf(varhandler, "peer address:rn"); UART_PutString(varhandler); //printf("peer address:rn"); for(i=0;i peerDeviceAddr.bdAddr=scanReport.peerBdAddr; sprintf(varhandler, "%2.2x",scanReport.peerBdAddr[CYBLE_GAP_BD_ADDR_SIZE-1-i]); UART_PutString(varhandler); //printf("%2.2x",scanReport.peerBdAddr[CYBLE_GAP_BD_ADDR_SIZE-1-i]); } sprintf(varhandler, "rn"); UART_PutString(varhandler); //printf("rn"); deviceDetected=TRUE; /*Start to scan after disconnection*/ CyBle_GapcStopScan(); } break; case CYBLE_EVT_GAPC_SCAN_START_STOP: if(CyBle_GetState()==CYBLE_STATE_SCANNING) { sprintf(varhandler, "Started to Scanrn"); UART_PutString(varhandler); //printf("Started to Scanrn"); } else if(CyBle_GetState()==CYBLE_STATE_DISCONNECTED) { sprintf(varhandler, "Stop scanning:rn"); UART_PutString(varhandler); //printf("Stop scanning:rn"); if(deviceDetected==TRUE) { apiResult=CyBle_GapcConnectDevice(&peerDeviceAddr); if(apiResult==CYBLE_ERROR_OK) { sprintf(varhandler, "successrn"); UART_PutString(varhandler); //printf("successrn"); } else { sprintf(varhandler, "connection failed:%xrn",apiResult); UART_PutString(varhandler); //printf("connection failed:%xrn",apiResult); } deviceDetected=FALSE; } } break; case CYBLE_EVT_GAP_DEVICE_CONNECTED: /*Start to dicovery the servioes of the serve after connection*/ CyBle_GattcStartDiscovery(cyBle_connHandle); break; case CYBLE_EVT_GAP_DEVICE_DISCONNECTED: /*Start to scan after disconnection*/ CyBle_GapcStartScan(CYBLE_SCANNING_FAST); break; case CYBLE_EVT_GATTC_DISCOVERY_COMPLETE: sprintf(varhandler, "rn"); UART_PutString(varhandler); //printf("rn"); sprintf(varhandler, "Discovery complete.rn"); UART_PutString(varhandler); //printf("Discovery complete.rn"); for(i = 0u; i < CYBLE_SRVI_COUNT; i++) { /*Checking for the Tx power service*/ if(cyBle_serverInfo.uuid == CYBLE_UUID_TX_POWER_SERVICE) { if(cyBle_serverInfo.range.startHandle < cyBle_serverInfo.range.endHandle) { sprintf(varhandler, "Peer device supports Tx power Service rn"); UART_PutString(varhandler); //printf("Peer device supports Tx power Service rn"); } else { sprintf(varhandler, "Peer device doesn't supports Tx power Service rn"); UART_PutString(varhandler); //printf("Peer device doesn't supports Tx power Service rn"); } } } sprintf(varhandler, "rn"); UART_PutString(varhandler); //printf("rn"); break; default: break; } } It always tries to match the given MSD with the ones he reads. But they don't match and I don't know why. Espescially because I don't know what that data is for and what exactly to give in. I tried to read it out of the datasheet but there is some data called MSD but not company specific data and manufactuerer specific data. Thanks Chris |
|
|
|
我不好发表意见表。 我建议你重新发布您的实际问题作为一个新的话题。 没有人会喜欢阅读冗长的代码没有IDE的帮助。所以最好的获得帮助的ID后一个完整的项目。这样做,使用 创造者- >;文件& gt;创建工作包(小) 并将生成的文件。 鲍勃 以上来自于百度翻译 以下为原文 I am not good in giving advices for BLE. I would suggest you to re-post your actual question as a new topic. Nobody tends to like reading lengthy code without the help of an IDE. So best for getting help id to post a complete project. To do so, use Creator->File->Create Workspace Bundle (minimal) and attach the resulting file. Bob |
|
|
|
只有小组成员才能发言,加入小组>>
752个成员聚集在这个小组
加入小组2073 浏览 1 评论
1828 浏览 1 评论
3642 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1764 浏览 6 评论
1515 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
512浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
362浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
412浏览 2评论
359浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
864浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-27 06:59 , Processed in 0.927513 second(s), Total 84, Slave 68 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号