FT801 chip id error on Arduino - c

I have an Arduino clone Edison board with an FT801 graphics chip on it. While attempting to run the example sketches with the chip I encounter a chip id error. It's reporting the chip id as 3C074D54 which doesn't match the expected FT801 constant of 10108. From what I can tell the ID should be unique so why then would their sample code include:
if(FT801_CHIPID != chipid)
Could it be a counterfeit chip?
Stephen

May be when they tested the sample code, they used a chip whose ID was 10108 but on the actual board they are using the different chip. They said rightfully..You need to comment out that line to reject any chip ID checking mechanisms. Moreover you can also edit the firmware to suit your chip ID..but before doing that please read its data sheet properly and if possible then try to cross check it several time before updating your firmware.

Related

I want to know when someone makes a phone call, what will the signal received from a phone look like?

I am learning to rewrite the code for the microcontroller integrated in the development Sim modules (such as Sim800C) to be able to control switching a device without having to use another MCU. If we can do that, we only need to add 1 transistor to be able to control a relay on and off.
I know at the output of the MCU (eg STM32F...) inside the sim module (eg sim800C) there will be a function to receive and read personal information stored in the sim card and decode the signal emitted from the Mobile base station: For example, when a call comes in, it will generate the sequence:
RING
+CLIP: "01203360211",161,"",0,"",0
....
So can anyone help me to know when the MCU outputs a string like the above, what will be its input 11110000,...? or something special in some form? I'm really confused. Thanks everyone!

STM32 Artificial Intelligence

I'm working on STM32l476g-DISCO and I want to try the Artifical intelligence feature using STM32 CUBEMX but I couldn't see the output (prediction/decision) neither understand the validation (validation on desktop and validation on target)
I was following the ST Microelectronics Demo: https://www.youtube.com/watch?v=szMGedsp9jc&t=314s
Can someone please explain the results of the output of the validation on desktop and the validation on the target, and how can I see the decision output?
If I enter a custom data of someone 'sitting' for example how can I see if my model is working perfectly on the STM32?
I think you are asking two questions.
1) For the validation, I think that it basically means that it shows how different are the results in the original NN (done in python and with Keras) and the results in the converted C++ network (implemented in your desktop and in the microprocessor)
2) If you want to see the network in action and predicting something I recommend the following example:
Hand written digits recognition on STM32F4
In the code you can see the original NN in python and then the implementation of it in C to be used to recognize digits.
Take special attention to the function MX_X_CUBE_AI_Process(in_data,out_data,1); which is where the prediction occurs.
in addition to what kansaiTobot has said,
from CubeMX-AI you have three modes of operation
1- Validation ==> compare the result of model implemented in Python against the C/C++ model , this mode has two options you can do validaion of C/C++ on Host PC and you can do it on target micro-Controller
2- System Performance ==> measure the required CPU load and memory usage for the NN
3- Application template ==> here you can supply your input data and get the result from the neural network
you can find more information in the user manual AI on STM32
"Getting started with X-CUBE-AI Expansion Package for Artificial Intelligence (AI)"

Multiple identical I2C sensors with the vl53L0x API (ST Microelectronics)

