BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: Problem disabling Font Cache of BT817  (Read 8798 times)

david

  • Newbie
  • *
  • Posts: 25
    • View Profile
Problem disabling Font Cache of BT817
« on: October 25, 2021, 07:59:51 AM »

Hello, I am successfully using the font cache of BT817, I can enable it for a specific font, use it and query the total and used numbers.
But when I try to disable the font cache (setting font for CMD_FONTCACHE to 255) the command cannot get processed (REG_CMD_READ does not reach the value of REG_CMD_WRITE, so I need to reset the co processor). There is no message in RAM_ERR_REPORT at that time.
In my specific case the REG_CMD_WRITE and REG_CMD_READ are both at 556. After sending the commands, I set REG_CMD_WRITE to 572 (command length is 16 byte).
I then wait for the REG_CMD_READ to reach REG_CMD_WRITE and I see that REG_CMD_READ stays at 556 forever but REG_CMD_WRITE changes to 256 after a short time. I do not know the reason for that, because I do not write anything to it. I just read constantly REG_CMD_READ and REG_CMD_WRITE.

I tried to set multiple empty display lists before and after the disabling of the font cache, so no current or display list is using any font, but I get the same behaviour.
While trying to find out the issue, I tested a few different values for the font in CMD_FONTCACHE and I can set any font <85. Every font from 85 on to 255 lets REG_CMD_READ stay at the last value.

For understanding, why I want to disable the font cache: I have some pages with a lot of text, where I want to use the cache, but other pages with bigger images, where I want to have as much of free RAM as possible.

UPDATE: I tested it with the same board but 3 different BT817 chips. 2 of them don't have that issue and they work fine. Just one of them has this issue. So I am really curious about, what could be the problem.
« Last Edit: October 25, 2021, 03:27:09 PM by david »
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile
Re: Problem disabling Font Cache of BT817
« Reply #1 on: October 27, 2021, 09:09:15 PM »

I just go over the programming guide and came across CMD_CLEARCACHE and I wonder if this actually would help here since it seems plausible that glyphs from the font cache would go thru the graphics engine's internal flash cache first before beeing stored in the font-cache.
« Last Edit: October 28, 2021, 06:22:58 PM by Rudolph »
Logged

david

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Problem disabling Font Cache of BT817
« Reply #2 on: October 28, 2021, 02:46:24 PM »

Thanks for taking a look. I tried that on different positions, right in the display list before disabling the font cache and also in the display list right after disabling the font cache (without showing any text inside of those display lists). It did not help on that BT817 chip.
The main part, which I do not understand is, why 1 of the 3 chips has different behaviour. I am using the same board and without even flashing new code on my MCU I can solder the "not working" one down and put another one of my 3 chips on it and everything works fine. Then I solder that one down again and put the "not working" one back on and the problem occures again.
Maybe there are some insides about what could be different between those two, I think the software state on all 3 chips should be exactly same if there are no differences labeled on the chip.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 732
    • View Profile
Re: Problem disabling Font Cache of BT817
« Reply #3 on: October 28, 2021, 03:49:40 PM »

Hello,

Thank you for your post.

However, it sounds like the co-processor is getting stuck in this scenario. I am also curious as to why this issue is only apparent for one of the three ICs you have to hand.
Are you using one of our development boards, or a board of your own design?

Are the chip markings on all three of the ICs the same?

Best Regards,
BRT Community
« Last Edit: November 02, 2021, 12:07:17 PM by BRT Community »
Logged

david

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Problem disabling Font Cache of BT817
« Reply #4 on: October 28, 2021, 05:14:54 PM »

Thanks for the response, yes they all have the same markings:
Code: [Select]
BRT
K5TR7
BT817Q
2115-B

Is there anything what I need to consider when calling CMD_FONTCACHE with font set to 255? Do I need to do something before / after? I could not find anything about that in the Programming Guide. So I just tried to show an empty display list [with just the background via CLEAR] (also with and without CMD_CLEARCACHE) before and after the command without success. This was not even necessary on my other two BT817, where I can just send CMD_FONTCACHE with 255 when I am currently displaying text.

I am not using one of the Eve boards, I am using a selfmade board which I successfully used before with BT815. Copies of that board are also used in production and for customers, so they are no prototypes.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 732
    • View Profile
Re: Problem disabling Font Cache of BT817
« Reply #5 on: October 29, 2021, 03:26:23 PM »

Hello,

Thank you for the details.

I think in this case we can safely assume that there isn't an issue with the board design itself, but the difference in behaviour between the ICs is curious.

I will double check with the development team if there are any prerequisites when issuing the CMD_FONTCACHE = 255.

Best Regards,
BRT Community
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 732
    • View Profile
Re: Problem disabling Font Cache of BT817
« Reply #6 on: November 02, 2021, 12:11:28 PM »

Hello,

I've had a quick update from the development team noting that the are unable to re-produce this error and suspect it may be hardware related (presumably the IC and not the PCB).
I'm seeking some further advice on methods to debug this currently.

Best Regards,
BRT Community.
Logged

david

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Problem disabling Font Cache of BT817
« Reply #7 on: November 03, 2021, 01:08:38 PM »

Thanks a lot! I will replace the BT817 with another one then. I have a lot more of them and I will keep you updated if that problem occures on another of the BT817.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 732
    • View Profile
Re: Problem disabling Font Cache of BT817
« Reply #8 on: November 03, 2021, 03:26:34 PM »

Hello,

Thanks for the update.
I will follow up with any suggestions the hardware/software team may have on this if applicable.

Best Regards,
BRT community
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 732
    • View Profile
Re: Problem disabling Font Cache of BT817
« Reply #9 on: November 12, 2021, 11:48:45 AM »

Hello,

We found after some testing that cmd_fontcache does NOT implement the disable mechanism. We are currently updating the programming guide accordingly.

As such  cmd_fontcache(255, ptr, number) will not work as expected.

Here is the workaround:
   
1)   use cmd_coldstart() which clears all the font state, including the font handle with cache enabled.
Or
2)   avoid using the font handle for any other non-cached font.


Best Regards,
BRT Community
Logged

david

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Problem disabling Font Cache of BT817
« Reply #10 on: November 12, 2021, 02:51:59 PM »

Hello, thanks for the information.

Option 1 is actually not a workaround for me, because I want to have the cache enabled just on specific subviews and on others I need a lot of RAM for other things (image streaming). I think I would see some black screen or daly when switching between those views, if I would do a cmd_coldstart in between.

Option 2 is also problematic, because I am using the same font on both of those views, but just on one of them I need caching (because there is more text). So just not using it on the other view would not be an option.

I found a workaround which looked promissing for me: I am setting the cmd_fontcache to a font handle which does not exist (some lower value like 30, so inside of the allowed handle range). Would you recommend that or could other problems on the BT817 happen with that, if the font handle is not registered by CMD_SETFONT2?
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 732
    • View Profile
Re: Problem disabling Font Cache of BT817
« Reply #11 on: November 12, 2021, 03:29:25 PM »

Hello,

Thankyou for the update, I don't see any issues with this approach initially but I will double check this with the development team.

Best Regards,
BRT Community
Logged