- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is the code that I have for both the module and the kit. I'm not sure what is going wrong, but my buffers are not being filled on the module side... now, I was able to get the data across but that has since ceased. Any help or suggestion is appreciated!
PSoC 4000s functions:
#define BUFFER_SIZE 0x02
void fillBuffer(int data1, int data2){
for(uint8 i = 0; i < BUFFER_SIZE; ++i){
wrData1 = (data1 & 0b1111111100000000) >> 8;
wrData2 = (data2 & 0b1111111100000000) >> 8;
if(i < 1){
data1 = data1 << 8;
data2 = data2 << 8;
}
}
}
void write2BLE(uint8 addr, uint8 buffer[]){
/* clear any previous states */
i2c_I2CMasterClearStatus();
i2c_I2CMasterWriteBuf(addr, (uint8 *) buffer, BUFFER_SIZE, i2c_I2C_MODE_COMPLETE_XFER);
while(0u == (i2c_I2CMasterStatus() & i2c_I2C_MSTAT_WR_CMPLT)) continue;
}
EZBLE Module function:
void i2cBufferSetup(uint8 dataBuffer1[BUFFER_SIZE], uint8 dataBuffer2[BUFFER_SIZE]){
i2c_EzI2CSetBuffer1(BUFFER_SIZE, BUFFER_SIZE, dataBuffer1);
i2c_EzI2CSetBuffer2(BUFFER_SIZE, BUFFER_SIZE, dataBuffer2);
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you're using the EZ module from the same kit, you can refer to the code example CE 210709 which has a similar implementation. In case you find any difficulty, do come back.
Regards,
Bragadeesh
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you please share your project files here?
Also can you please elaborate on your problem?
Regards,
Bragadeesh
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you using the EZBLE module available in the 4000S Pioneer kit or a separate EZ BLE module?
Regards
Bragadeesh
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you're using the EZ module from the same kit, you can refer to the code example CE 210709 which has a similar implementation. In case you find any difficulty, do come back.
Regards,
Bragadeesh
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the module onboard the kit.
Thank you,
Julian