In a professional context, I have to use the vl53L0x. This sensor was released recently, along with it's API, meaning that there's no help on the internet yet :
http://www.st.com/content/st_com/en/products/embedded-software/proximity-sensors-software/stsw-img005.html
This API contains some source and headers file, that I compiled with the gcc. It works fine, despite clearly lacking comments. I flash the memory of a stm32 (NUCLEO-F401RE), which controls a vl53L0x sensor via an I2C bus. I now want to add more vl53L0x sensors on the same I2C bus, and refer to this document (if you want to read it, go directly to the bottom half of the page 5, the wiring is already done) :
http://www.st.com/content/ccc/resource/technical/document/application_note/group0/0e/0a/96/1b/82/19/4f/c2/DM00280486/files/DM00280486.pdf/jcr:content/translations/en.DM00280486.pdf
The principle, that I already applied on other sensors, is that they all start with the same address. You then have to activate one, change it's address, then activate the next one, change it's address, etc.
Unfortunately, ST Microelectronics didn't publish the list of the I2C registers, so I have to use their API to control multiple sensors. The document linked above explains how to do so. Among other things, it specifies :
In vl53L0x_platform.h API file
• Set VL53L0x_SINGLE_DEVICE_DRIVER macro to 0 so that API implementation will
be automatically adapted to a multi-device context.
I looked everywhere in the API folder, I was not able to find any reference to a VL53L0x_SINGLE_DEVICE_DRIVER macro. Setting it to 0 won't change anything, as this string is not present anywhere in the API files. Did anyone run into a similar problem ?
I'm working on the same thing. It seems that you're further ahead than I am. However, putting this in my while(1) loop seems to make both the sensors work.
ResetAndDetectSensor(0);
TimeStamp_Reset();
The guide says that in order to use all the sensors simultaneously, you need to pull the XSHUT pin high for all the sensors, reset the timestamp and then pick up the sensor which actually detects something.

Charging Indicator for Battery (Battery Monitor)

We see in all today electronic devices like mobile a Visual battery charging indicator,that a graphical Container composed of bars that increases one by one when the battery is charged for long, and decreases one by one when the mobile is used for long time.
I see the same thing laptop in every GUI operating system like windows and Linux.
I am not sure whether i am posting in the right place, because this requires a System Programmer and Electrical Engineer.
A Visual view of my Question is here:
http://gickr.com/results4/anim_eaccb534-1b58-ec74-697d-cd082c367a25.gif
I am thinking from long long ago , under what logic this works?
How the Program is managed to Monitor the battery.
I made a simple logic based on Amps-hour, that how much time the bar should increase when the battery is in charging mode.??? But that does not work perfectly for me.
Also i read a battery indicator Android application source code of my fried, but the function he used were System Calls based on Andriod Kernel (Linux Kernel).
I need the thing from the scratch....
I need this logic to know............. Because i am working on an Operating system kernel project, which later on will need battery charging monitor.
But the thing i will implement right now is to show just percentage on the Console Screen.
Please give me an idea how i can do it.... Thanks in Advance
Integrating amps over time is not a reliable way to code a battery meter. Use voltage instead.
Refer to the battery's datasheet for a graph of (approximate) voltage vs. charge level.
Obtain an analog input to your CPU. If it's a microcontroller with a built-in ADC, then hopefully that's sufficient.
Plug a reference voltage (e.g. a zener diode) into the analog input. As the power supply voltage decreases, the reference will appear to increase because the ADC only measures voltage proportionally. The CPU may include a built-in reference voltage generator that you can mux to the ADC, or the ADC might always measure relative to a fixed reference instead of rail-to-rail. Consult the ADC manual (or ADC section of micro controller manual) for details.
Ensure that the ADC provides sufficient accuracy.
Sample the battery level and run a simple low-pass filter to eliminate noise, like displayed_level = (displayed_level * 0.95) + (measured_level * 0.05). Run that through an approximate function mapping the apparent reference voltage to the charge level.
Display the charge level.

Associate OpenCL device with NVAPI device

I am trying to associate the OpenCL GPU devices with NVAPI devices which I get using NvAPI_EnumPhysicalGPUs in the Multi-GPU system.
The thing is, I can use clGetDeviceInfo with CL_DEVICE_VENDOR_ID which is always unique and it is the best way, and I can retrieve the vendor from the NvAPI_SYS_GetChipSetInfo. But it is not associated with the NvPhysicalGpuHandle which I get from NvAPI_EnumPhysicalGPUs. Is there any way to associate this?
Of course, I can just use name, but this is not good.
There is a way to do it. In OpenCL there is a poor documented feature for some reason. You need to call clGetDeviceInfo with constant 0x4008 and it will give you the bus id for the following device handle.
cl_uint busID;
clGetDeviceInfo(device,0x4008,sizeof(cl_uint), &busID,NULL);
printf("%d",busID);
On NvApi side use NvAPI_GPU_GetBusId. Then you can associate the handles by comapring the buses.

Resources