Can you post your complete project, so that we all can have a look at all of your settings? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
That's not going to be possible as what I'm working on is not a personal project, but rather a product.
I'm trying to do exactly what this person is doing except on the PSOC 4 platform. The code provided by another user seems to break under PsocCreator 3.2
Is there really no one that can point me in the right direction without having to expose the code?
You need to edit the HSIOM register to change the pin from SCB to GPIO.
I am attaching an example that I had done it for SCB SPI. The same should work for SCB I2C as well.
Kindly let me know if you have any issues.
Sleep Mode ref material -
http://www.cypress.com/documentation/application-notes/an86233-psoc-4-low-power-modes-and-power-reduction-techniques AN86233 - PSoC® 4 Low-Power Modes and Power Reduction Techniques
http://www.cypress.com/documentation/application-notes/an90114-psoc-4000-family-low-power-system-design-techniques AN90114 - PSoC® 4000 Family Low-Power System Design Techniques
http://www.cypress.com/documentation/application-notes/an92584-designing-low-power-and-estimating-battery-life-ble AN92584 - Designing for Low Power and Estimating Battery Life for BLE Applications
I greatly appreciate your help. I took a look at the attached example and replicated the register writes that you do in your example with the HSIOM register. My I2C SCB block uses Port4 for my SCL and SDA pins, so i changed your CYREG_HSIOM_PORT_SEL0 to CYREG_HSIOM_PORT_SEL4 and then utilize the respective read and write methods from the I2C block. I still don't see the wake up sequence that I'm attempting to do, I only pickup the I2C communication attempts the PSOC makes to the sensor afterwards, of course i get no response as the sensor is still in sleep mode.
Is there anything else I'm missing?
Am i supposed to use some other method for driving SDA and SCL?
What is the sensor part number ?
Looks like its a false alarm, With your sample code i was able to figure it out and got it working as intended.
SCB_HSIOM_GPIO_SEL = 0x00u
SCB_HSIOM_I2C_SEL = 0x0Eu
SCB_HSIOM_SPI_SEL = 0x0Fu
You were using SPI so it was slightly different for me as you can see above so i simply do...
CY_SET_REG32(CYREG_HSIOM_PORT_SEL4 , 0x000000EE);
and that allows me to work with the pins i need
The sensor I'm using is a Melexis IR sensor 90614, if you see my response to Keerthi, you will see the solution i have come up with. Btw: I'm using two pins off of port 4
I have used that part in a PSOC 1 design, great device.
Note it is an SMBUS device.
Did you observe this (from datssheet) -
8.4.8 Sleep Mode
The MLX90614 can enter in Sleep Mode via the command “Enter SLEEP mode” sent via the SMBu
interface. This mode is not available for the 5V supply version. There are two ways to put MLX90614 in
power-up default mode:
- By Wake up request SCL pin high and then PWM/SDA pin low for at least tDDQ > 33ms
I saw the note about the sensor being SMBUS, i had no issues putting the sensor to sleep, it was the waking up that caused quite a bit of head scratching... I'm still new to the PSOC platform so there is a bit of a learning curve.
To effect the wakeup you can always use register writes to effect the I2C
pins wakeup requirements of the Melexis.
http://www.cypress.com/documentation/application-notes/an86439-psoc-4-using-gpio-pins AN86439 - PSoC® 4 - Using GPIO Pins