PSoC™ 5, 3 & 1 Forum Discussions
I am trying to build adc that samples for 5 seconds then sleeps for a minute.
Hello all,
I'm running into a strange problem with bootloading a PSoC5LP device over I2C interface.
My bootloader host is a PC app using the cyusbserial.dll library. During testing I was able to get this working, but there seems to be some funnies going on and I'd like to confirm a couple things.
What I'm finding is that I can jump to the bootloader from the application successfully, and then the "Enter Bootloader" packet is received and ACKed by the PSoC:
Then about 13ms later, when the host sends the address(R), the PSoC NACKs:
My question is: does entering the bootloader reset the I2C Slave Address?
The reason I think this might be the case is that the design I am using has multiple PSoC devices on the I2C bus, and the slave addresses of each are determined at runtime via a switch on the PCB. The switch controls a set address lines going to the PSoC devices, and the slave address of each is based on the reading from these pins, allowing each processor in the chain to have a unique address. This is set on startup in both the application and bootloader projects like so:
#define I2C_BASE_ADDR = 0x40 //0x80 when left-justified
int main(void){
SI2C_Start();
SI2C_SlaveSetAddress(I2C_BASE_ADDR + ADR_Read());
Bootloader_Start();
for(;;)
{
}
}
The only reason I can think of where the enter_bootloader command would be ACKed, and the first read at the same address would be NACKed is that the entering the bootloader is changing the I2C Address after I'm setting it. I'm having trouble figuring out where in code this might be happening.
SI2C_Start() definitely changes the address to the default set in the component as part of SI2C_Init(), but that's why I'm calling SI2C_SlaveSetAddress() afterward. From what I can tell, SI2C_Init() should never be called again unless SI2C_Stop() is called first (SI2C_initVar gets reset to 0).
Can anyone confirm if this is the case?
Of course, if anyone has an idea as to what else the issue might be, I'm all ears.
Thanks!
Show LessHi,
We use fixed function I2C slave component of PSoC5LP.
1) Place I2C Slave ( fixed function ) component in PSoC Creator.
2) Set the data rate to 100 ksps.
3) Set the BUS_CLK ( CPU ) and MASTER_CLK to 24MHz.
It works normally after the build.
However, while the CPU is running,
Switch 24MHz of CPU_CLK to 3MHz by using API.
Then, the following events were confirmed.
-- I2C data rate becomes 12.5kbps ( = 100kbps / 8 )
-- In I2C communication, Communication fails if 4 bytes or more data is read at a time. ( Communication successful up to 3 Bytes )
Is the above recognition correct?
Do you have a way to improve these?
Regards,
Show LessHi,
I want to make my own project on the pcb card. Which circuit elements should I use?
I made a pcb card with Psoc 4. I want to make sure which circuit elements to use for Psoc 5lp CY8C5888LTI-LP097 QFN68.
Show Less大家好,PSoC 5LP数据手册中有LCD直驱的介绍,通过配置 UDB,可以生成全局 LCD 控制信号和时钟。这组信号会通过一系列专用的LCD 全局路由通道路由到每个LCD 引脚驱动器。除了生成全局 LCD 控制信号以外, UDB 还会生成 DMA 请求,以启动下一 LCD 数据帧的传输。
但是我想用通过配置 UDB,生成全局 LCD 控制信号和时钟 ,需要25路左右的控制信号,显示屏不需要Psoc芯片驱动,只需要提供控制信号(波形),请问UDB资源是否够用?如何评估的?谢谢
Show Less
Hi All,
I find this error while using time data structure.
Day of the Week - 5 correct
Day of the Month - 0x15 = 21 correct
Month - 2 correct
Day of Year 0x33 = 51 should be 52 i.e. 31 + 21
Just wanted to know whether the way in which day of year calculated in the module is correct or not.
Show LessHi;
In my RF transceiver project, the receiver stores the information in rev_array [32]. The transmitter is sending 300 information.
but rev_array [32], starting at 0x1fff81d8, cannot receive data.
0x1fff81d8, 0x1fff81e0,0x1fff81e80x1fff81f0 all become 0.
0x1fff81f8 00 00 00 00 33 30 30 00 .... 300. receiving the address information
Since I have checked the incoming data, I cannot see the related data.
I use the spi block for communication.
What should I do to solve this problem?
Best Regards...
Show LessHello,
In order to read 6 bytes from an I2C slave device I used the following code:
rc = I2CM_MasterWriteBuf(0x5A, pDataWrite, 1, I2CM_MODE_NO_STOP);
1 .while(I2CM_MasterStatus() & I2CM_MSTAT_XFER_INP);
rc = I2CM_MasterReadBuf(0x5A, pDataRead, 6, I2CM_MODE_REPEAT_START);
2. while(I2CM_MasterStatus() & I2CM_MSTAT_XFER_INP);
I managed to read the data from the slave deivce only if the bold lines are replaced with:
CyDelay(1u);
Can you please explain how can I avoid CyDelay and check transfer completion ?
Thank you in advance,
Zvika
Show LessHi everybody,I want to do in application programming,and i asked question for getting help and guidance,but not answered.
It is thunderbolt for me.
My board has psoc5 and FRAM and GSM that is connected to psoc5 by uart.
I am program bootloader and bootloadable on psoc5.
please read my question and help me:
I want to change bootloadable program in working with gsm.
1-how can i create new bootloadable image?
then i send image to gsm for write on FRAM.
2- what is the meta data configure true on FRAM?(please explain me to set byte by byte of FRAM)
3-what is the bootloader configured should be to read new bootloadble from FRAM and do In Apllication Programming ?
It is very important for me to do FOTA with GSM, please help me...
best regard...
Show Less