Hi,
I am having an issue with motor driver communication, and I would like to ask if my SPI code is correct. I am only getting 0xFFFF for any register that I am trying to read, and I know that that is not correct for startup of the registers.
The guts of the code is here:
uint16 DRV8323_Read(uint8 addr)
{
// Dummy byte needed to clock in read data
uint16 dummy = 0x00;
// Write read command and address
// Read bit is MSB, addr takes up next 4
uint16 cmd = ((SPI_READ << 15) | (addr << 11));
SPI_DRV_SpiUartWriteTxData(cmd);
// Write Dummy
SPI_DRV_SpiUartWriteTxData(dummy);
// Wait for data to be received - is size consisting of 16 or 8 bit elements?
while (SPI_DRV_SpiUartGetRxBufferSize() < 2) {}
// Read both data bytes
// dummy
data1 = SPI_DRV_SpiUartReadRxData();
// return data
data2 = SPI_DRV_SpiUartReadRxData();
SPI_DRV_SpiUartClearRxBuffer();
// Return register data
return (data2);
}
Attached is the full test project.
Datasheet for the motor driver is here: DRV8323
Thank you in advance for any help that can be offered.
Regards,
Tom
Show LessIn KBA210620 you say that 22Ohm resistors should be placed in series with the D+ and D- USB data line but the technical reference manual specifically says that the silicon has 22Ohm resistors internal to the chip:
18.1 Features
The PSoC USB has these features:
...
■ Integrated 22 USB termination resistors on D+ and D– lines, and 1.5-k pull-up resistor on the D+ line
Do I need external 22Ohm resistors as well?
KBA210620 also says that 0.1uF should be connected between VBUS and GND. Is this necessary even if VBUS is just used to sense the presence of the host, and enable the USB drivers? There is no reference to this in the trm.
I am having problems getting the USB to work reliably. It works as long as there is at least one USB hub between the PSOC and host controller on the PC, but not if the PSOC is connected directly to the host controller, either USB3 or USB2. Error message is : "USB device not recognised, the last device connected to this computer malfunctioned and windows does not recognise it" with device manager saying "Windows has stopped this device because it has reported problems. (Code 43). A request for the USB device descriptor failed."
Traces on the PCB between USB connector and PSOC are about 5mm in length, matched to about 0.5mm, and reasonably matched to 100 Ohms. PSOC is self powered.
Show Less
Hello.
Attached project uses 2 PWM components.
PWM makes square wave, and this square wave is stopped or started by PWM_Timer interrupt.
Attached pptx file is waveform of this square wave.
Sometimes it takes some time for voltage level to reach GND when square wave is stopped.
Please confirm red circle of attached pptx file.
Q1)
Could you please let us know reason why this behavior occurs?
Does this behavior occur if PWM is stopped when voltage level is high?
Why doesn't voltage level go to GND immediately?
Q2)
Could you please let us know solution to this behavior?
I want to immediately set voltage level to GND regardless of timing that PWM_stop is called.
Best Regards.
Yutaka Matsubara
Show Less現在 製品試作に実装しテスト中ですが
UARTでフレーミングエラーがまれに発生しており 原因と対策を検討中です
型番:CY8C4147AZI-S475
質問は
UARTのMedian Filterが どういう仕組みで 外来ノイズに対して 有効なのかどうかを知りたいです
PSoC UARTのデータシートについて
Document Number: 002-20171 Rev. *B Page 138 of 216
の Median filter の項目についてですが
This parameter applies 3 taps digital median filter on input path of RX line. This filter reduces thesusceptibility to errors.
The default value is a Disabled.
このパラメーターは、RXラインの入力パスに3タップのデジタルメディアンフィルターを適用します。
このフィルターは、エラーの影響を受けやすくします。 デフォルト値は無効です。
と 機械翻訳では ”エラーが起きやすくなる” ような 意味になるのですが
実際にはどうでしょう? また それを使用した時の 弊害はあるのでしょうか?
I am using the USB HID example from cypress. On the Cy8CKIT-059 (psoc5) it is running fine. I have to use CY8C4247AZI-L485 in a custom board.The system is self powered. I connected D+ D- and VUSB to the pins of the USB connector. I can programm but USB enumeration is not completed. The flow hangs in the while loop
int main(void)
{
uint16_t OUT_COUNT;
uint8_t* response;
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
/* Start USBFS operation with 5-V operation. */
USBFS_1_Start(USBFS_1_device,USBFS_1_5V_OPERATION); // USBFS_1_3V_OPERATION
while(USBFS_1_bGetConfiguration() == 0x00)
{
/* Waiting for device to be configured */
}
I also tried the 3V operation. I checked the USB configuration and tried all options avaliable
also using P0.0 with a voltage divider connected in parallel to VUSB. What do I miss? How can I get the device running?
Show Less
I like to use this device running an USB - HID profile. According datasheet Pin 13.1 (D-) 13.0(D+) and P13.2 VBUS (5V from USB?). Datasheet of USB tells me that I also have to assign VBUS to P0.0 ..(for 4200L devices). For me this is all not clear how to wire. It would be very great if your datasheet hold a schematics of all possible scenario.. how to connect. Pease assist !!
I like to run it as self powered, Not Bus powered. Please tell me the exact setting in USB configuration, and how to wire... what to connect where and how, Thanks.
Show LessDear All,
Can i have any project on LM35 + PSOC4 ? for my reference.
As i am working on one project right now in which i have to interface PSOC4 with LM35 and based on temperature out from LM35 i have to send commands on UART to master controller.
Naintech.
Show LessI have a running USB project with only a USB block in TopDesign. And I have a second complete project with pinning and pheriperals but USB does not work. I compared both USB settings and did not find any difference. Ist there a way to clone this projects that I will get the USB in second project working by overlaying both projects
Show LessI have a CYBT-213043-EVAL board and the CYBT-213043-Mesh board. I downloaded the Eclipse IDE for modus toolbox 2.2 and opened the Mesh application and the RFComm application. I was successful building, programming and running both applications using the USB connection for each board. I now want to modify and debug each application. I purchased and received the CY8CKIT-005 miniprog4 kit to accomplish the debug. I downloaded the software for the CY8CKIT-005 miniprog4 kit and I believe I was successful. 1st question, is this the correct kit to perform debug? 2nd question, is there documentation to show how to physically connect the 5 pin or 10 pin connector of the CY8CKIT-005 miniprog4 kit to the eval boards? 3rd question, is there specific manual for debugging?
Show LessHi,
What happens to PSoC4 if RS-232 serial cable is unplugged during a bootlodable update by the bootloader via UART? Does the bootloader keep waiting for the next UART reception?
Since it's only halfway written to Flash, it may lead to corruption of the bootlodable. But if PSoC4 is reset and the Host System sends the bootloadable image again, I think it's possible to update the bootloadable.
Best regards
Show LessExpert II
Esteemed Contributor
Employee
Honored Contributor II
Employee
Employee
Honored Contributor II
Employee