PSoC™ 5, 3 & 1 Forum Discussions
I found out some outlier values read from Quadrature Decoder module. Could you help us to solve this issue ?
I'd like to confirm the limitations of the Quadrature Decoder settings and I'd like to know other more convenient module to resolve this issue.
- Part number
PSoC5 (CY8C5888LTI-LP097)
- Usage of Quadrature Decoder
Counter of BLDC motor's encoder
- How to check
1. Drive motor at constant velocity (10000rpm, 2000pulse/rev -> 333kpulse/s)
2. Read counter value by using ENC_COUNTER_GetCounter(). This function called by Timer IRQ (generated by Counter module, 5kHz) *:ENC_COUNTER is the name of Quadrature Decoder
3. At constant velocity, counter value increased/decreased constantly. But sometimes, outlier value can be read. The value is 2^15 pulses higher than the value estimated by the velocity.
- Settings of Quadrature Decoder
CLOCK: 11.8MHz (BUS_CLK: 59MHz)
Counter size: 32bit
Counter resolution: 4x
User Index: Disable
Glitch filtering: Disable
I checked the auto-generated sources of PSoC Creator 4.3 and I found some part of "Quadrature Decoder" is implemented by the software. "ENC_COUNTER_count32SoftPart" is updated by "ENC_COUNTER_ISR ".
I think it may be better not to use "Quadrature Decoder" with 32bit because it is possible to prevent ENC_COUNTER_ISR by "CyIntDisable". ENC_COUNTER_count32SoftPart may not be updated by the latest real count.
Just I'd like to count the 2-phase pulses. How should I configurate it ? Do you have any other modules I can use ?
ENC_COUNTER.c
int32 ENC_COUNTER_GetCounter(void)
{
......
CyIntDisable(ENC_COUNTER_ISR_NUMBER);
tmpCnt = ENC_COUNTER_Cnt16_ReadCounter();
hwCount = (int16) ((int32) tmpCnt - (int32) ENC_COUNTER_COUNTER_INIT_VALUE);
count = ENC_COUNTER_count32SoftPart + hwCount;
CyIntEnable(ENC_COUNTER_ISR_NUMBER);
......
}
ENC_COUNTER_INT.c
CY_ISR( ENC_COUNTER_ISR )
{
......
if (0u != (ENC_COUNTER_swStatus & ENC_COUNTER_COUNTER_OVERFLOW))
{
ENC_COUNTER_count32SoftPart += (int32) ENC_COUNTER_COUNTER_MAX_VALUE;
}
else if (0u != (ENC_COUNTER_swStatus & ENC_COUNTER_COUNTER_UNDERFLOW))
{
ENC_COUNTER_count32SoftPart -= (int32) ENC_COUNTER_COUNTER_INIT_VALUE;
}
......
}
Which devices or families of PSoC 5LP (can) have CAN functionality?
Following the family overview and according to the family data sheets this should be PSoC 5800 and PSoC 5600.
In PSoC Creator however the CAN component is visible resp. selectable in the Component Catalog for 58xx devices only.
What am I doing wrong?
Show LessDears.
Can I implement Filter using to CY8C24123A-24SXI same as MAX7400?
plz help me.
I am working on a Flash Write routine which is part of a boot loader for the CY8C27243. I am using Application AN2100 as a starting point. I have all aspects of the bootloader working except for Flash Write. After many days of debugging I have narrowed it down to the Supervisor ROM Flash Write sequence which uses the M8C SSC instruction.
Here is a simplified sequence used to access a supervisor ROM routine as found in FLASHAPI.asm which is part of AN2100. This is part of the temperature table access routine and is a very simple use of the supervisor ROM and should work.
push A ; save the State variable
push X
mov X, SP ; copy SP into X
mov A, X ; mov to A
add A, 3 ; create 3 byte stack frame
mov [0xF9], A ; save stack frame for supervisory code
mov [0xF8], 0x3A ; load the supervisory code for flash operations
mov A, 6 ; load A with FLASH_TEMP_TABLE_LOOKUP rom code
SSC ; SSC call the supervisory code
pop X
Code execution does not return after the SSC instruction. I am assuming it is halting for some reason.
I have double checked all of the parameters and can't figure out what I am doing wrong. Can SSC only be called when the M8C is in a certain mode ? I have been able to read Flash successfully since that routine uses the absolute ROM read instruction ROMX which avoids an SCC. I wish there was such an easy way to do a write.
I have been working on this bootloader for nearly a month now and need to finish this before new product release.
Show Less
お世話になります。
PSoC5LP上でUSBFSコンポーネントを使用し、HIDデバイスを製作しています。
当方で制作したHIDディスクリプタの中に"Feature"項目がありますが、
具体的にどのようなコードを書けばFeature項目に値を設定できるのか分かりません。
過去に同様の質問がありましたが、明確な回答が見つかりませんでした。
どなたかご教授願えませんでしょうか。
Show Less
Hello,
I am using PSoC 5LP and I want to send data to Matlab. I use for example UART_1_PutChar('705'); and I receive only the 5 value. I check the output using Putty and I only see the 5. However, I see some projects that use PutChar to send several, for example: https://www.youtube.com/watch?v=tRZ0t7pupLs
Thank you in advance.
Best Regards.
Show LessHi All,
I'm using in PSOC5 - CY8C5868AXI-LP035.
I've tried to figured out how to software the pin XRES but without successful.
There any options how can to software the XRES so i can do reset to PSOC without external intervention?
Thanks for any help.
Show LessAre there any plans to introduce new PSoC 5LP members with more package pins and 24 UDBs ?
Or alternatively to introduce PSoC 4200L 124-ball VFBGA with more UDBs ?
My problem is that I need more than 72 I/O pins available on PSoC 5LP and more than 8 UDBs available on PSoC 4.
My design needs more than 128 PT (product terms) to fit.
Regards,
Show LessHi,
I have been working to implement a circuit on PSoC5LP MCU as the PSoC5 LP MCU supports both analog and digital peripherals but in analog we have 4 comparators and 4op-amps, what in the situation if we require MOSFET in the situation, then what should be my approach?
Anyone Please do let me know, waiting for your reply.
Thanks & Regards,
Prateek
Show LessGood morning,
how you can see on attached file, I would to pilot 10 7-segment displays with LED_Driver block.
I can't use a second LED_Driver because the 7-segment are commons and Creator give me an error.
Is there a way to use LED_Driver block with 10 commons?
Thanks for all your helps.
Mattia Scricciolo