Can you try to run your code to see if it works on CYUSBS236/234 board? You mentioned that you have checked the demo code under SDK path and get same error. We need to check if it is a hardware issue.
Thanks for the reply.
You mean to change hardware chip ? , If yes then we already tried it.
Can't we do something like Re-Set that chip configuration via HX3 Blaster plus utility ? or any other way to reset ?
Because we already changed all the chip and checked but getting the same error.
Can you upload the whole project? I could check and debug it with CYUSBS236.
BTW, why do you mention HX3 blaster utility in this thread which discusses USB-serial chip?
I am sorry , we can't upload the project but apart from project what code I have posted in the blog is giving the error. rest of the code is same which has been mentioned in the sample cypress SDK Project.
I don't know about HX3 blaster utility , but from google I heard that might be we can re-set the micro chip setting so I asked , I don't know what's the purpose of that utility.
But how can we go in depth of that error ? we don't have any alternative ways to resolve it ?
You paste the code but it is hard to check and debug.
Please delete un-releated code and set up a simple project which could re-produce this issue.
I have mentioned that I met no prolbem using example code and CYUSBS236 board.
I am trying to send you the project but not able to found any attachment link so can you please share your email id
That all is microsoft visual c++ library or header file and it's default , given project developed in vs2017 and it's DLL project so to run it.
I just checked it and that type def available in
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\shared\minwindef.h
you have to either use that compiled dll into any other project or you can directly check the logic from LTMachineConfig.cpp -> initProjector()
main flow begins from the initProjector() function.
I review your code to find you define LTWrite() and it will invoke GetProcAddress() in further, but there is no definition of this function.
Could you please call the API CyI2CWrite directly to write data on I2C bus?
I think you may not aware about LoadLibrary Function of vc++ , It's simply call CyI2CWrite from cypress dll , nothing special in that code.
I am talking with my vendor technical team , let's see if they can help in this.
But what code I sent will be ok in visual c++ ? Because some time I was getting delay in projector Off.
Thanks & Regards
Yes, you're right. I make a research on google and have a basic knowledge of loadLibrary function. Thanks for your information.
The code looks like fine. Could you please try to capture the I2C waveform when you load DLL and call I2Cwrite using logic analyzer?
Could you please check if it's the hardware issue? Is the I2C device ready to receive data?
Replace the I2C device with an EEPROM to test if the code(I2C write) could excute well.
It should be abnormal for you to always get I2C_deivce_busy error code.
Have you found the root cause?