PSoC™ 4 Forum Discussions
Hi all,
I'm currently working on a project that requires to datalog some data (64 bytes per packet) at 1kHz to a SDcard. For that, I have used on the FATFS code that Hackingday has kindly shared (https://github.com/hackingchips/PSoC_FatFs) and did some benchmarking. My chip is CYBLE-222014-00 running at 48 MHz and SPI master at 8 MHz. The sdcard I am using is 32gb and capable of 10+ Mbytes/s write and read speed when tested in my PC.
In my test code, I wrote 4096 bytes of data (multi-block of 512 bytes) using f_write. However, my write speed is ~236kbytes/s. This is pretty far off from the benchmark illustrated http://elm-chan.org/fsw/ff/res/rwtest1.png. I have even updated the FATFS to the latest version but to no better effect. I wonder if I'm missing anything?
Appreciate any help.
P.S. I have shared my test code. 🙂
Show LessI am starting up a new project and need to be able to copy a former project and make changes to it and rename and save as a completely new project (even workspace). I can't take the chance of altering the old project in any way as well.
On other platforms I have simply copied the whole design (ie project folder and all subtending folders) and renamed the main folder and started modifying the new design. Of course with Psoc Creator 4.0, you can't do that.
To make the challenge even tougher, I am trying to do this with a design that has two projects in the workspace (ie an Uart_bootloader and a bootloadable project, similar to the example bootloadable blinking led, actually using the Cy8ckit-049-4200). I need to just be able to copy whole workspace some way and then reinsert into a new workspace where I can modify as a type of new revision if you will.
There must be a way of doing this. I don't know if there is a trick to archiving and then restoring with a new workspace and/or name but I really need a method (even if it several steps) of doing this. I work in a single workstation environment and don't want to complicate things with GITHUB at this point.
Show LessI need to implement a rapid blink of the LED. I have a watchdog timer that goes off every 100 ms . In the timer ISR I set a toggle blink flag to tell the main loop to write a value to the LED This works for the most part but occasionally the LED stays on or off longer than 100 ms/ I think it's because the main loop executes slower and less regularly than the timer. and the flag value gets out of sync with the current value of the LED.
WDT_ISR()
{
toggle_blink = !toggle_blink;
}
main loop
if(toggle_blink)
WriteLED(!ReadLED());
So the question is, is it OK to call WriteLED from the ISR?
If the answer is yes, I need to check a global variable to decide if the blink is needed. Wonder if that's OK too in the ISR
Thanks
Andy
Show LessI'm using the Pioneer kit and wondering how many peripherals a central device can have. I'm pretty sure that it's only 1 connection but I haven't been able to find that in any type of documentation. I'm being pushed to show that it clearly can't handle more than a single connection so really need to find it documented somewhere. I've seen this answer here and a little confused but it seems that Dana is referring to doing a round robin and it's not necessary connected to multiple devices at once.
(I've seen the 100 projects multiplex example as an alternative)
Show LessIn our design the user may change the device name with a custom name, up to 20 characters.
This only seems to work if I "reserve" the 20 characters in the GUI dialog for device name. For instance if the name in the gui is set to "test" and I programmatically change it to "abcdefghij" the name is saved as "abcd". If I save the name as "testabcdefghij" in the GUI then I can change the name to anything that length or shorter. I hope that makes sense.
Is this normal? Seems dodgy.
Rich
Show LessIs this possible? We are developing a wearable technology and want the user to upgrade the firmware OTA but using our app not the CYSmart phone app.
Best,
Nick
Show LessMy BLE device design requires a password. The password will be entered via a phone app. There will be a hard coded default. What is the best way to handle this?
Perhaps:
Create a custom characteristic, write only, called password.
Save new passwords to NV memory.
Thanks
Rich
Show Less