PSoC™ 5, 3 & 1 Forum Discussions
I need to read more than 256 bytes from an I2C peripheral in a single transfer.
The standard component I2CM_0_MasterReadBuf() and associated ISR are limited to 256 bytes due to the cnt variable being uint8 instead of (a more useful) uint16. This is something that does not appear to be configurable at the build level.
I can create a copy of the API function to use locally but is there any way to override the ISR in the build with my own version where I can also change the counter size?
Show LessHello, quick question for the community members regarding the power rails on the PSOC5. I've read over the datasheet and from my understanding there should be no problem setting VDDD, VDDA and VDDIO to 5V. If there is please let me know.
Thanks,
Joe
Show LessHi everyone,
I'm currently looking into safety-critical related HW options in the PSoC5lp.
NMI seems to be only pendable by software, however the PSoC5lp Registers TRM states that when the NMI_SRCSEL bit of the PANTHER_WAITPIPE register is set to 1, the NMI line is fed with DSI_01_OUT_P_11 signal. What is this signal ? Is it routable through UDB/datapath blocks ?
I also read the "Definitive Guide to the ARM Cortex-M3" book by Joseph Yiu and was wondering how the LOCKUP signal (section 12.5) is used in the PSoC5lp. Does it trigger a SystemReset ?
Regards,
Cédric
Show LessHi All,
After one successful programming with my jtag, I'm not able to re-program my psoc5lp with it.
The error happen when doing step 3 Verify JTAG ID. In fact the APACC DATA Read never return the IDCODE now.
I'm using an on board ftdi as jtag programmer.
I'm playing SVF file generated with hex2svf tool in programmer folder.
There is a CPLD in the chain then the PSOC chip.
I'm able to read IDCODE using JTAG IDCODE state.
My configuration is still JTAG 4-wire as factory setting
Which register could I check with TC TAP to verify that Step 2 as been success fully executed ?
Regards,
Show LessHi all,
I'm still new to PSoC (and PSoC Creator) world: I would like to port some libraries that I wrote for STM32 MCU to PSoC, but I have some doubts about it.
The libraries that I wrote are intended to be used with MEMS sensors (temperature, pressure, and humidity) which communicate with the MCU over I2C. When I wrote them for STM32 MCU, I wanted them to be independent of the I2C interface chosen (I2C1, I2C2, I2C3,..), so that the programmer could choose which I2C to be used. Therefore, my code looked like this:
// Function prototype - I2C_TypeDef pointer
void readTemperature(I2C_TypeDef *I2C, SensorStruct sensor);
int main(void)
{
SensorStruct mySensor;
I2C_Init(I2C1);
while(1)
{
read_temperature(I2C1,&mySensor);
// Do some stuff
}
}
In PSoC, can I do something similar? My problem right now is that, if I write a library, I'll need to use some I2C methods, but these methods have to be called with the name of the component. So if I change the name of the component, I need to change it everywhere in my code, as follows:
// Programmer used I2C component naming it I2C
I2C_MasterSendStart(SLAVE_ADDRESS, READ);
// Programmer used I2C component naming it I2C_1
I2C_1_MasterSendStart(SLAVE_ADDRESS, READ);
What kind of approach do you suggest me?
Thank you in advance,
Davide
Show LessHello everyone. I'm currently using cy8c5888lti-lp097. I've already separated KitProg section from Cypress board, connected them with jumpers and successfully supplied the board from external source (I didn't remove diode D1). My question is, can I flash the board through KitProg section but without VTARG connection and supply Cypress board form external source at the same time? Because as I know, it's forbidden to connect more that one power supply source at the same time. Thanks!
Show LessHello,
I'm having issues flashing a PSoC 5 LP device using SEGGER J-Link. If I flash the same .hex using PSoC Programmer and MiniProg it works.
If I use PSoC Programmer and MiniProg to read out the memory, I can see that the only difference in the two cases is that when flashing with MiniProg 'Config Flash Area' address 0x0400 contains some data (roughly between 0x0400 and 0x0f80).
- What is this data?
- Where does it come from?
- How can I flash it using J-Link?
Thanks, Jacob
Show LessHi,
I'm a seasoned PSoC application designer. I'm using a PSoC 5LP. I have an application that uses the OpAmp v1.90.
Most of the time I need to configure the OpAmp with a mode = OpAmp. The '-' input is routed to an external pin of a current sense resistor. However due to the < 1Meg ohm input impedance (observed but not specified in the datasheet), I cannot resolve to < 30uA of current due to the extra draw and resultant noise.
If I "hard" configure the mode = Follower, I can resolve very low currents to ~ 1uA with much lower noise.
I want to configure the OpAmp to mode = OpAmp in the TopDesign and switch to mode=Follower in the code at run0time when needing to resolve to 1uA. I can operate at the register level if needed but it would be nice if there were some API calls to provide this.
Note: I tried using a analog mux external to the OpAmp to perform this desired function. I noticed many problems doing this successfully and had to abandon the attempt.
Thanks for the help in advance.
Len
Show LessHey guys.
I've managed to set my ESP32 up as a master device and im trying to get a value from a sensor that is connected to my PSOC, so my psoc is my slave. When I load the code to each device, the first few iterations will indeed send the values im reading from the PSOC to the ESP, but from there on I get no values back from the request function of my master and it stops sending information.
I've tried changing the ezi2c rate, tried changing the frequency at which im sending information and got nothing, it keeps happening.
Was wondering if anyone can give me any help.
Board - PSOC5LP-059
This is my main code:
Show Lessvoid Initialize(void)
{
CyGlobalIntEnable; // Uncomment this line to enable global interrupts.
UART_1_Start();
CyDelay(100);// waiting for clear start after power on
UART_1_PutCRLF(' ');
UART_1_PutString("Temperature sensor Maxim DS18B20:\r\n");
DS18x8_1_Start();
ADC_Start();
//void I2C_SlaveInitReadBuf(uint8 * rdBuf, uint8 bufSize);
//void I2C_SlaveInitWriteBuf(uint8 * wrBuf, uint8 bufSize);
//I2C_slave_Start();
EZI2C_SetBuffer1(sizeof(rdBuf), 8, rdBuf);
EZI2C_Start();
temp_interrupt_StartEx(isr_Timer);
}
int main()
{
Initialize();
char tempFloatToArray[4];
flag_Timer = 1; // force first measument instantly
float temp_read;
float voltage_read, current;
uint8 i;
uint8 activity;
for(;;)
{
voltage_read = convert_current();
current = (voltage_read-2.5)/current_sensitivity;
temp_read=read_temperature(); // returns a float with the temperature
memcpy(&tempFloatToArray, &temp_read, sizeof(tempFloatToArray)); //transforms the float into a char array with 4 bytes
if(temp_read != -1000){ //reading of temp was correct
activity=EZI2C_GetActivity();
if((EZI2C_GetActivity() & EZI2C_STATUS_BUSY)==0){ //fill the buffer only when it is not being accessed
UART_1_PutString("ENTREI NO IF**************\r\n");
for(i=0;i<sizeof(tempFloatToArray);i++){
rdBuf=tempFloatToArray;
}
}
}
}
}
I'm trying to use the bus/memory/usage fault handlers to create simple exception logs.
So I have defined the following bus/memory/usage fault handlers and enabled the corresponding register flags:
CyIntSetSysVector(CY_INT_BUS_FAULT_IRQN, faultHandler);
CyIntSetSysVector(CY_INT_MEM_MANAGE_IRQN, faultHandler);
CyIntSetSysVector(CY_INT_USAGE_FAULT_IRQN, faultHandler);
SCB->SHCSR |= SCB_SHCSR_USGFAULTENA_Msk | SCB_SHCSR_BUSFAULTENA_Msk | SCB_SHCSR_MEMFAULTENA_Msk; // enable Usage-/Bus-/MPU Fault
To verify the proper functioning of the bus fault handler, I've implemented the following code, according to an example project:
const uint32_t makingFault = 0u;
uint32_t *ptrFault = (uint32_t *) &makingFault;
*ptrFault = 100u;
However, this code does not lead to a bus or memory management fault. Is it due to the reason that there is no MPU available in PSoC5? Or did I miss something else?
Show Less