FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Topics - scorpioprise

Pages: [1]
1
Discussion - Software / Errors about crt0.S
« on: June 26, 2019, 09:21:52 AM »
Hi everyone,
I'm experiencing some troubles against AN415 (Ethernet to GPIO), because after some few modifications (moved some headers, removed some debug messages, changed project name), I could not compile it anymore, and I've hit a series of errors "multiple definition of" ( i.e. "_exit","_start","_exithook") that hit in crt0.S.

I don't understand why, as I've made no change neither in main nor in crt0, adding that particular defines.

Searching into the code, I have a reference to crt0 in comments

Code: [Select]
void flash_config_init() {

[..cut..]// Project settings incorrect. Require dlog support with modified
// linker script and crt0.S file.
// See AN_398 for examples.
there is a AN398 reference, which I couldn't find on FTDI or BRT sites.

Also, I need to understand how to reduce the imagesize, as i've understood that it takes the whole flash, but I need to know the real allocated space, and change it according to my needs.
Thankyou in advance

2
Discussion - Software / My Gui keeps crashing
« on: April 12, 2019, 10:48:17 AM »
The problem is that every since my GUI stops working, let's start from the beginning

-FT902 + FT812 custom board-

From EVE 4.5 I got widgets and so on, positioned with layouts, built images and all of this mess.
Then I've done many under-the-hood personalizations (added CANBus support, USB DFU function, Power Supply Managemet,  code cleaning). Now the project is almost done 8).

BUT, if I switch back and forth many times, the toy crashes  :-\: the application freezes, and there's no other way than reset (reboot via reset pin).

As It apparently was like a memory corruption, when loading some complex page, i've began reading the mallinfo() structure, and every time I switch away and back to a slide, I find the HEAP grew by 96Byte... Also, my first slide, which for a while had a fixed address, after some jumps moved to another address...

This is a 250kB compressed bin application, full of stuff, variables and icons. Where shall I search for the leak?

Let me say there is no room for attach a debug ... code needed a -o3 -oS optimization to be built under eclipse and sent to board. Everything I have is the UART console... or writing on SD, maybe?

Any help will be appreciated.

3
Discussion - Software / EVE down signal: sensing continuous
« on: March 19, 2019, 04:43:20 PM »
Hi there, have you any idea on how to detect that you have a long click on (for instance) a imagebutton ( and do something different in your code ) ?
It involves the down signal, ok, but how would you modify it?


4
Discussion - Software / I2C misunderstanding
« on: March 19, 2019, 03:51:46 PM »
Hi Everybody, I'm working on my custom board, so it's not a good starting point....
I have a 64K I2C serial eeprom. But I don't really understand what's wrong...

Of course, I tested the example on the demo board (MM900EV1A) and worked. (2K eeprom)

First problem, No read - no write.
The location address is 12bit long, so I got the source and altered, but no success.

Code: [Select]
int8_t i2cm_write_twoByte(const uint8_t addr, const uint16_t loc,
const uint8_t *data, uint16_t number_to_write) {
int8_t ret = 0;

if (isHighSpeed) {
/* In high speed mode, the following sequence has to be done before each data transfer
Write Master code 0x09 to I2CMSA and the HIGH SPEED command to I2CMCR */
I2CM->I2CM_SLV_ADDR = 0x09;
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_HS | I2C_FLAGS_RUN;

/* Wait until I2CM is no longer busy */
if (i2c_wait_for()) { /* An Error Occurred */
ret = -1;
}
}

if (ret == 0) {
/* Write slave address to SA */
I2CM->I2CM_SLV_ADDR = addr;
/* Write command byte address MSB to BUF */
I2CM->I2CM_DATA = (uint8_t) ((loc & 0xFF00) >> 8);

/* Check that the bus is not occupied by another master
(this step is not needed in single-master system or in high speed mode since
arbitration takes place during transmission of the master code) */
if (isHighSpeed == 0) {
while (I2CM->I2CM_CNTL_STATUS & MASK_I2CM_STATUS_BUS_BUSY) {
}
}

/* Write command to I2CMCR to send Start and command byte. */
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_START | I2C_FLAGS_RUN;
if (i2c_wait_for()) { /* An Error Occurred */
ret = -1;
}
}
if (ret == 0) {
/* Write command byte address LSB to BUF */

I2CM->I2CM_DATA = (uint8_t) (loc & 0xFF);
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_RUN;
if (i2c_wait_for()) { /* An Error Occurred */
ret = -1;
}
}

if (ret == 0) {
if (number_to_write) {
while (number_to_write-- && ret == 0) {
/* Write command to I2CMCR to send data byte. */
I2CM->I2CM_DATA = *data++;
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_RUN;
if (i2c_wait_for()) { /* An Error Occurred */
ret = -1;
}
}
}
}

/* Write command to I2CMCR to send Stop. */
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_STOP;
if (ret == 0) {
i2c_wait_for();
}

return ret;
}

Code: [Select]
int8_t i2cm_read_twoByte(const uint8_t addr, const uint16_t loc, uint8_t *data,
uint16_t number_to_read) {
int8_t ret = 0;

if (isHighSpeed) {
/* In high speed mode, the following sequence has to be done before each data transfer
Write Master code 0x09 to I2CMSA and the HIGH SPEED command to I2CMCR */
I2CM->I2CM_SLV_ADDR = 0x09;
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_HS | I2C_FLAGS_RUN;

/* Wait until I2CM is no longer busy */
if (i2c_wait_for()) {
ret = -1;
}
}

if (ret == 0) {
/* Write slave address to SA */
I2CM->I2CM_SLV_ADDR = addr;
/* Write command byte address to BUF */
I2CM->I2CM_DATA = (uint8_t) ((loc & 0x1f00) >> 8);

/* Check that the bus is not occupied by another master
(this step is not needed in single-master system or in high speed mode since
arbitration takes place during transmission of the master code) */
if (isHighSpeed == 0) {
while (I2CM->I2CM_CNTL_STATUS & MASK_I2CM_STATUS_BUS_BUSY) {
}
}

/* Write command to I2CMCR to send Start and command byte. */
I2CM->I2CM_CNTL_STATUS =
I2C_FLAGS_START | I2C_FLAGS_RUN | I2C_FLAGS_ACK;

if (i2c_wait_for()) {
ret = -1;
}
}
if (ret == 0) {
I2CM->I2CM_DATA = (uint8_t) (loc & 0x00ff);
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_RUN | I2C_FLAGS_ACK;
if (i2c_wait_for()) {
ret = -1;
}
}
if (ret == 0) {
/* Write slave address to SA with R operation */
I2CM->I2CM_SLV_ADDR = addr | 0x01;

if (number_to_read <= 1)
/* Receive with a NACK */
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_START | I2C_FLAGS_RUN;
else
/* Receive with an ACK */
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_START | I2C_FLAGS_RUN
| I2C_FLAGS_ACK;

if (i2c_wait_for()) {
ret = -1;
}
}

if (ret == 0) {
while (number_to_read) {
*data++ = I2CM->I2CM_DATA;
number_to_read--;

if (number_to_read) {
if (number_to_read == 1)
/* Last one, Receive with a NACK */
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_RUN;
else
/* Receive with an ACK */
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_RUN | I2C_FLAGS_ACK;

/* Write command to I2CMCR to read data byte.
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_RUN; */
if (i2c_wait_for()) {
ret = -1;
break;
}
}
}
}

/* Write command to I2CMCR to send Stop. */
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_STOP;
if (ret == 0) {
i2c_wait_for();
}

return ret;
}

Memory is Microchip 24LC64, 5 pin SOT23 (no hardware address).

Any idea where to look for the problem?

5
New Member Introductions / Hello From Italy
« on: November 28, 2018, 10:24:31 AM »
Hi everybody!

I'm building my first display, and I'm juggling with ESD, Eclipse, a Ft901 demo board and a couple of Ft812 - Ft813 demo display boards.
So I'm tryng the community approach, and I hope I can bring back experience from the fields!

Filippo

6
Discussion - Software / From EVE Screen Designer to Eclipse... and back?
« on: November 27, 2018, 04:44:56 PM »
Hi, I'm new in using FTDI chips, but I'm building a custom display with FT901 and FT812/FT813.
As far as I've understood, once I export from ESD to Eclipse there is no way to get it back into ESD. Is that right?

The matter is that the GUI i'm working on will be very very complex, so I have to try and rebuild many times. And I have to add my layer of custom code in it.

Say it has a serial (UART0) interface working under the display interface, that can operate both indipendent speaking with the can-bus interface.
So both will call methods to write and read the can-bus.

First step is altering the code, ok, that's fine.
But if I have to add interface elements? How can I get it back into the ESD?

Otherwise I have to use the mighty power of git to catch the changed GUI things and keep the handcoded ones?

Hope you can help me understand.

Pages: [1]