texas-instruments


Strange behavior with Sys/Bios mailbox objects


Since I was not able to reach TI e2e forum, I am asking the question here:
When I create two instances of sys/bios mailbox object, and try to post one of them, the other one gets signaled. I have the same issue, whether I create objects via C code or via cfg(or whatever) editor.
Furthermore,HMailBox1 and HMailBox1 pointers are different when I watched em. If I am doing something wrong, then what should I do to make two mailbox objects not interrupt each others. Below is the code that causes the issue:
#include <xdc/std.h>
#include <xdc/runtime/Error.h>
#include <xdc/runtime/System.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Task.h>
#include <ti/sysbios/knl/Mailbox.h>
ti_sysbios_knl_Mailbox_Handle HMailBox1;
ti_sysbios_knl_Mailbox_Handle HMailBox2;
/*
* ======== taskFxn ========
*/
Void taskFxn1(UArg a0, UArg a1)
{
while(1)
{
//Task_sleep(1000);
unsigned char message;
// this one gets signaled when HMailBox2 is post!!!
int success = Mailbox_pend(HMailBox1, &message, BIOS_WAIT_FOREVER);
}
}
Void taskFxn2(UArg a0, UArg a1)
{
int semId =4;
while(1)
{
Task_sleep(1000);
Mailbox_post(HMailBox2, &semId, 0);
System_printf("taskFxn2()\n");
System_flush(); /* force SysMin output to console */
}
}
/*
* ======== main ========
*/
Int main()
{
Task_Handle hTask1, hTask2;
Error_Block eb;
System_printf("enter main()\n");
Error_init(&eb);
hTask1 = Task_create(taskFxn1, NULL, &eb);
if (hTask1 == NULL) {
System_printf("Task_create1() failed!\n");
BIOS_exit(0);
}
hTask2 = Task_create(taskFxn2, NULL, &eb);
if (hTask2 == NULL) {
System_printf("Task_create2() failed!\n");
BIOS_exit(0);
}
Mailbox_Params pr1, pr2;
Mailbox_Params_init(&pr1);
Mailbox_Params_init(&pr2);
pr1.__iprms.name = "osman";
HMailBox1 = Mailbox_create(1, 8, &pr1, &eb);
pr2.__iprms.name = "mahmut";
HMailBox2 = Mailbox_create(1, 8, &pr2, &eb);
BIOS_start(); /* does not return */
return(0);
}
thanks..

Related Links

Texas Instruments Transferring Program
How to interact with an OpenThread device?
how do i use autosar program on tiva EK-TM4c123GXL (ARM cortex M4)?
CCS/DRA755: DSS jython connection timesout whereas CCS manually does run successfully
CCS: MPU6050 Sensorlib
configure osxmotion library and license manager in Canon Juma(STM32F401)
What is the fastest infinite loop in TI-84+ Basic?
serialEvent1 on cc3200 energia
Strange behavior with Sys/Bios mailbox objects
TI CC3200: How to get access point list(Wifi Direct)
Storing values to a list stored in a string
Connecting a Texas Instruments TI-84 Plus CE to an Ubuntu computer
Description of function i.e sl_Start(0, 0, 0) used for cc3200 launchpad
How do I detect if an installation of Code-Composer-Studio is licensed?
TI83+ evaluate expression program

Categories

HOME
cocoapods
hpoo
google-chrome
amazon-web-services
elasticsearch
entity-framework
knockout.js
libgdx
svn
seedstack
schema.org
qc
swi-prolog
transactions
mousemove
subdomain
kivy
vsts-build
implicit-conversion
repair
gprs
phpmqtt
minecraft
phpseclib
polymer-2.x
smooks
django-rq
asp.net-core-1.0
heap-dump
rpmbuild
sharedpreferences
kaggle
firemonkey-style
nurbs
offline-caching
network-analysis
guice
monitor
dotcms
argv
memory-fences
appcode
adminer
rails-postgresql
ms-dos
extbase
uipickerview
morphline
transparency
nomad
ipp-protocol
linq-to-excel
wysihtml5
directwrite
roracle
beeline
sonatype
asp.net-web-api-routing
network-protocols
1010
ogg
deviare
bigdecimal
streamwriter
logical
svnserve
always-on-top
between
nsdata
fragmentstatepageradapter
apache-pig-grunt
odp.net-managed
apple-configurator
adjacency-list
wepay
stack-smash
apache-commons-digester
ambiguity
gluon-desktop
domino-designer-eclipse
artisan
scala-swing
mod-auth-openidc
mojo
dnsjava
datagridcomboboxcolumn
storing-data
full-text-indexing
maven-central
two.js
meteorite
sensormanager
django-facebook
pacman
bcdedit
dynamic-rdlc-generation
web-frameworks
spark-view-engine
arrow
struts2-s2hibernate
autosize
exponent
server-variables
getopts
space-partitioning
django-pagination
printqueue
anonymous-types
uninstaller
reliability
ixmldomdocument
iphone-sdk-4.3
eventaggregator
processors
fuzzy-comparison
database-cloning
iphone-sdk-3.1.3
version-control-migration
downloadfile
jvm-bytecode

Resources

Encrypt Message